mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-12-25 04:49:44 +00:00
fix resolutions
This commit is contained in:
parent
8515ee1236
commit
2ebbba9981
0
src/commands/utils/monitor-control/auto_detect_displays.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/auto_detect_displays.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/change_orientation.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/change_orientation.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/disable_monitor.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/disable_monitor.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/duplicate_displays.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/duplicate_displays.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/enable_monitor.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/enable_monitor.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/extend_displays.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/extend_displays.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/manage_arrangement.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/manage_arrangement.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/reset_scaling.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/reset_scaling.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/scale_monitor.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/scale_monitor.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/set_primary_monitor.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/set_primary_monitor.sh
Normal file → Executable file
6
src/commands/utils/monitor-control/set_resolutions.sh
Normal file → Executable file
6
src/commands/utils/monitor-control/set_resolutions.sh
Normal file → Executable file
|
@ -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"
|
||||
|
|
0
src/commands/utils/monitor-control/utility_functions.sh
Normal file → Executable file
0
src/commands/utils/monitor-control/utility_functions.sh
Normal file → Executable file
Loading…
Reference in New Issue
Block a user