From 2ebbba9981c08acd86b9819db485f0b91d46520d Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Thu, 29 Aug 2024 15:59:23 -0500 Subject: [PATCH] fix resolutions --- src/commands/utils/monitor-control/auto_detect_displays.sh | 0 src/commands/utils/monitor-control/change_orientation.sh | 0 src/commands/utils/monitor-control/disable_monitor.sh | 0 src/commands/utils/monitor-control/duplicate_displays.sh | 0 src/commands/utils/monitor-control/enable_monitor.sh | 0 src/commands/utils/monitor-control/extend_displays.sh | 0 src/commands/utils/monitor-control/manage_arrangement.sh | 0 src/commands/utils/monitor-control/reset_scaling.sh | 0 src/commands/utils/monitor-control/scale_monitor.sh | 0 src/commands/utils/monitor-control/set_primary_monitor.sh | 0 src/commands/utils/monitor-control/set_resolutions.sh | 6 +++--- src/commands/utils/monitor-control/utility_functions.sh | 0 12 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 src/commands/utils/monitor-control/auto_detect_displays.sh mode change 100644 => 100755 src/commands/utils/monitor-control/change_orientation.sh mode change 100644 => 100755 src/commands/utils/monitor-control/disable_monitor.sh mode change 100644 => 100755 src/commands/utils/monitor-control/duplicate_displays.sh mode change 100644 => 100755 src/commands/utils/monitor-control/enable_monitor.sh mode change 100644 => 100755 src/commands/utils/monitor-control/extend_displays.sh mode change 100644 => 100755 src/commands/utils/monitor-control/manage_arrangement.sh mode change 100644 => 100755 src/commands/utils/monitor-control/reset_scaling.sh mode change 100644 => 100755 src/commands/utils/monitor-control/scale_monitor.sh mode change 100644 => 100755 src/commands/utils/monitor-control/set_primary_monitor.sh mode change 100644 => 100755 src/commands/utils/monitor-control/set_resolutions.sh mode change 100644 => 100755 src/commands/utils/monitor-control/utility_functions.sh diff --git a/src/commands/utils/monitor-control/auto_detect_displays.sh b/src/commands/utils/monitor-control/auto_detect_displays.sh old mode 100644 new mode 100755 diff --git a/src/commands/utils/monitor-control/change_orientation.sh b/src/commands/utils/monitor-control/change_orientation.sh old mode 100644 new mode 100755 diff --git a/src/commands/utils/monitor-control/disable_monitor.sh b/src/commands/utils/monitor-control/disable_monitor.sh old mode 100644 new mode 100755 diff --git a/src/commands/utils/monitor-control/duplicate_displays.sh b/src/commands/utils/monitor-control/duplicate_displays.sh old mode 100644 new mode 100755 diff --git a/src/commands/utils/monitor-control/enable_monitor.sh b/src/commands/utils/monitor-control/enable_monitor.sh old mode 100644 new mode 100755 diff --git a/src/commands/utils/monitor-control/extend_displays.sh b/src/commands/utils/monitor-control/extend_displays.sh old mode 100644 new mode 100755 diff --git a/src/commands/utils/monitor-control/manage_arrangement.sh b/src/commands/utils/monitor-control/manage_arrangement.sh old mode 100644 new mode 100755 diff --git a/src/commands/utils/monitor-control/reset_scaling.sh b/src/commands/utils/monitor-control/reset_scaling.sh old mode 100644 new mode 100755 diff --git a/src/commands/utils/monitor-control/scale_monitor.sh b/src/commands/utils/monitor-control/scale_monitor.sh old mode 100644 new mode 100755 diff --git a/src/commands/utils/monitor-control/set_primary_monitor.sh b/src/commands/utils/monitor-control/set_primary_monitor.sh old mode 100644 new mode 100755 diff --git a/src/commands/utils/monitor-control/set_resolutions.sh b/src/commands/utils/monitor-control/set_resolutions.sh old mode 100644 new mode 100755 index 636cf573..69d54374 --- a/src/commands/utils/monitor-control/set_resolutions.sh +++ b/src/commands/utils/monitor-control/set_resolutions.sh @@ -40,11 +40,11 @@ set_resolutions() { monitor_name="${monitor_array[monitor_choice - 1]}" resolutions=$(get_unique_resolutions "$monitor_name") - # Create a temporary file with sorted resolutions and indices + # Create a temporary file with resolutions and indices temp_res_file=$(mktemp) - echo "$resolutions" | sort -nr | awk '{print NR " " $0}' > "$temp_res_file" + echo "$resolutions" | awk '{print NR " " $0}' > "$temp_res_file" - # Read the sorted resolutions into an associative array + # Read the resolutions into an associative array declare -A resolution_map while read -r index resolution; do resolution_map[$index]="$resolution" diff --git a/src/commands/utils/monitor-control/utility_functions.sh b/src/commands/utils/monitor-control/utility_functions.sh old mode 100644 new mode 100755