diff options
| author | tmu <t.man.atl.2012@gmail.com> | 2023-01-01 16:02:16 -0700 |
|---|---|---|
| committer | tmu <t.man.atl.2012@gmail.com> | 2023-01-01 16:02:16 -0700 |
| commit | 4c15bd89f528fcb7f9039511cdebd19d2169cf1e (patch) | |
| tree | cf30712fe8514e246800068a7c2a2ba26bde71dc /sway/switch.sh~ | |
start
Diffstat (limited to 'sway/switch.sh~')
| -rwxr-xr-x | sway/switch.sh~ | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sway/switch.sh~ b/sway/switch.sh~ new file mode 100755 index 0000000..ccd1bf7 --- /dev/null +++ b/sway/switch.sh~ @@ -0,0 +1,10 @@ +#!/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 |
