diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-11 15:35:42 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-11 15:35:42 +0200 |
| commit | 578647bb5b13203fb285ce049136fe530c2821cb (patch) | |
| tree | ccb1b846b754a938cd2080e0e0ed796395e3a373 /AGENTS.md | |
| parent | 255abda1f07b5af89998713375d7d2e51915d933 (diff) | |
| download | unified-desktop-theme-578647bb5b13203fb285ce049136fe530c2821cb.tar.gz unified-desktop-theme-578647bb5b13203fb285ce049136fe530c2821cb.zip | |
feat: theme Firefox from the accent via pywalfox
udt-accent now rewrites ~/.cache/wal/colors.json as a fixed Catppuccin
Macchiato palette with the wallpaper's accent in the cursor and the two
highlight slots, then runs `pywalfox update`.
colors.json is the only file pywalfox reads, so this is the only way Firefox
can follow the accent. Overwriting it wholesale costs nothing: wallp already
rewrote it moments earlier via `wal --theme`, and nothing else consumes it.
kitty reads its own current-theme.conf, so the terminal palette is unaffected.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015gbjA2bmswN8jyPDKzrvqe
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` | |
