dotfiles/private_dot_config/hypr/scripts/executable_reloadwallpaper.sh
2025-04-09 14:07:55 +02:00

10 lines
327 B
Bash

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