aboutsummaryrefslogtreecommitdiff
path: root/bin/executable_swaybg-random
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2024-09-08 12:16:31 -0400
committerRyan Kavanagh <rak@rak.ac>2024-09-08 12:16:31 -0400
commitfd7a467d8430682ad665a3db0b6e60aeea4c721f (patch)
tree4373c8b19ea2761008937a3b6c6e8fcc8cf31ddf /bin/executable_swaybg-random
parentinstall wc-mode (diff)
swaybg randomize background hourly
Diffstat (limited to '')
-rw-r--r--bin/executable_swaybg-random13
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