diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-25 20:23:01 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-25 20:23:01 +0200 |
| commit | 0a05e36fe5912ac6f26f2c3ecea84c8b29a3fc8a (patch) | |
| tree | a86ab22a070d54ef94ccdc778356dc932b58f7e5 | |
| parent | f41b13763194b4a733af0b021bab8cfdc441920d (diff) | |
| download | unified-desktop-theme-0a05e36fe5912ac6f26f2c3ecea84c8b29a3fc8a.tar.gz unified-desktop-theme-0a05e36fe5912ac6f26f2c3ecea84c8b29a3fc8a.zip | |
feat(palette): emit peach, mauve and termblue for quickshell
palette.rasi is what udt-accent forwards to quickshell as
udt-palette.qml, and the keybind reminder there draws the macropad's
orange, purple and blue keycaps. peach and mauve come from the peach
and highlight roles every scheme defines; mauve used to be added only
to waybar's compat list, which now reads it from ROFI_NAMES instead of
defining it twice.
The existing "blue" name carries the active-border role, magenta under
candy-night, so the terminal's blue goes out as termblue. The first
spelling, term_blue, made rofi reject palette.rasi and with it every
theme; AGENTS.md now says so next to the selftest.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| -rw-r--r-- | AGENTS.md | 6 | ||||
| -rwxr-xr-x | bin/udt-palette | 11 |
2 files changed, 13 insertions, 4 deletions
@@ -256,7 +256,11 @@ them by exit code: rofi exits non-zero for ordinary reasons such as Escape. rofi does not expand `~` inside a `url()`. - After editing anything under `rofi/udt/` or `palette/`, run `./install.sh`. - `bin/udt-palette --selftest` resolves every role in every scheme. Run it - after touching a palette, a role map, or the generator. + after touching a palette, a role map, or the generator, and before + regenerating: `palette.rasi` is live the moment it is written. A name in + `ROFI_NAMES` must be letters and digits only; rofi rejects `term_blue` and + then no theme on the desktop parses, which the selftest catches and a + regeneration does not. - `bin/udt-accent --selftest` covers the snapping logic. Run it after touching the colour maths. diff --git a/bin/udt-palette b/bin/udt-palette index 04451f7..f603899 100755 --- a/bin/udt-palette +++ b/bin/udt-palette @@ -145,6 +145,12 @@ ROFI_NAMES = [ ("overlay0", "fg_faint"), ("overlay1", "mid_low"), ("overlay2", "mid_high"), ("red", "critical"), ("green", "success"), ("yellow", "warning"), ("teal", "info"), ("blue", "border_active"), ("lavender", "accent"), + # Not referenced by any rofi theme. Here because palette.rasi is also + # what udt-accent forwards to quickshell, whose keybind reminder draws + # the macropad's orange, purple and blue keycaps in them. "blue" above is + # the active border, which is magenta under candy-night; termblue is the + # terminal's blue, a real blue in every scheme but Dracula, which has none. + ("peach", "peach"), ("mauve", "highlight"), ("termblue", "blue"), ] @@ -192,11 +198,10 @@ def gen_waybar(res, scheme, palette): palette_rows = "\n".join(f"@define-color {k:<12}{v};" for k, v in sorted(palette.items())) - # The names the hand-edited stylesheets reference. ROFI_NAMES already maps - # most of them; mauve is the one waybar uses and rofi does not. + # The names the hand-edited stylesheets reference, all in ROFI_NAMES. compat_rows = "\n".join( f"@define-color {name:<12}{rgba(res[role])};" - for name, role in [*ROFI_NAMES, ("mauve", "highlight")]) + for name, role in ROFI_NAMES) def emit(role, css_name=None): c = res[role] |
