aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/udt-palette65
1 files changed, 3 insertions, 62 deletions
diff --git a/bin/udt-palette b/bin/udt-palette
index 86c53d6..e000999 100755
--- a/bin/udt-palette
+++ b/bin/udt-palette
@@ -29,7 +29,7 @@ SELECTOR = Path.home() / ".config" / "udt" / "roles.conf"
SELECTOR_SEED = PALETTE_DIR / "roles.conf.default"
# The Lua dashboard lives in its own repo; UDT only renders its colours.
-# A sibling checkout, like waybar-theme-udt; skipped when it is not cloned.
+# A sibling checkout, skipped when it is not cloned.
CONKY_REPO = REPO.parent / "conky-theme-udt"
GRUB_REPO = REPO.parent / "grub-theme-udt"
@@ -177,64 +177,6 @@ def gen_rofi(res, scheme, palette):
)
-def gen_waybar(res, scheme, palette):
- """waybar: one file holding the palette and the role layer.
-
- Both halves together because the stylesheet imports a single theme.css and
- references names from each: @lavender and @surface1 by Catppuccin name,
- @main-bg and @hover-bg by role.
-
- There are no per-module colours. The old bar alternated module backgrounds
- so it read as stripes, and carried a role per module to do it. The current
- one draws every pill on @main-bg, which left those ten roles with no
- consumer: emitting them anyway would be ten colours nothing reads, and the
- next reader would reasonably assume something did.
-
- The Catppuccin-named half is emitted from roles, exactly as gen_rofi does
- and for the same reason: styles/main.css and styles/global.css are edited
- in place, not generated, and ask for @surface1 and @text outright. Tokyo
- Night calls those surface_alt and fg, so emitting only the scheme's own
- palette names left every such reference dangling and GTK fell back to a
- default, which is how the bar's separators went bright.
-
- Role names keep their existing hyphenated spelling (main-bg, not main_bg):
- the stylesheets reference them and are not generated.
- """
- palette_rows = "\n".join(f"@define-color {k:<12}{v};"
- for k, v in sorted(palette.items()))
-
- # 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)
-
- def emit(role, css_name=None):
- c = res[role]
- return f"@define-color {(css_name or role.replace('_', '-')):<12}{rgba(c)};"
-
- ui = ["main_br", "main_bg", "main_fg", "hover_bg", "hover_fg", "outline"]
- states = ["warning", "critical"]
-
- return "\n".join([
- f"/* {BANNER.format(scheme=scheme)} */",
- "",
- palette_rows,
- "",
- "/* Catppuccin names, from roles: the hand-edited stylesheets use these. */",
- compat_rows,
- "",
- "/* br - border, bg - background, fg - foreground */",
- "",
- "/* main colors */",
- f"@define-color accent {rgba(res['accent'])};",
- *(emit(r) for r in ui),
- "",
- "/* state colors */",
- *(emit(r) for r in states),
- "",
- ])
-
-
def gen_kitty(res, scheme, palette):
"""kitty: the 16 ANSI slots plus chrome.
@@ -664,7 +606,7 @@ def gen_sublime_theme(res, scheme, palette, template):
The accent is the scheme's fixed one, not the wallpaper's: Sublime reads a
theme once per window, so a moving accent would leave open windows
- disagreeing with new ones. Same reasoning as conky, Qt, GTK and waybar.
+ disagreeing with new ones. Same reasoning as conky, Qt and GTK.
"""
out = template.replace("@SCHEME@", scheme)
for role in ("bg", "bg_alt", "bg_deep", "fg", "fg_dim", "fg_faint",
@@ -803,7 +745,7 @@ def gen_btop(res, scheme, palette):
btop has no include or variables, so every key is written. The graphs are
three-stop gradients; they run through the state colours so a meter reads
- the same way a waybar pill does, calm to critical.
+ calm to critical.
"""
def c(role):
return hex6(res[role])
@@ -947,7 +889,6 @@ def gen_feishin(res, scheme, palette):
TARGETS = [
("rofi/udt/palette.rasi", gen_rofi, None),
- ("templates/waybar/theme.css", gen_waybar, None),
("templates/terminal/kitty-theme.conf", gen_kitty, None),
("templates/hyprlock/hyprlock-palette.conf", gen_hyprlock, None),
("templates/nvim/udt.lua", gen_nvim, None),