The following script does this and works on any EWMH compliant WM (such as awesome):
#!/bin/sh
id="$(wmctrl -l | sed -e 's/^\(\w\+\)\s\+\w\+\s\+\w\+\s\+\(.*\)$/\1 \2/' |
dmenu "$@" | sed -e 's/^\(\w\+\)\s.*/\1/')"
[ -n "$id" ] && wmctrl -i -a "$id"
The sed used to parse wmctrl output is a little ugly, however.
--
To unsubscribe, send mail to [email protected].
