Scripts version 2246

This commit is contained in:
Mikhail Tergoev
2024-01-20 17:25:09 +03:00
parent 2fb4fd4952
commit 791c25a850
9 changed files with 56 additions and 28 deletions

View File

@ -635,10 +635,10 @@ stop_portwine () {
if [[ "$PW_USE_US_LAYOUT" == "1" ]] && [[ "${XDG_SESSION_TYPE}" != "wayland" ]] && command -v setxkbmap &>/dev/null ; then
setxkbmap
fi
if [[ "${PW_RESTORE_RESOLUTION}" == "1" ]] && [[ "${XDG_SESSION_TYPE}" != "wayland" ]] && command -v xrandr &>/dev/null ; then
RESOLUTION=$(sed -n '1p' "${PORT_WINE_TMP_PATH}/tmp_screen_configuration")
OUTPUT_SCREEN=$(sed -n '2p' "${PORT_WINE_TMP_PATH}/tmp_screen_configuration")
xrandr --output "$OUTPUT_SCREEN" --mode "$RESOLUTION"
if [[ "${XDG_SESSION_TYPE}" != "wayland" ]] \
&& [[ "$(xrandr | sed -rn 's/^.*primary.* ([0-9]+x[0-9]+).*$/\1/p')" != "$PW_SCREEN_RESOLUTION" ]]
then
xrandr --output "$PW_SCREEN_PRIMARY" --mode "$PW_SCREEN_RESOLUTION"
fi
pw_stop_progress_bar
try_remove_file "${PORT_SCRIPTS_PATH}/0"