sway-dotfiles/wallpaper.sh

14 lines
276 B
Bash
Raw Normal View History

2023-01-30 08:19:14 +01:00
#!/bin/sh
2023-03-18 22:54:59 +01:00
dir=/home/gunalx/.config/sway/Wallpapers
swaybg -i $(find $dir -type f | shuf -n 1) -m fill &
2023-01-30 08:19:14 +01:00
OLD_PID=$!
while true; do
sleep 6000
2023-03-18 22:54:59 +01:00
swaybg -i $(find $dir -type f | shuf -n1) -m fill &
2023-01-30 08:19:14 +01:00
NEXT_PID=$!
sleep 5
kill $OLD_PID
OLD_PID=$NEXT_PID
done