swayDotfiles/swaybg.sh

12 lines
254 B
Bash
Executable File

#!/bin/sh
swaybg -i $(find ~/git/Wallpapers/img/ -type f | shuf -n1) -m fill &
OLD_PID=$!
while true; do
sleep 295
swaybg -i $(find ~/git/Wallpapers/img/ -type f | shuf -n1) -m fill &
NEXT_PID=$!
sleep 5
kill $OLD_PID
OLD_PID=$NEXT_PID
done