Remove bashism out of setprimarymonitor (#464)

Co-authored-by: nnyyxxxx <nnyyxxxx@users.noreply.github.com>
This commit is contained in:
Nyx 2024-09-18 14:32:53 -04:00 committed by GitHub
parent d2b4875751
commit 0e1ee966ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,7 +20,8 @@ set_primary_monitor() {
i=$((i + 1))
done
read -p "Enter the number of the monitor: " monitor_choice
printf "Enter the number of the monitor to arrange: "
read -r monitor_choice
if ! echo "$monitor_choice" | grep -qE '^[0-9]+$' || [ "$monitor_choice" -lt 1 ] || [ "$monitor_choice" -gt "$((i - 1))" ]; then
printf "%b\n" "${RED}Invalid selection.${RC}"