summaryrefslogtreecommitdiff
path: root/config/sway/switch.sh
diff options
context:
space:
mode:
authorThomas Ulmer <thomasmulmer02@gmail.com>2026-02-04 14:24:16 -0800
committerThomas Ulmer <thomasmulmer02@gmail.com>2026-02-04 14:24:16 -0800
commit9139a1b136fa2b5adfcac0ac09a4f61aa1ee1ff4 (patch)
treede82bc4776b87f1fbb86f14b4a15d35d009ddd28 /config/sway/switch.sh
parenta9bf8f30c746f5b28bb7eb6938e8390127081a32 (diff)
full reorg
Diffstat (limited to 'config/sway/switch.sh')
-rwxr-xr-xconfig/sway/switch.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/config/sway/switch.sh b/config/sway/switch.sh
new file mode 100755
index 0000000..62751b8
--- /dev/null
+++ b/config/sway/switch.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+a="$(swaymsg -t get_tree | jq '.. | objects | select(.type == "con") | select(.focused == true) | .marks | index("t") != null')"
+
+#echo $a
+if [ $a = "true" ]; then
+ swaymsg '[con_mark="l"] focus'
+else
+ swaymsg 'mark --add "l"; [con_mark="t"] focus'
+fi
+