solorice/local/bin/swap-wallpaper
Kristofers Solo 66f1040fc5
Update 2025-10-31
Update 2025-10-09

Update 2025-10-11

feat: add rose-pine gtk themes

Update 2025-10-16

Update 2025-10-23

Fix desktop niri

Update 2025-10-31
2025-10-31 12:13:54 +02:00

15 lines
482 B
Bash
Executable File

#!/usr/bin/env bash
WALLPAPER_DIR="$HOME/Pictures/wallpapers/Linux-Dynamic-Wallpapers/"
if pgrep -x "Hyprland" >/dev/null; then
CURRENT_WALL=$(hyprctl hyprpaper listloaded)
WALLPAPER=$(fd --type file --exclude "$(basename "$CURRENT_WALL")" . "$WALLPAPER_DIR" | shuf -nz 1)
hyprctl hyprpaper reload ,"$WALLPAPER"
else
WALLPAPER=$(fd --type file . "$WALLPAPER_DIR" | shuf -n 1)
pkill swaybg 2>/dev/null || true
swaybg -m fill -i "$WALLPAPER" &
disown
fi