aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/sway
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config/sway')
-rw-r--r--dot_config/sway/executable_tb-toggle.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/dot_config/sway/executable_tb-toggle.sh b/dot_config/sway/executable_tb-toggle.sh
index d1e8a83..5288484 100644
--- a/dot_config/sway/executable_tb-toggle.sh
+++ b/dot_config/sway/executable_tb-toggle.sh
@@ -8,12 +8,10 @@ set -eu
STASH=_tb
MARK=tb-main
-tree=$(swaymsg -t get_tree)
+current_ws=$(swaymsg -t get_workspaces \
+ | jq -r '.[] | select(.focused) | .name')
-current_ws=$(printf '%s' "$tree" \
- | jq -r 'first(.. | objects | select(.type=="workspace" and .focused) | .name) // empty')
-
-tb_ws=$(printf '%s' "$tree" \
+tb_ws=$(swaymsg -t get_tree \
| jq -r --arg m "$MARK" '
first(
.. | objects