X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=i3-pull;h=9d391d531f7f447cbe65f3342d31f2abf95dabbe;hb=b714b0dde29aaf5e44d628c1d723077465e9c488;hp=64f35f7d219b26595c2f4befd6a186232e88fdc5;hpb=858993fb6c3e9351988b193e6c296e6ea7862501;p=distro-setup diff --git a/i3-pull b/i3-pull index 64f35f7..9d391d5 100755 --- a/i3-pull +++ b/i3-pull @@ -21,11 +21,12 @@ # 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')