diff options
Diffstat (limited to 'bin/executable_swaybg-random')
-rw-r--r-- | bin/executable_swaybg-random | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/executable_swaybg-random b/bin/executable_swaybg-random index ac80495..6184e33 100644 --- a/bin/executable_swaybg-random +++ b/bin/executable_swaybg-random @@ -4,6 +4,11 @@ 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 |