hyprpaper + changewallpaper script

This commit is contained in:
nomadics9 2024-10-08 22:47:49 +03:00
parent dba1951813
commit 996bd54bf1
8 changed files with 20 additions and 0 deletions

View file

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View file

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

2
hypr/hyprpaper.conf Normal file
View file

@ -0,0 +1,2 @@
preload =
wallpaper =

18
scripts/changewallpaper.sh Executable file
View file

@ -0,0 +1,18 @@
#!/usr/bin/env bash
DIR=$HOME/Desktop/wallpapers
PICS=($(ls ${DIR}))
# Select a random wallpaper
RANDOMPICS=${PICS[$RANDOM % ${#PICS[@]}]}
# Notify the user about the wallpaper change
dunstify "⬅Changed" -a "Wallpaper" -u "low" -i ${DIR}/${RANDOMPICS} -r "1234"
# Preload the selected wallpaper and set it as the wallpaper
hyprctl hyprpaper preload "${DIR}/${RANDOMPICS}"
hyprctl hyprpaper wallpaper ",${DIR}/${RANDOMPICS}"
# Play a notification sound
canberra-gtk-play -i window-attention