mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-22 13:22:28 +00:00
finally resolution fix
This commit is contained in:
parent
7ead7d69c2
commit
318dfd6a93
|
@ -20,8 +20,8 @@ detect_connected_monitors() {
|
||||||
get_unique_resolutions() {
|
get_unique_resolutions() {
|
||||||
local monitor="$1"
|
local monitor="$1"
|
||||||
xrandr_output=$(xrandr)
|
xrandr_output=$(xrandr)
|
||||||
# Get available resolutions from xrandr
|
# Get available resolutions from xrandr without line limit
|
||||||
available_resolutions=$(echo "$xrandr_output" | grep -A 10 "$monitor connected" | grep -oP '\d+x\d+' | sort -u)
|
available_resolutions=$(echo "$xrandr_output" | sed -n "/$monitor connected/,/^[^ ]/p" | grep -oP '\d+x\d+' | sort -u)
|
||||||
|
|
||||||
# Define standard resolutions
|
# Define standard resolutions
|
||||||
standard_resolutions="1920x1080 1280x720 1600x900 2560x1440 3840x2160"
|
standard_resolutions="1920x1080 1280x720 1600x900 2560x1440 3840x2160"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user