You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
171 B

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