From 842f25460ba7034e8828e37b9e9431d5a2d11afa Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 11 Sep 2026 16:30:21 +0200 Subject: feat(accent): generate a QML palette for quickshell udt-accent now writes ~/.cache/wal/udt-palette.qml alongside the accent, border and colors.json it already produced. Quickshell components read it and watch it, so editing the palette here recolours a running shell without restarting it. Unlike the other outputs this one is not only the accent: it carries the structural colours too. Those are parsed out of rofi/udt/palette.rasi rather than restated in the script, so that file stays the single place the Macchiato values are written down. Hardcoding them a second time here is exactly the drift this is meant to remove: the quickshell components each had their own copy before this. The atomic write that write_border already did by hand is now a helper, write_atomic, used by both. Every generated file is watched by something, and a torn read shows up as a theme that briefly loses its colours. colors.json is untouched by this change, verified by running the script before and after and comparing. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01G7NRsGyF9jGfPYS4zPqpN7 --- AGENTS.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'AGENTS.md') diff --git a/AGENTS.md b/AGENTS.md index bd67064..cf9f914 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -19,10 +19,17 @@ 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 four things: `~/.cache/wal/udt-accent.rasi` (rofi), +It writes five 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). +`~/.cache/wal/dunstrc`, `~/.cache/wal/colors.json` (Firefox, via +pywalfox), and `~/.cache/wal/udt-palette.qml` (quickshell). + +The QML palette is the one output that is not only the accent: it carries +the whole structural palette too, parsed out of `rofi/udt/palette.rasi` +rather than duplicated in the script. That file stays the single place the +Macchiato values are written down. Quickshell components watch the generated +file and re-read it in place, so a palette edit reaches a running shell +without restarting it; see the `quickshell` repo alongside this one. **Extraction is deliberately isolated from the pywal cache.** It calls `pywal.backends.colorz.get()` directly, which returns a list and writes nothing. -- cgit v1.2.3