diff options
author | Ryan Kavanagh <rak@rak.ac> | 2024-09-08 12:16:31 -0400 |
---|---|---|
committer | Ryan Kavanagh <rak@rak.ac> | 2024-09-08 12:16:31 -0400 |
commit | fd7a467d8430682ad665a3db0b6e60aeea4c721f (patch) | |
tree | 4373c8b19ea2761008937a3b6c6e8fcc8cf31ddf /bin | |
parent | install wc-mode (diff) |
swaybg randomize background hourly
Diffstat (limited to 'bin')
-rw-r--r-- | bin/executable_swaybg-random | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/bin/executable_swaybg-random b/bin/executable_swaybg-random index 6184e33..ba4baa1 100644 --- a/bin/executable_swaybg-random +++ b/bin/executable_swaybg-random @@ -1,15 +1,4 @@ #!/bin/sh # Usage: swaybg-random directory -DIR=$1 -PIDFILE=$XDG_RUNTIME_DIR/swaybg.pid - -if test -z "$DIR"; then - echo "Usage: swaybg-random dir" - exit 1 -fi - -swaybg -i $(find $DIR/. -type f | shuf -n1) -m fill -o \* & -NEWPID=$! -pkill -F $PIDFILE -echo $NEWPID > $PIDFILE +exec swaybg -i "$(find ~/bg/. -type f | shuf -n1)" -m fill |