10 lines
276 B
Bash
Executable File
10 lines
276 B
Bash
Executable File
#!/bin/sh
|
|
|
|
bgloc="/tmp/bg"
|
|
dir="$HOME/img/wallpaper"
|
|
|
|
[ -f "$dir" ] && ln -sf "$(readlink -f "$dir")" "$bgloc"
|
|
[ -d "$dir" ] && ln -sf "$(find "$(readlink -f "$dir")" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc"
|
|
|
|
hsetroot -fill "$bgloc" >/dev/null 2>&1
|