diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-11 17:42:14 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-11 17:42:14 +0200 |
| commit | 90d92490f83156a4a90c44b3837f1037cec80132 (patch) | |
| tree | e3ab0a62466b72120a63793a886ff19d5e28b8a4 /install.sh | |
| parent | 81f7686fe7d8edc5c020f33e8766d4de7c5beccd (diff) | |
| download | unified-desktop-theme-90d92490f83156a4a90c44b3837f1037cec80132.tar.gz unified-desktop-theme-90d92490f83156a4a90c44b3837f1037cec80132.zip | |
feat(palette): move the scheme selection out of the repo
The selector was tracked at palette/roles.conf, which made switching scheme a
committable change: the previous commit carried `scheme = tokyo-night` in its
diff purely because that was the theme running at the time.
Which theme a machine runs is local state, not a property of the project, so
the live file is now ~/.config/udt/roles.conf. install.sh seeds it from
palette/roles.conf.default on a first run and never overwrites it, so a
switch leaves the working tree clean and two machines sharing this repo can
run different schemes. udt-palette falls back to the seed when no live file
exists, so a bare checkout still generates.
This is the one exception to the repo holding the canonical copy of
everything, and AGENTS.md says so.
Verified: seeding on a missing file, the seed not overwriting an existing
choice, generation from the seed alone, and both selftests.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015gbjA2bmswN8jyPDKzrvqe
Diffstat (limited to 'install.sh')
| -rwxr-xr-x | install.sh | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -13,6 +13,11 @@ mkdir -p "$target" "$HOME/bin" "$HOME/.cache/wal" # symlinked below is one of its outputs, so this has to run before anything is # linked. It fails loudly if a role names a colour the scheme does not define, # which is the whole point of keeping the colours in one place. +selector="$HOME/.config/udt/roles.conf" +if [ ! -f "$selector" ]; then + install -Dm644 "$repo/palette/roles.conf.default" "$selector" + echo "seeded $selector" +fi "$repo/bin/udt-palette" # Theme files are symlinked individually; accent.rasi is NOT, it points at the @@ -41,7 +46,7 @@ ln -sfn "$repo/bin/udt-palette" "$HOME/bin/udt-palette" # The generated configs for everything that is not rofi. These are copied # rather than symlinked: each app owns its config file and mixes theme keys # with settings that are none of this repo's business. -scheme="$(sed -n 's/^scheme *= *//p' "$repo/palette/roles.conf")" +scheme="$(sed -n 's/^scheme *= *//p' "$selector")" # waybar reads whichever themes/<name>.css style.css imports, so write the file # under the scheme's own name and repoint the import. The older per-flavour |
