at master 366 B view raw
1#!/usr/bin/env bash 2 3windows=$(\ 4 @wmmsg@ -t get_tree |\ 5 jq -r ' 6 recurse(.nodes[], .floating_nodes[];.nodes!=null) 7 | select((.type=="con" or .type=="floating_con") and .name!=null) 8 | "\(.id? | tostring | (" " * (3 - length)) + .) \(.name?)" 9 ' 10) 11 12selected=$(echo "$windows" | @dmenu@ "Select window:" | awk '{print $1}') 13 14@wmmsg@ "[con_id="$selected"] focus"