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
|
||||
|
||||
Reference in New Issue
Block a user