dotfiles/hypr/scripts/wallpaper.sh
2025-05-16 13:16:22 -05:00

15 lines
410 B
Bash
Executable File

#!/usr/bin/env zsh
WALLPAPER_DIR="$HOME/Pictures/wallpaper/"
CURRENT_WALL=$(hyprctl hyprpaper listloaded)
MONITOR="HDMI-A-1"
# Get a random wallpaper that is not the current one
WALLPAPER=$(find "$WALLPAPER_DIR" -type f ! -name "$(basename "$CURRENT_WALL")" | shuf -n 1)
# Ensure we unload them all
hyprctl hyprpaper unload all
# Apply the selected wallpaper
hyprctl hyprpaper reload $MONITOR,"$WALLPAPER"