diff options
Diffstat (limited to 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 29 |
1 files changed, 20 insertions, 9 deletions
@@ -19,20 +19,30 @@ One colour moves: `@accent`. `bin/udt-accent` reads the current wallpaper, extracts its signature colour, and snaps it to the nearest of ten Catppuccin accents by perceptual hue in CIELAB. `wallp` calls it on every wallpaper change. -It writes three things: `~/.cache/wal/udt-accent.rasi` (rofi), -`~/.cache/wal/udt-border.lua` (Hyprland), and the accent substitution in -`~/.cache/wal/dunstrc`. +It writes four things: `~/.cache/wal/udt-accent.rasi` (rofi), +`~/.cache/wal/udt-border.lua` (Hyprland), the accent substitution in +`~/.cache/wal/dunstrc`, and `~/.cache/wal/colors.json` (Firefox, via +pywalfox). **Extraction is deliberately isolated from the pywal cache.** It calls `pywal.backends.colorz.get()` directly, which returns a list and writes nothing. Running `wal -i` instead would rewrite all of `~/.cache/wal`, including the terminal's ANSI colours, and that is the exact failure this design exists to -avoid. If you change that function, verify `~/.cache/wal/colors.json` is -byte-identical afterwards. - -Not everything tracks the wallpaper. rofi, dunst and Hyprland borders do; conky, -Qt, GTK and waybar sit on fixed lavender, which is also the fallback when a -wallpaper is too grey to snap. Qt and GTK apps only reread a theme on restart, +avoid. If you change `signature_color()`, verify it still writes nothing. + +`colors.json` is the one pywal file `udt-accent` does rewrite, and it rewrites +it wholesale rather than editing it: a fixed Macchiato palette with the accent +in the cursor and the two highlight slots. That is deliberate. pywalfox reads +`colors.json` and nothing else, so it is the only way Firefox can follow the +accent, and overwriting it costs nothing because nothing else reads it. In +particular kitty reads `~/.config/kitty/current-theme.conf`, not this file, so +the terminal palette stays fixed no matter what the wallpaper looks like. The +write lands after `wallp` has already run `wal --theme`, so it wins; reorder +those two and pywal's wallpaper-derived colours come back. + +Not everything tracks the wallpaper. rofi, dunst, Hyprland borders and Firefox +do; conky, Qt, GTK and waybar sit on fixed lavender, which is also the fallback +when a wallpaper is too grey to snap. Qt and GTK apps only reread a theme on restart, so a moving accent there would leave running apps disagreeing with new ones. ## Verifying visual changes @@ -104,6 +114,7 @@ them by exit code: rofi exits non-zero for ordinary reasons such as Escape. | --- | --- | | rofi | nothing; the theme is read per launch | | dunst | `udt-accent` restarts it | +| Firefox | `udt-accent` runs `pywalfox update` | | Hyprland | `hyprctl reload` | | waybar | `killall -SIGUSR2 waybar` | | kitty | `pkill -USR1 -x kitty` | |
