main
Ian Mancini 5 years ago
parent dbcf368f89
commit 5790bfcc72

@ -1,13 +1,16 @@
#!/bin/sh #!/bin/sh
[ -f "$1" ] || exit 1 [ -e "$1" ] || exit 1
if [ -d $1 ]; then if [ -d $1 ]; then
bg=$(ls $1 | shuf -n 1) bg=$(ls $1 | shuf -n 1)
bg="$1/$bg"
elif [ -f $1 ]; then elif [ -f $1 ]; then
bg=$1 bg=$1
else else
exit 1 exit 1
fi fi
echo $bg
feh --bg-fill "$bg" feh --bg-fill "$bg"

Loading…
Cancel
Save