From 121235db5ca23e53e0dad3a402c521dc7a940fbc Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 17 Sep 2026 08:07:00 +0200 Subject: 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 --- modules/extras/taskbar.jsonc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules') 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}", -- cgit v1.2.3