diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index 8d2e1784..f602c05a 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -2870,7 +2870,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