You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
510 B

#!/usr/bin/env bash
backgroundDir="$HOME/Pictures/wallpapers/"
background="$(ls "$backgroundDir" | /usr/bin/shuf -n 1 | /usr/bin/awk \
"{print \"$backgroundDir\" \$1}")"
echo "Wayland Display: $WAYLAND_DISPLAY"
if [ -n "$WAYLAND_DISPLAY" ]; then
while :; do
background="$(ls "$backgroundDir" | /usr/bin/shuf -n 1 | /usr/bin/awk \
"{print \"$backgroundDir\" \$1}")"
echo "I get here"
pkill swaybg
swaybg --mode fill -i "$background"
sleep 60
done
else
/usr/bin/feh --bg-fill "$background"
fi