blob: 9bcefa621b8f3c4b6ed21448abe08508046651ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/sh
WALLPAPERS_HOME=${1:-$HOME/pics/wallpapers}
# Get a random image file from the dir.
RAND_BG=$(find "$WALLPAPERS_HOME" -type f -name "*.jpeg" -o -name "*.jpg" -o -name "*.png" | shuf | head -n1)
# Set the image file as the background.
(command -v wbg > /dev/null || (echo "wbg is not installed." && exit 1) && \
# else
notify-send "Set background." && wbg "${RAND_BG}"
)
|