I copied this right off of your post.
#!/bin/bash
[ ! -e /usr/bin/wlr-randr ] && echo -e "\e[31mError\e[0m: wlr-randr is missing\n==> sudo apt install wlr-randr" && exit 1
list_scale="1.25 2 1.75"
output="DSI-1"
current_scale=$(wlr-randr --output "${output}" | grep 'Scale:' | awk '{ print $2 }')
next_scale=${list_scale%% *}
flg_found=0
for scale in ${list_scale} ; do
if [ $flg_found -eq 0 ] ; then
len=${#scale}
[ "${scale}" == "${current_scale:0:$len}" ] && flg_found=1
continue
fi
next_scale=${scale}
break;
done