aboutsummaryrefslogtreecommitdiff
path: root/wallpaper/setRandomWP.sh
blob: 218e68b42db1439d81e9377f5b0db2fa17029d1e (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh

# Sets a random image as wallpaper and soft-links it from home folder.

wpsFolder="$CONFIG_FOLDER_RANDOMWP"
[ -z "$wpsFolder" ] && dunstify '$CONFIG_FOLDER_RANDOMWP env variable not set.' && exit 0
[ ! -d "$wpsFolder" ] && dunstify "'$CONFIG_FOLDER_RANDOMWP' folder does not exist." && exit 0
wpFile="$(find "$CONFIG_FOLDER_RANDOMWP" | shuf -n 1)"
wpPointer.sh "$wpFile"