aboutsummaryrefslogblamecommitdiff
path: root/bin/executable_wofi-window-switcher
blob: 234409305975877ca54ae14db44f51dba9fba3cd (plain) (tree)
1
2
3
4
5
6
7





                                                                           
                                                                                                                            




                                    
#!/bin/sh
#

swaymsg -t get_tree | \
    jq -r '.nodes[].nodes[] | 
	if .nodes then [recurse(.nodes[])] else [] end  + .floating_nodes |
            .[] | select(.nodes==[]) | ((.id | tostring) + " [" + (.app_id // .window_properties.class) + "] " + .name)' | \
    grep -v __i3_scratch |
    wofi -d -i | {
	read -r id name
	swaymsg "[con_id=$id]" focus
}