350fb4fe59
Profile-based dotfiles with switchable color themes. Structure: profiles/ with themes/ and config/ per profile.
11 lines
397 B
Bash
Executable File
11 lines
397 B
Bash
Executable File
#!/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
|