dotfiles/.bin/OLD/dexec_findwin.old

5 lines
261 B
Plaintext
Raw Normal View History

2023-02-22 08:31:38 +01:00
#!/bin/sh
. $HOME/.bin/_config
num=$(wmctrl -l | awk '{$1="";$2="";$3="";gsub(/ /,"_", $0);printf("%d - %s\n",NR,$0)}' | tr -s '_' | $DMENU_CMD -p "Windows" | cut -d"-" -f1)
[ -z "$num" ] || wmctrl -l | awk -v n="$num" 'NR==n { print $1 }' | xargs wmctrl -i -a