aboutsummaryrefslogblamecommitdiff
path: root/bin/executable_wofi-window-switcher
blob: 6b9e31015d5618fd1a6e9e8e21d94b1cdcdb76e1 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
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
}