diff options
author | Ryan Kavanagh <rak@rak.ac> | 2023-12-28 21:57:33 -0500 |
---|---|---|
committer | Ryan Kavanagh <rak@rak.ac> | 2023-12-28 21:57:33 -0500 |
commit | f53b3522ef72bd7718b8b003c8796fe25066f1e1 (patch) | |
tree | 492ab107956e292b9857effe357b2620da17c511 /bin/executable_wofi-window-switcher | |
parent | xsel -> wl-copy in tmux (diff) |
wofi-window-switcher
Diffstat (limited to 'bin/executable_wofi-window-switcher')
-rw-r--r-- | bin/executable_wofi-window-switcher | 12 |
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 +} |