Removed the check for the number of monitors

This commit is contained in:
Boria138 2024-02-25 12:22:48 +06:00
parent 3388c2479c
commit 3569d6c99f

@ -794,12 +794,15 @@ export LSPCI_VGA="$(lspci -k | grep -E 'VGA|3D' | tr -d '\n')"
if command -v xrandr &>/dev/null ; then
try_remove_file "${PORT_WINE_TMP_PATH}/tmp_screen_configuration"
if [[ $(xrandr | grep " connected" | wc -l) == "1" ]]; then
export PW_SCREEN_RESOLUTION="$(xrandr | sed -rn 's/^.* connected.* ([0-9]+x[0-9]+).*$/\1/p')"
export PW_SCREEN_PRIMARY="$(xrandr | grep " connected" | awk '{print $1}')"
else
if [[ $(xrandr | grep "primary" | awk '{print $1}') ]] ; then
export PW_SCREEN_RESOLUTION="$(xrandr | sed -rn 's/^.*primary.* ([0-9]+x[0-9]+).*$/\1/p')"
export PW_SCREEN_PRIMARY="$(xrandr | grep "primary" | awk '{print $1}')"
elif [[ $(xdpyinfo | grep "dimensions" | awk '{print $2}') ]] ; then
export PW_SCREEN_RESOLUTION="$(xdpyinfo | grep dimensions | awk '{print $2}')"
export PW_SCREEN_PRIMARY="$(xrandr | grep -w "connected" | awk '{print $1}')"
elif [[ $(xrandr | grep -w "connected" | awk '{print $1}') ]] ; then
export PW_SCREEN_RESOLUTION="$(xrandr | sed -rn 's/^.* connected.* ([0-9]+x[0-9]+).*$/\1/p')"
export PW_SCREEN_PRIMARY="$(xrandr | grep -w "connected" | awk '{print $1}')"
fi
print_var PW_SCREEN_RESOLUTION PW_SCREEN_PRIMARY
else