Getting the window ID and startup issues
GI
gautam at math.uchicago.edu
Mon Mar 28 18:50:23 EST 2005
Hi All,
I've two questions --
1. Is it possible to get the window ID when I click the iconify button?
The reason I'm asking is because I saw a screen shot of fvwm where
the icons minimised windows are just miniatureised versions of the
window itself. Pretty neat! Check out the fvwm screenshot at:
http://www.fvwm.org/screenshots/desktops/Chris_Debenham-1400x1050/screenshot.jpg
From what I understand this is not a fvwm feature. This is done by
grabing the window image, using convert to make a small PNG out of
it, and then putting it on the desktop. I can do this in Openbox, but
only if I know the window ID.
Once I have the desired window ID, I can easily get the window image
and do what I please with it. I think idesk (or some other nifty
application) will put the converted image as a nice icon on the
desktop. And then I can use wmctrl -ia <WINID> to raise the
apropriate window when I click on the icon.
2. My second question is a little painfull. In my session startup, I
like starting a few programs (like oclock) undecorated. So I do the
following (in my .xinitrc):
openbox & WMPID=$!
oclock -transparent -geometry 100x100-0+0 -fg grey &
sleep 5 && wmctrl -r oclock -b add,undecorated,above
wait $WMPID
Ofcourse I used the patch that supported the "undecorated" property
to wmctrl. The problem I'm having is that sometimes wmctrl loads
*before* openbox has taken control of the oclock window (This happens
often when some shmuck has used gnome / kde right before I loged in.
In this case our lameass systems swap memory for about 30secs before
openbox starts up fully). Most of the time the above works perfectly,
and I've the desired result with my oclock window. But when there's a
delay in openbox initialising, I get a decorated oclock on my
desktop and a wmctrl error message (something about a missing xatom)
in my stderr. Anyone know how I can avoid this?
Thanks in advance,
Gautam
--
'Laziness' -- Resting before you get tired.
More information about the openbox
mailing list