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 /README.md | |
| 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 'README.md')
| -rw-r--r-- | README.md | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -34,9 +34,10 @@ from there, and `install.sh` fails clearly if it is missing. ## No glyphs -Every symbol on this bar is a real icon from `Material-Black-Plum-Suru`, the -theme GTK already uses. Icons keep their own colours, matching every other -application on the desktop. +Every symbol on this bar is a real icon from the desktop's icon theme, read +from gsettings, so the bar follows a theme switch instead of naming one theme +forever. Icons keep their own colours, matching every other application on the +desktop. waybar offers three ways to draw one, and this bar uses all three because no single one covers everything: @@ -63,9 +64,9 @@ with nothing to say why, so it fails while someone is watching instead. ### Why the icons do not follow the accent -2466 of the 5169 panel icons in `Material-Black-Plum-Suru` carry a hardcoded -gradient and are not recolourable. That is intended here: icons match the rest -of the desktop rather than the bar. +2466 of the 5169 panel icons in `Material-Black-Plum-Suru`, the theme this +desktop runs, carry a hardcoded gradient and are not recolourable. That is +intended here: icons match the rest of the desktop rather than the bar. The icons this repo ships are the exception, because the icon theme has none of them. `icons/slackware.svg` (Simple Icons, CC0) is single-path monochrome, |
