dotfiles/scripts/wofi-window
2021-08-25 05:14:15 -05:00

10 lines
326 B
Plaintext

!#/bin/bash
swaymsg -t get_tree |
jq -r '.nodes[].nodes[] | if .nodes then [recurse(.nodes[])] else []
end + .floating_nodes | .[] | select(.nodes==[]) | ((.id | tostring) +
"" + .name)' |
wofi --show dmenu | {
read -r id name
swaymsg "[con_id=$id]" focus
}