From bd8f092e3dcf27125db5c458f8271ec187829e45 Mon Sep 17 00:00:00 2001 From: Penelope Gwen Date: Wed, 31 Dec 2025 10:45:02 -0800 Subject: [PATCH] New backup 2025-12-31 10:45:02 --- de/home/.config/sway/scripts/floating_toggle.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/de/home/.config/sway/scripts/floating_toggle.sh b/de/home/.config/sway/scripts/floating_toggle.sh index 65a7300..471e362 100755 --- a/de/home/.config/sway/scripts/floating_toggle.sh +++ b/de/home/.config/sway/scripts/floating_toggle.sh @@ -6,11 +6,14 @@ if [[ "${active_window_type}" == "con" ]];then active_screen_dim="$(swaymsg -t get_outputs | jq -r '.. | select(.type?) | select(.focused==true).rect')" active_screen_width="$(jq '.width' <<<${active_screen_dim})" active_screen_height="$(jq '.height' <<<${active_screen_dim})" - echo ${active_screen_width} - echo ${active_screen_height} if [[ "${active_screen_width}" -gt "${active_screen_height}" ]];then - swaymsg resize set 50ppt 50ppt + #landscape + win_height=$(( active_screen_height * 60 / 100 )) + win_width=$(( win_height * 175 / 100 )) else - swaymsg resize set 75ppt 25ppt + #portrait + win_width=$(( active_screen_width * 60 / 100 )) + win_height=$(( win_width * 57 / 100 )) fi + swaymsg resize set "${win_width}px" "${win_height}px" fi