dotfiles/.bin/dexec_findwin.old
2023-02-22 08:31:38 +01:00

5 lines
261 B
Bash
Executable File

#!/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