dotfiles/scripts/background.sh
2025-07-15 21:36:26 +02:00

10 lines
320 B
Bash

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