From 5df10bd7f5b7089c438bc0bafc2eade396ff3f41 Mon Sep 17 00:00:00 2001 From: Paule Macedo Date: Tue, 14 Jan 2025 03:41:07 -0300 Subject: [PATCH] fix(logoutlaunch): adjust layout scaling based on monitor orientation --- Configs/.local/share/bin/logoutlaunch.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Configs/.local/share/bin/logoutlaunch.sh b/Configs/.local/share/bin/logoutlaunch.sh index c1f749563e..4b9855cd3e 100755 --- a/Configs/.local/share/bin/logoutlaunch.sh +++ b/Configs/.local/share/bin/logoutlaunch.sh @@ -31,11 +31,24 @@ fi x_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .width') y_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .height') hypr_scale=$(hyprctl -j monitors | jq '.[] | select (.focused == true) | .scale' | sed 's/\.//') +orientation=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .transform') #// scale config layout and style -case "${wlogoutStyle}" in +if [ "${orientation}" == 1 ] ; then + case "${wlogoutStyle}" in + 1) wlColms=6 + export mgn=$(( y_mon * 28 / hypr_scale )) + export hvr=$(( y_mon * 23 / hypr_scale )) ;; + 2) wlColms=2 + export y_mgn=$(( x_mon * 35 / hypr_scale )) + export x_mgn=$(( y_mon * 25 / hypr_scale )) + export y_hvr=$(( x_mon * 32 / hypr_scale )) + export x_hvr=$(( y_mon * 20 / hypr_scale )) ;; + esac +else + case "${wlogoutStyle}" in 1) wlColms=6 export mgn=$(( y_mon * 28 / hypr_scale )) export hvr=$(( y_mon * 23 / hypr_scale )) ;; @@ -44,7 +57,8 @@ case "${wlogoutStyle}" in export y_mgn=$(( y_mon * 25 / hypr_scale )) export x_hvr=$(( x_mon * 32 / hypr_scale )) export y_hvr=$(( y_mon * 20 / hypr_scale )) ;; -esac + esac +fi #// scale font size