#!/bin/bash # Preloads all theme wallpapers at startup so switching is instant. THEMES_DIR="$HOME/.active_profile/themes" 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 done