350fb4fe59
Profile-based dotfiles with switchable color themes. Structure: profiles/ with themes/ and config/ per profile.
25 lines
900 B
Bash
Executable File
25 lines
900 B
Bash
Executable File
#!/bin/bash
|
|
THEME=$(basename "$(readlink "$HOME/.active_theme" 2>/dev/null)" 2>/dev/null || echo "unknown")
|
|
echo "$THEME" > ~/.cache/wal/current-theme
|
|
|
|
python3 ~/.config/wal/generate.py
|
|
|
|
# Symlinks (harmless to repeat)
|
|
ln -sf ~/.cache/wal/colors-hypr.conf ~/.config/hypr/colors.conf
|
|
ln -sf ~/.cache/wal/waybar-style.css ~/.config/waybar/style.css
|
|
ln -sf ~/.cache/wal/wofi-style.css ~/.config/wofi/style.css
|
|
|
|
# Apply Hyprland colors without full reload
|
|
bash ~/.cache/wal/hypr-apply.sh
|
|
|
|
# Restart waybar
|
|
pkill waybar; sleep 0.3; waybar &disown
|
|
|
|
# Switch wallpaper only if it changed
|
|
WALLPAPER=$(cat ~/.cache/wal/wallpaper 2>/dev/null)
|
|
PREV=$(cat ~/.cache/wal/wallpaper-active 2>/dev/null)
|
|
if [[ -n "$WALLPAPER" && "$WALLPAPER" != "None" && -f "$WALLPAPER" && "$WALLPAPER" != "$PREV" ]]; then
|
|
awww img "$WALLPAPER" --transition-type fade
|
|
echo "$WALLPAPER" > ~/.cache/wal/wallpaper-active
|
|
fi
|