#!/bin/bash # Preloads all theme wallpapers at startup so switching is instant. THEME_DIR="$HOME/.config/wal/colorschemes/dark" for json in "$THEME_DIR"/*.json; do wp=$(python3 -c "import json,sys; c=json.load(open('$json')); print(c.get('wallpaper','None'))") if [[ -n "$wp" && "$wp" != "None" && -f "$wp" ]]; then hyprctl hyprpaper preload "$wp" 2>/dev/null || true fi done