From a183b4a054d96f310d867b79d7b9fb7a6b875bb8 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 15 Sep 2026 17:35:15 +0200 Subject: fix(waybar): call the bar's installer instead of copying one file The palette reaches the bar as three generated files, not one: the stylesheet, dots.colors for the two dot scripts, which are bash and cannot read @define-color, and two tints of the Slackware mark, which has to contrast with the accent pill at rest and the dark pill on hover. Copying only the stylesheet meant a scheme switch recoloured every pill and left the dots and the mark on the previous scheme. Generating the other two here would have put a second writer on files the bar's own install.sh already writes, drifting apart the moment either side was edited. So this calls that script rather than reimplementing it, with UDT_PALETTE_DONE=1 so it skips the palette run this one has just done. Never fatal, like udt-appthemes: a failure there warns and leaves the bar on its old colours rather than stopping kitty, Kvantum and Sublime from being themed. Verified by switching tokyo-night to nord and back with only this script: the accent, DOT_SUCCESS and both mark tints followed in each direction. Co-Authored-By: Claude Opus 5 --- templates/waybar/README.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'templates') diff --git a/templates/waybar/README.md b/templates/waybar/README.md index 19c220c..a69f228 100644 --- a/templates/waybar/README.md +++ b/templates/waybar/README.md @@ -4,10 +4,21 @@ The bar is [waybar-theme-udt](../../../waybar-theme-udt), which lives in its own repository and its own config directory, `~/.config/waybar-udt/`. This project supplies only its colours. -`theme.css` is generated here and copied there by `install.sh`, under a fixed -name that the bar's stylesheet imports, so switching scheme rewrites the file -the running bar already reads. There is no import to repoint and no per-scheme -filename. +`theme.css` is generated here, but `install.sh` does not copy it there itself: +it calls the bar's own `install.sh`, with `UDT_PALETTE_DONE=1` so that script +skips regenerating the palette it has just been handed. + +That is because the palette reaches the bar as **three** generated files, not +one: `styles/theme.css`, `dots.colors` for the two dot scripts, which are bash +and cannot read `@define-color`, and two tints of the Slackware mark, which +has to contrast with the accent pill at rest and the dark pill on hover. +Copying only the stylesheet recoloured every pill and left the dots and the +mark on the previous scheme's colours. Generating them here instead would mean +two writers for the same files, drifting apart the moment either is edited. + +The call is never fatal: a failure in the bar's install warns and leaves the +bar on its old colours rather than stopping kitty, Kvantum and Sublime from +being themed. Same reasoning as `udt-appthemes`. ## What the bar asks for -- cgit v1.2.3