New backup 2025-12-31 10:45:02

This commit is contained in:
Penelope Gwen 2025-12-31 10:45:02 -08:00
parent a5a17866e9
commit bd8f092e3d

View file

@ -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_dim="$(swaymsg -t get_outputs | jq -r '.. | select(.type?) | select(.focused==true).rect')"
active_screen_width="$(jq '.width' <<<${active_screen_dim})" active_screen_width="$(jq '.width' <<<${active_screen_dim})"
active_screen_height="$(jq '.height' <<<${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 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 else
swaymsg resize set 75ppt 25ppt #portrait
win_width=$(( active_screen_width * 60 / 100 ))
win_height=$(( win_width * 57 / 100 ))
fi fi
swaymsg resize set "${win_width}px" "${win_height}px"
fi fi