fix resolutions

This commit is contained in:
Chris Titus 2024-08-29 15:59:23 -05:00
parent 8515ee1236
commit 2ebbba9981
12 changed files with 3 additions and 3 deletions

View File

View File

0
src/commands/utils/monitor-control/disable_monitor.sh Normal file → Executable file
View File

View File

0
src/commands/utils/monitor-control/enable_monitor.sh Normal file → Executable file
View File

0
src/commands/utils/monitor-control/extend_displays.sh Normal file → Executable file
View File

View File

0
src/commands/utils/monitor-control/reset_scaling.sh Normal file → Executable file
View File

0
src/commands/utils/monitor-control/scale_monitor.sh Normal file → Executable file
View File

View File

6
src/commands/utils/monitor-control/set_resolutions.sh Normal file → Executable file
View File

@ -40,11 +40,11 @@ set_resolutions() {
monitor_name="${monitor_array[monitor_choice - 1]}" monitor_name="${monitor_array[monitor_choice - 1]}"
resolutions=$(get_unique_resolutions "$monitor_name") 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) 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 declare -A resolution_map
while read -r index resolution; do while read -r index resolution; do
resolution_map[$index]="$resolution" resolution_map[$index]="$resolution"

View File