add randomiser for wallpapers hyprpaper
This commit is contained in:
10
scripts/.config/scripts/random-hyprpaper.sh
Executable file
10
scripts/.config/scripts/random-hyprpaper.sh
Executable 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"
|
||||
Reference in New Issue
Block a user