--- /dev/null
+#!/bin/bash
+
+# sometimes I want to pull in and sometimes I want to swap.
+
+set -e; . /usr/local/lib/bash-bear; set +e
+
+mark=$1
+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
+ i3-msg "swap container with mark $mark; [con_mark=\"$mark\"] focus"
+else
+ i3-msg '[con_mark="'$mark'"] move workspace current'
+fi