aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/executable_wofi-window-switcher12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/executable_wofi-window-switcher b/bin/executable_wofi-window-switcher
new file mode 100644
index 0000000..6b9e310
--- /dev/null
+++ b/bin/executable_wofi-window-switcher
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+
+swaymsg -t get_tree | \
+ jq -r '.nodes[].nodes[] |
+ if .nodes then [recurse(.nodes[])] else [] end + .floating_nodes |
+ .[] | select(.nodes==[]) | ((.id | tostring) + " " + .name)' | \
+ grep -v __i3_scratch |
+ wofi -d -i | {
+ read -r id name
+ swaymsg "[con_id=$id]" focus
+}