Files
dotfiles/.config/hypr/scripts/random_wallpaper.sh
2025-05-10 22:58:13 +02:00

10 lines
317 B
Bash
Executable File

#!/usr/bin/env bash
WALLPAPER_DIR="$HOME/wallpapers/"
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"