summaryrefslogtreecommitdiff
path: root/config/sway/switch.sh
blob: 62751b8f4641da07cd3cb32c7f092cada4d8d720 (plain)
1
2
3
4
5
6
7
8
9
10
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