Testing wofi with alt-tab

Functional, but needs to be styled
This commit is contained in:
John Mertz 2022-07-20 23:34:02 -04:00
parent 539248ee70
commit fc8df60b57
1 changed files with 13 additions and 0 deletions

13
wofi/wofi-alt-tab.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
swaymsg -t get_tree |
jq -r '.nodes[].nodes[] | if .nodes then [recurse(.nodes[])] else [] end + .floating_nodes | .[] | select(.nodes==[]) | if .app_id then ((.app_id | tostring) + " -- " + .name) else .name end' |
grep -v '__i3_scratch' |
sed -e 's/\([^\-]\)\- *[^\-]*$/\1/' |
sed -e 's/^\([0-9]*\)\t*\(.*\)/\2 \1/' |
wofi -I --show dmenu | {
read -r id name
swaymsg "[con_id=$id]" focus
}