2022-07-21 03:34:02 +00:00
|
|
|
#!/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/' |
|
2022-07-21 03:34:39 +00:00
|
|
|
sed -e 's/^\([0-9]*\)\t*\(.*\)/\2 \1/' |
|
|
|
|
wofi -I --show dmenu | {
|
|
|
|
read -r id name
|
|
|
|
swaymsg "[con_id=$id]" focus
|
|
|
|
}
|