dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/.local/bin/randbg

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