Commit bc2f254f authored by Mikhail Tergoev's avatar Mikhail Tergoev

Merge branch 'Boria138-hypr-fix' into devel

parents 4a11c22f 6c638259
...@@ -3016,7 +3016,17 @@ pw_skip_get_info () { ...@@ -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_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}')" PW_SCREEN_PRIMARY="$(grep -e 'primary' "${PW_TMPFS_PATH}/xrandr.tmp" | awk '{print $1}')"
fi 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" [[ $PW_SCREEN_RESOLUTION != *x* ]] && PW_SCREEN_RESOLUTION="1920x1080"
export PW_SCREEN_PRIMARY PW_SCREEN_RESOLUTION export PW_SCREEN_PRIMARY PW_SCREEN_RESOLUTION
if [[ -f "${PW_TMPFS_PATH}/locale.tmp" ]] ; then 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