From 7c579b1cfa4fcd9f7553828e7f72aec33864a904 Mon Sep 17 00:00:00 2001 From: Sebastian Schulze Date: Wed, 27 Jul 2022 10:49:15 +0200 Subject: [PATCH] [sway] Fine-tune window positions for center mode --- bin/executable_sway-center-window | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bin/executable_sway-center-window b/bin/executable_sway-center-window index d511095..1745347 100644 --- a/bin/executable_sway-center-window +++ b/bin/executable_sway-center-window @@ -11,14 +11,15 @@ if [[ -f $current_info_file ]]; then fi; if [[ -z "${width}" ]]; then - echo "None yet" - echo 25 > "${current_info_file}" + echo "None" > "${current_info_file}" +elif [[ "${width}" == "None" ]]; then + echo "25ppt 50ppt" > "${current_info_file}" swaymsg resize set 25ppt 50ppt -elif [[ "${width}" == "25" ]]; then - echo 50 > "${current_info_file}" +elif [[ "${width}" == "25ppt 50ppt" ]]; then + echo "50ppt 50ppt" > "${current_info_file}" swaymsg resize set 50ppt 50ppt -elif [[ "${width}" == "50" ]]; then - echo 75 > "${current_info_file}" +elif [[ "${width}" == "50ppt 50ppt" ]]; then + echo "75ppt 75ppt" > "${current_info_file}" swaymsg resize set 75ppt 75ppt elif [[ "${width}" == "75" ]]; then rm -f "${current_info_file}"