From 7b55910a786c7652ac80a576399ebd9f81a8ac72 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 11 Sep 2026 17:20:50 +0200 Subject: feat(palette): generate every themed config from one scheme Colours were written down five times: rofi's palette.rasi, the waybar theme, the kitty theme, the conky and dunst templates, and a MACCHIATO dict inside udt-accent. Changing scheme meant finding all five, and they had already drifted: the active waybar theme was Macchiato while theme.css next to it was Mocha, and nothing imported the latter. Now a scheme is two files. palette/.conf holds the colours under the scheme's own names, and palette/roles-.conf says what each is for. palette/roles.conf is one `scheme =` line selecting the pair. bin/udt-palette renders that into each consumer's syntax and install.sh runs it first. The role map is per-scheme rather than shared because the palettes are genuinely different shapes: Nord has no `base`, Dracula no `surface0`, and forcing Catppuccin's names onto them would have meant either renaming their colours or inventing values. A role names a palette colour with two optional modifiers, `name/75` for alpha and `name*50` for brightness. The second exists because GTK's shade() has no palette name to point at. Ships macchiato, tokyo-night, nord and dracula. --selftest resolves every role in every scheme and asserts they define the same set, so a scheme that cannot satisfy a consumer fails at install rather than when someone switches to it. Verified against the live configs: all 46 waybar colours resolve identically to the previously active theme including its alpha() and shade() derivations, the kitty theme is colour-for-colour identical, and the rofi palette has the same 26 values. Generated files are gitignored; switching scheme and switching back reproduces the originals. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_015gbjA2bmswN8jyPDKzrvqe --- templates/waybar/catppuccin-macchiato.css | 63 ------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 templates/waybar/catppuccin-macchiato.css (limited to 'templates/waybar') diff --git a/templates/waybar/catppuccin-macchiato.css b/templates/waybar/catppuccin-macchiato.css deleted file mode 100644 index d98b1cc..0000000 --- a/templates/waybar/catppuccin-macchiato.css +++ /dev/null @@ -1,63 +0,0 @@ -/* catppuccin macchiato */ - -@define-color rosewater #f4dbd6; -@define-color flamingo #f0c6c6; -@define-color pink #f5bde6; -@define-color mauve #c6a0f6; -@define-color red #ed8796; -@define-color maroon #ee99a0; -@define-color peach #f5a97f; -@define-color yellow #eed49f; -@define-color green #a6da95; -@define-color teal #8bd5ca; -@define-color sky #91d7e3; -@define-color sapphire #7dc4e4; -@define-color blue #8aadf4; -@define-color lavender #b7bdf8; -@define-color text #cad3f5; -@define-color subtext1 #b8c0e0; -@define-color subtext0 #a5adcb; -@define-color overlay2 #939ab7; -@define-color overlay1 #8087a2; -@define-color overlay0 #6e738d; -@define-color surface2 #5b6078; -@define-color surface1 #494d64; -@define-color surface0 #363a4f; -@define-color base #24273a; -@define-color mantle #1e2030; -@define-color crust #181926; - -/* - br - border - bg - background - fg - foreground -*/ - -/* main colors */ - -@define-color accent @lavender; -@define-color main-br @subtext0; -@define-color main-bg @crust; -@define-color main-fg @text; -@define-color hover-bg @base; -@define-color hover-fg alpha(@main-fg, 0.75); -@define-color outline shade(@main-bg, 0.5); - -/* module colors */ - -@define-color workspaces @mantle; -@define-color temperature @mantle; -@define-color memory @base; -@define-color cpu @surface0; -@define-color time @surface0; -@define-color date @base; -@define-color tray @mantle; -@define-color volume @mantle; -@define-color backlight @base; -@define-color battery @surface0; - -/* state colors */ - -@define-color warning @yellow; -@define-color critical @red; -@define-color charging @green; -- cgit v1.2.3