#!/usr/bin/env sh ###################################################################### # @author : pico (pico@$HOSTNAME) # @file : randomize_hyprpaper # @created : Sunday Jun 08, 2025 18:03:22 CST # # @description : ###################################################################### WALLPAPER_DIR="$HOME/data/pictures/wallpaper/" CURRENT_WALL=$(hyprctl hyprpaper listloaded) # Get the name of the focused monitor with hyprctl FOCUSED_MONITOR=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name') # Get a random wallpaper that is not the current one WALLPAPER=$(find "$WALLPAPER_DIR" -type f ! -name "$(basename "$CURRENT_WALL")" | shuf -n 1) hyprctl hyprpaper reload "$FOCUSED_MONITOR","$WALLPAPER"