add randomiser for wallpapers hyprpaper

This commit is contained in:
Frodd
2025-08-29 11:13:23 +01:00
parent 365ff4c1c0
commit d1210eff48
3 changed files with 13 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
WALLPAPER_DIR="$HOME/.config/backgrounds/"
CURRENT_WALL=$(hyprctl hyprpaper listloaded)
# Get a random wallpaper that is not the current one
WALLPAPER=$(find "$WALLPAPER_DIR" -type f ! -name "$(basename "$CURRENT_WALL")" | shuf -n 1)
# Apply the selected wallpaper
hyprctl hyprpaper reload ,"$WALLPAPER"