diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-17 08:09:21 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-17 08:09:21 +0200 |
| commit | 8b7cba33ebbcd9e4227f1a5e8b41ca9f291185e9 (patch) | |
| tree | 1ee0d34e6451cc28deadc7fdfc9686ae7a3ebace | |
| parent | d9da179a6e07e45be5cb8a6abd2786346bd41f96 (diff) | |
| download | unified-desktop-theme-8b7cba33ebbcd9e4227f1a5e8b41ca9f291185e9.tar.gz unified-desktop-theme-8b7cba33ebbcd9e4227f1a5e8b41ca9f291185e9.zip | |
fix(gtk): let the appearance drawer own the icon and cursor themes
templates/gtk/index.theme.in named IconTheme and CursorTheme, and it is
installed whole-file into ~/.themes/udt/index.theme, which the drawer's Icons
tab never rewrites. Every switch there left this file naming the old theme.
Both keys are dropped: gsettings wins over a metatheme hint on Wayland, so the
drawer's value stands on its own.
templates/qt-gtk/{gtk3-settings.ini,qt5ct.conf,qt6ct.conf} were checked and
are not a conflict: nothing installs them, and install.sh only seds
gtk-theme-name into the live gtk-3.0/settings.ini. Each now says so at the
top, so the next reader does not have to establish it again.
TODO-icons.md records the audit, including the three consumers outside this
repo that resolved icons against a hardcoded theme name.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
| -rw-r--r-- | TODO-icons.md | 44 | ||||
| -rw-r--r-- | templates/gtk/index.theme.in | 5 | ||||
| -rw-r--r-- | templates/qt-gtk/gtk3-settings.ini | 3 | ||||
| -rw-r--r-- | templates/qt-gtk/qt5ct.conf | 2 | ||||
| -rw-r--r-- | templates/qt-gtk/qt6ct.conf | 2 |
5 files changed, 54 insertions, 2 deletions
diff --git a/TODO-icons.md b/TODO-icons.md new file mode 100644 index 0000000..2b1b173 --- /dev/null +++ b/TODO-icons.md @@ -0,0 +1,44 @@ +# Unhardcode the icon and cursor themes + +The appearance drawer's Icons tab (`quickshell/appearance/Icons.qml`) owns the +active icon and cursor theme and the cursor size. It sets them through +gsettings (`org.gnome.desktop.interface` icon-theme / cursor-theme / +cursor-size), the Qt configs (`qt5ct.conf`, `qt6ct.conf`: `icon_theme=`), +`gtk-3.0/settings.ini` and `gtk-4.0/settings.ini` (`gtk-icon-theme-name`, +`gtk-cursor-theme-name`, `gtk-cursor-theme-size`) and `environment.lua` +(`{X,HYPR}CURSOR_THEME`, `{X,HYPR}CURSOR_SIZE`). Every write is an in-place +rewrite of an existing line; no file is written whole. + +## Done + +`templates/gtk/index.theme.in` was the one real conflict: it is generated and +installed whole-file into `~/.themes/udt/index.theme`, which the drawer never +touches, so its `IconTheme=` and `CursorTheme=` went stale on a drawer switch. +Both keys are dropped. gsettings wins over a metatheme hint on Wayland, so the +drawer's value now simply stands. + +## Not a conflict + +`templates/qt-gtk/{gtk3-settings.ini,qt5ct.conf,qt6ct.conf}` are reference +copies that nothing installs: no `install.sh` reference and `git log -S` finds +none ever existed. `install.sh` only seds `gtk-theme-name` into the live +`gtk-3.0/settings.ini`, never an icon or cursor key. Each file now says so at +the top. + +## Consumers: now wired to gsettings + +These *consumed* an icon theme to resolve icon paths rather than setting the +system theme, so a drawer switch left them pointing at the old theme's icons +until edited by hand. All three now follow the drawer: + +- waybar-theme-udt: `bin/wb-icon` reads the gsettings key and resolves names + through GTK icon lookup; `install.sh` bakes the results into the generated + `modules.css` and `taskbar.jsonc`. Re-run its `install.sh` and restart waybar + after a switch. See that repo's `TODO-icons.md`. +- `~/.config/rofi/config.rasi` — `icon-theme:` commented out, so rofi uses the + desktop theme. +- `~/.local/share/applications/firefox-clean.desktop` — absolute `Icon=` path + replaced with the bare name, which the desktop-entry spec resolves through + the active theme. + +`~/.config/hypr/hyprqt6engine.conf`'s `icon_theme` is commented out. diff --git a/templates/gtk/index.theme.in b/templates/gtk/index.theme.in index 679b899..908404a 100644 --- a/templates/gtk/index.theme.in +++ b/templates/gtk/index.theme.in @@ -7,6 +7,7 @@ Encoding=UTF-8 [X-GNOME-Metatheme] GtkTheme=udt MetacityTheme=udt -IconTheme=Material-Black-Plum-Suru -CursorTheme=hypr_bibata-modern-amber ButtonLayout=close,minimize,maximize:menu +# No IconTheme or CursorTheme: the appearance drawer's Icons tab owns both +# and sets them through gsettings, which wins over a metatheme hint on +# Wayland. Naming them here only goes stale on the next drawer switch. diff --git a/templates/qt-gtk/gtk3-settings.ini b/templates/qt-gtk/gtk3-settings.ini index d434da8..7287705 100644 --- a/templates/qt-gtk/gtk3-settings.ini +++ b/templates/qt-gtk/gtk3-settings.ini @@ -1,3 +1,6 @@ +# Reference copy, not installed. install.sh never writes this file; it +# only seds gtk-theme-name into the live ~/.config/gtk-3.0/settings.ini. +# The icon and cursor keys below are the appearance drawer's to set. [Settings] gtk-application-prefer-dark-theme=true gtk-button-images=1 diff --git a/templates/qt-gtk/qt5ct.conf b/templates/qt-gtk/qt5ct.conf index 925d422..fd8aced 100644 --- a/templates/qt-gtk/qt5ct.conf +++ b/templates/qt-gtk/qt5ct.conf @@ -1,3 +1,5 @@ +# Reference copy, not installed. install.sh never writes this file. +# icon_theme is the appearance drawer's to set. # Theme-relevant keys only; the live file carries other settings. [Appearance] custom_palette=false diff --git a/templates/qt-gtk/qt6ct.conf b/templates/qt-gtk/qt6ct.conf index b8b0054..82bb973 100644 --- a/templates/qt-gtk/qt6ct.conf +++ b/templates/qt-gtk/qt6ct.conf @@ -1,3 +1,5 @@ +# Reference copy, not installed. install.sh never writes this file. +# icon_theme is the appearance drawer's to set. # Theme-relevant keys only; the live file carries other settings. [Appearance] custom_palette=false |
