always pick an image from the first 120
This commit is contained in:
parent
478ac040df
commit
d268275ace
1 changed files with 3 additions and 0 deletions
|
@ -75,6 +75,9 @@ if [ "${NO_OF_IMAGES}" -eq 0 ]; then
|
||||||
echo "No wallpapers available for current configuration" >&2
|
echo "No wallpapers available for current configuration" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if [ "${NO_OF_IMAGES}" -gt 120 ]; then
|
||||||
|
NO_OF_IMAGES=120
|
||||||
|
fi
|
||||||
RANDOM_ITEM="$(shuf -i 0-$((NO_OF_IMAGES-1)) -n 1 --random-source=/dev/urandom)"
|
RANDOM_ITEM="$(shuf -i 0-$((NO_OF_IMAGES-1)) -n 1 --random-source=/dev/urandom)"
|
||||||
ITEM_PAGE=$((RANDOM_ITEM/24))
|
ITEM_PAGE=$((RANDOM_ITEM/24))
|
||||||
ITEM_NUMBER=$((RANDOM_ITEM%24))
|
ITEM_NUMBER=$((RANDOM_ITEM%24))
|
||||||
|
|
Loading…
Reference in a new issue