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 --- palette/roles-nord.conf | 101 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 palette/roles-nord.conf (limited to 'palette/roles-nord.conf') diff --git a/palette/roles-nord.conf b/palette/roles-nord.conf new file mode 100644 index 0000000..b04e9c8 --- /dev/null +++ b/palette/roles-nord.conf @@ -0,0 +1,101 @@ +# Role assignments for Nord. +# Copyright (C) 2026 Danilo M. +# Licensed under the GNU General Public License v2 only. +# +# Nord's Polar Night (nord0..nord3) is the only dark group, so bg_deep reuses +# nord0 rather than inventing a darker shade. Nord has no pink or magenta, so +# the aurora purple fills both. + +[ui] +bg = nord0 +bg_alt = nord1 +bg_deep = nord0 +surface = nord1 +surface_alt = nord2 +border = nord3 + +fg = nord4 +fg_dim = nord4 +fg_faint = nord3 + +accent = frost_cyan + +[state] +warning = aurora_yellow +critical = aurora_red +success = aurora_green +info = frost_teal + +[waybar] +main_br = nord4 +main_bg = nord0 +main_fg = nord6 +hover_bg = nord1 +hover_fg = nord6/75 +outline = nord0*50 + +workspaces = nord1 +temperature = nord1 +memory = nord0 +cpu = nord2 +time = nord2 +date = nord0 +tray = nord1 +volume = nord1 +backlight = nord0 +battery = nord2 +charging = aurora_green + +[conky] +heading = frost_cyan +label = nord4 +rule = nord3 +value = frost_teal +highlight = aurora_purple +ok = aurora_green +body = nord6 +body_outline = nord3 +body_shade = nord1 + +[terminal] +cursor = nord4 +selection_bg = nord2 +selection_fg = nord6 +url = frost_cyan +tab_active_bg = aurora_purple +tab_active_fg = nord0 +tab_inactive_bg = nord1 +tab_inactive_fg = nord4 +border_active = frost_cyan +border_inactive = nord3 + +black = nord1 +red = aurora_red +green = aurora_green +yellow = aurora_yellow +blue = frost_blue +magenta = aurora_purple +cyan = frost_teal +white = nord5 + +bright_black = nord3 +bright_red = aurora_red +bright_green = aurora_green +bright_yellow = aurora_orange +bright_blue = frost_cyan +bright_magenta = aurora_purple +bright_cyan = frost_teal +bright_white = nord6 + +# kitty extras: marks, scrollbar, bell, tab bar ground. +mark1 = frost_cyan +mark2 = aurora_purple +mark3 = frost_teal +scrollbar_handle = nord3 +scrollbar_track = nord2 +bell_border = aurora_yellow +tab_bar_bg = nord0 + +[accents] +# Nord has nine usable hues, one fewer than Catppuccin. +snap = aurora_purple frost_blue aurora_red aurora_orange aurora_yellow aurora_green frost_teal frost_cyan frost_deep -- cgit v1.2.3