aboutsummaryrefslogtreecommitdiffstats
path: root/TODO-icons.md
blob: ac904f75243673c6136c11d993701d331b6fd3a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Unhardcode the icon theme

Done. The active icon theme is now read from
`gsettings get org.gnome.desktop.interface icon-theme`, which is what the
appearance drawer's Icons tab sets, so a switch there reaches this bar instead
of being silently reverted.

## How it works

`bin/wb-icon` reads the gsettings key once and resolves names through GTK's
icon lookup. Nothing else may assume a path shape: themes disagree about both
the subdirectory and the file extension (the Suru themes keep `web-browser` at
`categories/22/*.svg`, elementary-xfce at `apps/22/*.png`), so substituting one
directory prefix would have broken on any non-Suru theme.

Two new modes serve `install.sh`:

- `wb-icon --path NAME` prints one absolute path
- `wb-icon --theme` prints the resolved theme name

`styles/modules.css` names icons as `@ICON:name@` placeholders and
`modules/extras/taskbar.jsonc` carries `@ICON_THEME@`; `install.sh` resolves
both at install time. taskbar.jsonc is generated for this reason and is no
longer symlinked.

## After a theme switch

Re-run `install.sh`, then **restart waybar**. CSS reloads itself through
`reload_style_on_change`, but `taskbar.jsonc` is config: a signal is not enough.

## Fixed elsewhere

- `~/.config/rofi/config.rasi` — `icon-theme` commented out, so rofi follows
  the desktop theme.
- `~/.local/share/applications/firefox-clean.desktop` — absolute `Icon=` path
  replaced with the bare name `firefox-aurora`, which the desktop-entry spec
  resolves through the active theme (and which picks a 48px icon rather than
  the 16px one that was pinned).

## Not a conflict

`~/.config/hypr/hyprqt6engine.conf`'s `icon_theme` is commented out.
unified-desktop-theme's `templates/qt-gtk/*` are reference copies that nothing
installs; see that repo's TODO-icons.md.

## Caveat

A theme lacking one of the 20 names this bar asks for fails the install at the
`--selftest` step rather than rendering empty pills. elementary-xfce, for
example, has no `text-editor` or `internet-chat`.