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=$( \
|
2022-11-27 11:04:53 -06:00
|
|
|
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 () {
|
2022-11-27 11:04:53 -06:00
|
|
|
displays=$(xrandr | grep -c ' connected')
|
2021-02-15 12:02:09 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
cmd=""
|
2022-11-27 11:04:53 -06:00
|
|
|
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
|