dotfiles/.local/bin/scripts/wallpaper
2025-07-20 12:57:27 -04:00

11 lines
278 B
Bash
Executable file

#!/bin/bash
directory=$XDG_DATA_HOME/wallpapers
if [ -d "$directory" ]; then
random_background=$(ls $directory/*.{JPG,jpg,png} | shuf -n 1)
hyprctl hyprpaper unload all
hyprctl hyprpaper preload $random_background
hyprctl hyprpaper wallpaper ",$random_background"
fi