diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-17 08:07:00 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-17 08:07:00 +0200 |
| commit | 121235db5ca23e53e0dad3a402c521dc7a940fbc (patch) | |
| tree | a899aff77c6cd08ee763d418d4904e51eaf3bb5c /modules | |
| parent | 2c23c9cc2fa5c26e408e7276f7da7d0cb37922d6 (diff) | |
| download | waybar-theme-udt-121235db5ca23e53e0dad3a402c521dc7a940fbc.tar.gz waybar-theme-udt-121235db5ca23e53e0dad3a402c521dc7a940fbc.zip | |
feat(icons): read the icon theme from gsettings
The icon theme name was hardcoded in three places (bin/wb-icon,
modules/extras/taskbar.jsonc and install.sh), so switching themes in the
appearance drawer was silently reverted as far as this bar was concerned.
wb-icon now reads org.gnome.desktop.interface icon-theme and gains two modes
for install.sh: --path NAME prints one icon's absolute path, --theme prints
the resolved theme name.
Icons are resolved per name rather than by substituting a directory prefix,
because themes disagree about both subdirectory and file extension: the Suru
themes keep web-browser at categories/22/*.svg, elementary-xfce at
apps/22/*.png. Only a real GTK lookup knows the path.
styles/modules.css therefore carries @ICON:name@ placeholders and
modules/extras/taskbar.jsonc carries @ICON_THEME@, both filled at install
time. taskbar.jsonc is generated rather than symlinked for that reason, and
install.sh removes the old symlink first so the redirect cannot overwrite the
committed source.
A theme missing one of the twenty names fails the install at the --selftest
step rather than drawing empty pills.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/extras/taskbar.jsonc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/extras/taskbar.jsonc b/modules/extras/taskbar.jsonc index c7f88ea..b47448a 100644 --- a/modules/extras/taskbar.jsonc +++ b/modules/extras/taskbar.jsonc @@ -1,7 +1,9 @@ // Open applications, drawn with each application's own icon. // // icon-theme used to name Papirus, which is not installed on this machine, so -// GTK fell back silently. It now names the theme the rest of the desktop uses. +// GTK fell back silently. It is now @ICON_THEME@, substituted by install.sh +// with whatever gsettings reports, so a theme switch reaches this bar too. +// That is also why this file is generated rather than symlinked. // // all-outputs makes this a global window switcher rather than a list of what // is on this screen: with it false, the DP-3 bar showed only the two windows @@ -11,7 +13,7 @@ "wlr/taskbar": { "all-outputs": true, "format": "{icon}", - "icon-theme": "Material-Black-Plum-Suru", + "icon-theme": "@ICON_THEME@", "icon-size": 20, "tooltip": true, "tooltip-format": "{title}", |
