fix: update paths from old colorschemes dir to active_theme/active_profile
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
#!/bin/bash
|
||||
# Preloads all theme wallpapers at startup so switching is instant.
|
||||
THEME_DIR="$HOME/.config/wal/colorschemes/dark"
|
||||
THEMES_DIR="$HOME/.active_profile/themes"
|
||||
|
||||
for json in "$THEME_DIR"/*.json; do
|
||||
wp=$(python3 -c "import json,sys; c=json.load(open('$json')); print(c.get('wallpaper','None'))")
|
||||
for theme_dir in "$THEMES_DIR"/*/; do
|
||||
json="$theme_dir/colors.json"
|
||||
[[ ! -f "$json" ]] && continue
|
||||
wp=$(python3 -c "import json,os,sys; c=json.load(open('$json')); print(os.path.expanduser(c.get('wallpaper','None')))")
|
||||
if [[ -n "$wp" && "$wp" != "None" && -f "$wp" ]]; then
|
||||
hyprctl hyprpaper preload "$wp" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
@@ -34,6 +34,13 @@ if [[ -z "$current_theme" || ! "$current_theme" == "$PROFILE_DIR/themes/"* ]]; t
|
||||
echo " active theme -> $default_theme"
|
||||
fi
|
||||
|
||||
# Pre-create cache symlinks immediately so Hyprland never sees them missing
|
||||
# (avoids config errors if Hyprland re-reads its config during the dir swap)
|
||||
mkdir -p ~/.cache/wal
|
||||
[[ -f ~/.cache/wal/colors-hypr.conf ]] && ln -sf ~/.cache/wal/colors-hypr.conf ~/.config/hypr/colors.conf
|
||||
[[ -f ~/.cache/wal/waybar-style.css ]] && ln -sf ~/.cache/wal/waybar-style.css ~/.config/waybar/style.css
|
||||
[[ -f ~/.cache/wal/wofi-style.css ]] && ln -sf ~/.cache/wal/wofi-style.css ~/.config/wofi/style.css
|
||||
|
||||
# Install global scripts to ~/.local/bin
|
||||
mkdir -p "$HOME/.local/bin"
|
||||
for script in "$PROFILE_DIR/scripts/"*.sh; do
|
||||
|
||||
Reference in New Issue
Block a user