randombg (255B)
1 #!/bin/sh 2 swaybg -i $(find /mnt/ssd/papes/. -type f | shuf -n1) -m fill & 3 OLD_PID=$! 4 while true; do 5 sleep 300 6 swaybg -i $(find /mnt/ssd/papes/. -type f | shuf -n1) -m fill & 7 NEXT_PID=$! 8 sleep 5 9 kill $OLD_PID 10 OLD_PID=$NEXT_PID 11 done