From da32590d0cf8816bcb61f485ad609f05125ff2e0 Mon Sep 17 00:00:00 2001 From: Peter Pham Date: Tue, 2 Jul 2024 22:37:59 -0700 Subject: [PATCH] fix syntax in reading user defined custom resolution. It should be fed as an array into the create_res function --- hidpi.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hidpi.sh b/hidpi.sh index f9c368f..74d2008 100755 --- a/hidpi.sh +++ b/hidpi.sh @@ -716,8 +716,13 @@ function end() { # custom resolution function custom_res() { echo "${langCustomRes}" - read -p ":" res - create_res ${res} + read -p ":" input_resolutions + + # Split the input into an array + IFS=' ' read -r -a resolution_array <<< "$input_resolutions" + + # Call the create_res function with the array elements + create_res "${resolution_array[@]}" } # create resolution