mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-25 22:36:03 +00:00
Remove bashism out of setprimarymonitor (#464)
Co-authored-by: nnyyxxxx <nnyyxxxx@users.noreply.github.com>
This commit is contained in:
parent
d2b4875751
commit
0e1ee966ae
|
@ -20,7 +20,8 @@ set_primary_monitor() {
|
||||||
i=$((i + 1))
|
i=$((i + 1))
|
||||||
done
|
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
|
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}"
|
printf "%b\n" "${RED}Invalid selection.${RC}"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user