X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=i3-pull;h=5ed9181d899e41bd4e1509ef3c24bfc1fb94c566;hb=8de1e14e35d0ad62620a59f6e2ca4ba19ddcda3c;hp=64f35f7d219b26595c2f4befd6a186232e88fdc5;hpb=50f25d1eec109c4596cfc638c9a7c98da0f0b5d0;p=distro-setup diff --git a/i3-pull b/i3-pull index 64f35f7..5ed9181 100755 --- a/i3-pull +++ b/i3-pull @@ -21,16 +21,16 @@ # limitations under the License. -# sometimes I want to pull in and sometimes I want to swap. +# pull in the $1 marked window to the current workspace, unless the current workspace is #1, then swap it with the current window set -e; . /usr/local/lib/bash-bear; set +e mark=$1 +# height of currently focused window h=$(i3-msg -t get_tree | jq -r ".. | select(.focused? == true) | .rect.height") cur_workspace=$(i3-msg -t get_workspaces | jq -r '.[] | select(.focused? == true) | .name') - # 1080 = half the 4k height #if [[ $cur_workspace == 1 && $h ]] && (( h <= 1080 )); then if [[ $cur_workspace == 1 && $h ]]; then