Created
February 18, 2011 05:09
-
-
Save zmughal/833279 to your computer and use it in GitHub Desktop.
Window chooser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# reqs: wmctrl, zenity | |
wmctrl -l \ | |
| sed 's/\([^ ]\+\) \+\([^ ]\+\) \+\([^ ]\+\) \+\(.*\)$/\1:\4/' \ | |
| grep -v "^0x[0-9a-f]\+:$" \ | |
| sed 's/\(0x[0-9a-f]\+\):\(.\+\)/\1\n\2/' \ | |
| zenity --list --title "Windows" --text "Window list" --column="ID" \ | |
--column "Window" --hide-column=1 \ | |
| xargs wmctrl -i -a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment