I wrote a small utility to do this a while back. I've recently rewritten it (just yesterday, in fact!) so I can give it a window name. Originally, it required the window id number and I had a shell script to find the id from the name (via 'xwinifo -root -tree' and some grepping), but it was quite slow and didn't allow substring matching. I rewrote it in Python but it was still intolerably slow (took almost a WHOLE second!). Thus, I added the name matching into the C program. You can download the src here.
EDIT: dead link, removed.
Last edited by ioerror; 05-16-2006 at 09:23 AM.
|