3 # sometimes I want to pull in and sometimes I want to swap.
5 set -e; .
/usr
/local
/lib
/bash-bear
; set +e
8 h
=$
(i3-msg
-t get_tree | jq
-r ".. | select(.focused? == true) | .rect.height")
10 cur_workspace
=$
(i3-msg
-t get_workspaces | jq
-r '.[] | select(.focused? == true) | .name')
13 # 1080 = half the 4k height
14 #if [[ $cur_workspace == 1 && $h ]] && (( h <= 1080 )); then
15 if [[ $cur_workspace == 1 && $h ]]; then
16 i3-msg
"swap container with mark $mark; [con_mark=\"$mark\"] focus"
18 i3-msg
'[con_mark="'$mark'"] move workspace current'