aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/udt-palette18
1 files changed, 13 insertions, 5 deletions
diff --git a/bin/udt-palette b/bin/udt-palette
index 95b9092..7f53e88 100755
--- a/bin/udt-palette
+++ b/bin/udt-palette
@@ -27,6 +27,9 @@ PALETTE_DIR = REPO / "palette"
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.
+CONKY_REPO = Path("~/Programming/GIT/conky-theme-udt").expanduser()
+
def parse_conf(path):
"""Parse `key = value` lines into a dict, preserving order.
@@ -543,15 +546,20 @@ def gen_sublime_theme(res, scheme, palette, template):
def gen_conky(res, scheme, palette, template):
- """conky: substitute into the shipped template.
+ """conky: substitute into the dashboard template.
- conky.text is laid out with absolute ${goto} offsets tuned to label widths,
- so it is never regenerated, only its colour block is substituted.
+ The template lives in the conky-theme-udt repo, which owns the Lua
+ dashboard; this only fills in the colours. `critical` is included for the
+ dashboard's error overlay, which draws a caught Lua error on screen because
+ conky otherwise reports one as a blank window.
"""
out = template.replace("@SCHEME@", scheme)
for role in ("heading", "label", "rule", "value", "highlight", "ok",
- "body", "body_outline", "body_shade"):
+ "body", "body_outline", "body_shade", "critical"):
out = out.replace(f"@{role.upper()}@", hex6(res[role]))
+ # own_window_colour takes '#AARRGGBB', so the window background needs the
+ # shade colour without its leading '#' to sit after the alpha pair.
+ out = out.replace("@BODY_SHADE_RAW@", hex6(res["body_shade"]).lstrip("#"))
return out
@@ -651,7 +659,7 @@ TARGETS = [
("rofi/udt/palette.rasi", gen_rofi, None),
("templates/waybar/theme.css", gen_waybar, None),
("templates/terminal/kitty-theme.conf", gen_kitty, None),
- ("templates/conky.conf", gen_conky, "templates/conky.conf.in"),
+ (str(CONKY_REPO / "conky.conf"), gen_conky, str(CONKY_REPO / "conky.conf.in")),
("bin/udt_colors.py", gen_accent_py, None),
("templates/homepage/custom.css", gen_homepage, None),
("templates/obsidian/udt.css", gen_obsidian, None),