diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-15 17:35:19 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-15 17:35:19 +0200 |
| commit | 9bd8152604fcf3ece6a2ba08819e6d7c5ee7fe57 (patch) | |
| tree | 5885a50c60c2368c7715311d8cf3df1a0b7d4e1e | |
| parent | a595fc7ca575de9de87f1311f3113f6fd4c6c326 (diff) | |
| download | waybar-theme-udt-9bd8152604fcf3ece6a2ba08819e6d7c5ee7fe57.tar.gz waybar-theme-udt-9bd8152604fcf3ece6a2ba08819e6d7c5ee7fe57.zip | |
feat(install): skip the palette run when udt has already done it
udt's install.sh calls this script now, so that a scheme switch reaches all
three generated files rather than only the stylesheet. It has run udt-palette
immediately beforehand, so UDT_PALETTE_DONE=1 says so and this script does not
repeat it. Run directly, with the variable unset, it still generates the
palette first and works standalone.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
| -rw-r--r-- | README.md | 27 | ||||
| -rwxr-xr-x | install.sh | 7 |
2 files changed, 26 insertions, 8 deletions
@@ -109,13 +109,26 @@ generic, so the bar does not lie when the application on a workspace changes. ## Colours -This repo holds the bar; udt holds the palette. `styles/theme.css` is -generated by `udt-palette` and gitignored, like every other generated file in -that project. - -The dot scripts are bash and cannot read `@define-color`, so `install.sh` -writes `~/.config/waybar-udt/dots.colors` for them to source. Both fall back to -Macchiato values when it is missing, so they still run standalone. +This repo holds the bar; udt holds the palette. The palette reaches the bar as +three generated files, all written by this repo's `install.sh`: + +| File | For | +| --- | --- | +| `styles/theme.css` | every `@name` the stylesheets reference | +| `dots.colors` | the two dot scripts, which are bash and cannot read `@define-color` | +| `slackware.svg`, `slackware-light.svg` | the launcher mark, tinted for each state | + +All three are generated, so all three have to be rewritten when the scheme +changes. **`udt/install.sh` calls this script** to do that, rather than +copying the stylesheet itself: copying only `theme.css` recoloured the pills +and left the dots and the mark on the previous scheme. + +So a scheme switch is still one command, `udt/install.sh`, and this script is +what you run after editing the bar. Running it directly regenerates the +palette first; called from udt it skips that, since udt has just done it. + +The dot scripts fall back to Macchiato values when `dots.colors` is missing, +so they still run standalone. ## Layout of this repo @@ -30,7 +30,12 @@ if [ -z "$udt" ]; then echo " expected at $repo/../unified-desktop-theme" >&2 exit 1 fi -"$udt/bin/udt-palette" + +# udt's install.sh calls this script, and it has already run udt-palette by +# then. Running it again would be harmless but pointless, so it says so. +if [ "${UDT_PALETTE_DONE:-}" != "1" ]; then + "$udt/bin/udt-palette" +fi install -Dm644 "$udt/templates/waybar/theme.css" "$target/styles/theme.css" # The dot scripts are bash, not CSS, so they cannot read @define-color. Write |
