aboutsummaryrefslogtreecommitdiffstats
path: root/install.sh
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-16 08:37:28 +0200
committerDanilo M. <danix@danix.xyz>2026-09-16 08:37:28 +0200
commitb970a0deaad3a6723fe5727a3db7b653ebb3e7a3 (patch)
tree2b85acb01b9c265f657546690addeeb389a229fd /install.sh
parent593b8a65eda7ba9f7c7341ef5c1584b92bfda9c4 (diff)
downloadunified-desktop-theme-b970a0deaad3a6723fe5727a3db7b653ebb3e7a3.tar.gz
unified-desktop-theme-b970a0deaad3a6723fe5727a3db7b653ebb3e7a3.zip
refactor(cache): move the generated files to ~/.cache/udt
They lived in ~/.cache/wal because pywal owned that directory and udt-accent was written alongside a pywal run. Nothing on this desktop invokes pywal any more: the wal binary is unused, and udt-accent imports pywal.backends.colorz as a quantisation library, which writes nothing. Sharing the cache only left the ownership ambiguous. colors.json is the one file that cannot move. pywalfox hardcodes <cache>/wal/colors.json and honours only XDG_CACHE_HOME, which would relocate every cache on the system, so udt-accent writes the real file to ~/.cache/udt and install.sh symlinks the old path at it. ~/.cache/wal now holds that link and nothing else. Consumers repointed here: install.sh, udt-accent, launcher.rasi's @WPAPER@. Outside the repo, wallp, Hyprland's look_and_feel.lua and quickshell's shared/Theme.qml move with it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh22
1 files changed, 15 insertions, 7 deletions
diff --git a/install.sh b/install.sh
index 6d56fd3..0fe2575 100755
--- a/install.sh
+++ b/install.sh
@@ -7,7 +7,7 @@ set -euo pipefail
repo="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
target="$HOME/.config/rofi/udt"
-mkdir -p "$target" "$HOME/bin" "$HOME/.cache/wal"
+mkdir -p "$target" "$HOME/bin" "$HOME/.cache/udt"
# Generate every themed config from the selected scheme first: the rofi palette
# symlinked below is one of its outputs, so this has to run before anything is
@@ -30,15 +30,23 @@ done
# from the wal cache and cannot be committed. Regenerating it is why re-running
# this script after moving the repo is safe.
rm -f "$target/launcher.rasi"
-sed "s|@WPAPER@|$HOME/.cache/wal/wpaper|" \
+sed "s|@WPAPER@|$HOME/.cache/udt/wpaper|" \
"$repo/rofi/udt/launcher.rasi" > "$target/launcher.rasi"
# Seed the generated accent if it does not exist yet, so themes parse on a
# fresh install before any wallpaper has been set.
-if [ ! -f "$HOME/.cache/wal/udt-accent.rasi" ]; then
- cp "$repo/rofi/udt/accent.rasi" "$HOME/.cache/wal/udt-accent.rasi"
+if [ ! -f "$HOME/.cache/udt/udt-accent.rasi" ]; then
+ cp "$repo/rofi/udt/accent.rasi" "$HOME/.cache/udt/udt-accent.rasi"
fi
-ln -sfn "$HOME/.cache/wal/udt-accent.rasi" "$target/accent.rasi"
+ln -sfn "$HOME/.cache/udt/udt-accent.rasi" "$target/accent.rasi"
+
+# Firefox's bridge is the one consumer that cannot follow: pywalfox hardcodes
+# <cache>/wal/colors.json and honours only XDG_CACHE_HOME, which would move
+# every cache on the system. So udt-accent writes the real file with the rest
+# of the palette and this points pywalfox at it, leaving ~/.cache/wal holding
+# nothing but the link.
+mkdir -p "$HOME/.cache/wal"
+ln -sfn "$HOME/.cache/udt/colors.json" "$HOME/.cache/wal/colors.json"
ln -sfn "$repo/bin/udt-accent" "$HOME/bin/udt-accent"
ln -sfn "$repo/bin/udt-palette" "$HOME/bin/udt-palette"
@@ -153,8 +161,8 @@ command -v hyprctl >/dev/null 2>&1 && hyprctl reload >/dev/null 2>&1 && reloaded
# udt-accent regenerates the accent. It needs a wallpaper to read; without one
# the accent keeps its current value. Quickshell watches the palette it writes,
# so notifications and the rest of the shell follow without a restart.
-if command -v udt-accent >/dev/null 2>&1 && [ -e "$HOME/.cache/wal/wpaper" ]; then
- udt-accent "$HOME/.cache/wal/wpaper" >/dev/null 2>&1 && reloaded="$reloaded accent"
+if command -v udt-accent >/dev/null 2>&1 && [ -e "$HOME/.cache/udt/wpaper" ]; then
+ udt-accent "$HOME/.cache/udt/wpaper" >/dev/null 2>&1 && reloaded="$reloaded accent"
fi
# conky has no hot-reload and nothing respawns it, so it is restarted only if