diff options
Diffstat (limited to 'install.sh')
| -rwxr-xr-x | install.sh | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -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 |
