From 0e1ee966ae7e0abf1f1d3266a18dfaa796330992 Mon Sep 17 00:00:00 2001 From: Nyx <144965845+nnyyxxxx@users.noreply.github.com> Date: Wed, 18 Sep 2024 14:32:53 -0400 Subject: [PATCH] Remove bashism out of setprimarymonitor (#464) Co-authored-by: nnyyxxxx --- tabs/utils/monitor-control/set_primary_monitor.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tabs/utils/monitor-control/set_primary_monitor.sh b/tabs/utils/monitor-control/set_primary_monitor.sh index 143a8379..c1a70416 100755 --- a/tabs/utils/monitor-control/set_primary_monitor.sh +++ b/tabs/utils/monitor-control/set_primary_monitor.sh @@ -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}"