diff options
| -rwxr-xr-x | copy.sh | 1 | ||||
| -rw-r--r-- | scripts/lib_prompts.sh | 5 |
2 files changed, 2 insertions, 4 deletions
@@ -360,7 +360,6 @@ if [[ "$EDITOR_SET" -eq 0 ]] && command -v vim &>/dev/null; then fi printf "\n" -echo "${INFO} Awaiting monitor resolution selection (1=<1440p, 2=≥1440p)..." 2>&1 | tee -a "$LOG" resolution=$(prompt_resolution_choice) echo "${OK} You have chosen $resolution resolution." 2>&1 | tee -a "$LOG" if [ "$resolution" == "< 1440p" ]; then diff --git a/scripts/lib_prompts.sh b/scripts/lib_prompts.sh index ae493842..45772abb 100644 --- a/scripts/lib_prompts.sh +++ b/scripts/lib_prompts.sh @@ -119,9 +119,8 @@ prompt_resolution_choice() { echo "$YELLOW -- Enter 1. for monitor resolution less than 1440p (< 1440p)" echo "$YELLOW -- Enter 2. for monitor resolution equal to or higher than 1440p (≥ 1440p)" - echo -n "$CAT Enter the number of your choice (1 or 2): " - read choice - case $choice in + read -r -p "${CAT} Enter the number of your choice (1 or 2): " choice + case "$choice" in 1) echo "< 1440p"; return ;; 2) echo "≥ 1440p"; return ;; *) echo "${ERROR} Invalid choice. Please enter 1 for < 1440p or 2 for ≥ 1440p." ;; |
