Commit 6c638259 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Merge branch 'hypr-fix' of github.com:Boria138/PortWINE into Boria138-hypr-fix

parents 4a11c22f ceb4dfb5
......@@ -3016,7 +3016,17 @@ pw_skip_get_info () {
PW_SCREEN_RESOLUTION="$(<"${PW_TMPFS_PATH}/xrandr.tmp" sed -rn 's/^.*primary.* ([0-9]+x[0-9]+).*$/\1/p')"
PW_SCREEN_PRIMARY="$(grep -e 'primary' "${PW_TMPFS_PATH}/xrandr.tmp" | awk '{print $1}')"
fi
if [[ $PW_SCREEN_RESOLUTION != *x* ]] ; then
if command -v hyprctl >/dev/null 2>&1 ; then
monitor_info=$(hyprctl monitors -j 2>/dev/null | jq -r '.[] | select(.focused==true)')
PW_SCREEN_PRIMARY=$(echo "$monitor_info" | jq -r '.name')
PW_SCREEN_RESOLUTION=$(echo "$monitor_info" | jq -r '"\(.width)x\(.height)"')
fi
fi
[[ $PW_SCREEN_RESOLUTION != *x* ]] && PW_SCREEN_RESOLUTION="1920x1080"
export PW_SCREEN_PRIMARY PW_SCREEN_RESOLUTION
if [[ -f "${PW_TMPFS_PATH}/locale.tmp" ]] ; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment