From f53b3522ef72bd7718b8b003c8796fe25066f1e1 Mon Sep 17 00:00:00 2001 From: Ryan Kavanagh Date: Thu, 28 Dec 2023 21:57:33 -0500 Subject: wofi-window-switcher --- bin/executable_wofi-window-switcher | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 bin/executable_wofi-window-switcher 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 +} -- cgit v1.2.3