aboutsummaryrefslogtreecommitdiff
path: root/bin/executable_swaybg-random
diff options
context:
space:
mode:
authorRyan Kavanagh <rak@rak.ac>2024-09-08 12:18:34 -0400
committerRyan Kavanagh <rak@rak.ac>2024-09-08 12:18:34 -0400
commit174a841d7e4ec0fd31c98422bc49ebe45071ff65 (patch)
tree007cf977bedb2924645009031822378ea02ca828 /bin/executable_swaybg-random
parentmake default neomutt printer pdf (diff)
parentfix thread sorting neomutt (diff)
Merge remote-tracking branch 'refs/remotes/origin/master'
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