blob: ac8049583ff5860713b0cf7adb9a1dea8b7c5aa4 (
plain) (
tree)
|
|
#!/bin/sh
# Usage: swaybg-random directory
DIR=$1
PIDFILE=$XDG_RUNTIME_DIR/swaybg.pid
swaybg -i $(find $DIR/. -type f | shuf -n1) -m fill -o \* &
NEWPID=$!
pkill -F $PIDFILE
echo $NEWPID > $PIDFILE
|