dotfiles/.bin/OLD/dexec_findwin.old
2024-02-14 07:55:58 +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