#!/usr/bin/env zsh source ~/.config/init/vars typeset -i choice nums=() lines="" hc foreach --unique T tags.by-name echo T | cut -d '.' -f 3- | while read t; do hc list_clients --title --tag=$t done | while read -rA l; do nums+=( $l[1] ) [[ -z $lines ]] && lines=${l[@]:1} || lines="${lines}\n${l[@]:1}" done echo -e $lines | nl -w 2 -s ") " | dmenu -fn "${bfont}:size=${bfont_size}" -i \ -h $bheight -nb $bar_bg -nf $bar_fg -sb $bg_focus -sf $fg_focus \ -p "Select:" -l 40 | cut -d ')' -f 1 | read choice hc jumpto $nums[$choice]