You are not logged in.
With just xprop you can click the current window of course, but how do you do this in a script?
I can't find anything in man xprop about the current window.
I also tried xdotool getactivewindow, but in some WMs it doesn't work.
Just the class of the currently active window is what I'm interested in BTW.
Offline
frip provided a nice way to do this with a modified version of wmctrl, works with all WMs i used so far.
its in this thread http://bbs.archlinux.org/viewtopic.php?id=57202
and i re-uploaded the mod here: http://konni.giev.de/wmctrlmod.tar.bz2
Offline
I tried it out, but wmctrl and this mod don't work with some WMs.
Offline
Not sure if this helps:
"xdpyinfo"generate a lot of output. Perhaps you'll find what you need.
Somewhere between "too small" and "too large" lies the size that is just right.
- Scott Hayes
Offline
Meet "xprop -root _NET_ACTIVE_WINDOW".
To get its properties just trim up to the hexadecimal WID, and pass that to xprop or xwininfo and grep for whatever you want.
Those methods are quite slow though. I've done some Xlib work (although now I've been shown XCB I'm in a quandry since XCB is both faster and less documented ) and some of this work included writing a panel-type thing. So I could knock up a simple Xlib app to get the properties you wanted, if you want.
-dav7
Last edited by dav7 (2008-11-28 12:47:58)
Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.
Offline