dot_testing/utils/sh/wallpaper

33 lines
517 B
Plaintext
Raw Permalink Normal View History

2021-02-15 12:02:09 -06:00
#!/bin/sh
2021-02-16 22:59:36 -06:00
WALLDIR="${HOME}/.local/share/wallpapers"
2021-06-20 10:33:49 -05:00
BASECMD="feh --no-fehbg --bg-fill"
2021-02-15 12:02:09 -06:00
generate_wall () {
GENWALL=$( \
ls "$WALLDIR" | \
2021-02-15 17:16:23 -06:00
grep "." | \
2021-02-15 12:02:09 -06:00
shuf -n 1
)
GENWALL="${WALLDIR}/${GENWALL}"
}
wall () {
generate_wall
while [ "${GENWALL}" = "${1}" ]; do
generate_wall
done
}
displays () {
displays=$(xrandr | grep -c ' connected')
2021-02-15 12:02:09 -06:00
}
cmd=""
displays
for i in $(seq 1 "$displays"); do
wall "${tmp}"
tmp="${GENWALL}"
cmd="${cmd} ${GENWALL}"
done
eval "${BASECMD}" "${cmd}"
2021-02-15 12:02:09 -06:00
exit 0