diff --git a/packages/scripts/wallhaven.sh b/packages/scripts/wallhaven.sh index 7f7edf8..ac59683 100755 --- a/packages/scripts/wallhaven.sh +++ b/packages/scripts/wallhaven.sh @@ -75,6 +75,9 @@ if [ "${NO_OF_IMAGES}" -eq 0 ]; then echo "No wallpapers available for current configuration" >&2 exit 1 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)" ITEM_PAGE=$((RANDOM_ITEM/24)) ITEM_NUMBER=$((RANDOM_ITEM%24))