fix: update paths from old colorschemes dir to active_theme/active_profile

This commit is contained in:
2026-04-21 17:53:22 +02:00
parent 350fb4fe59
commit 90e993aa96
2 changed files with 12 additions and 3 deletions
+5 -3
View File
@@ -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