> I'd think it's possible to test from a shell for the existance of a window
> with a certain name/title on an X display. Anybody know how?
Good morning! :)
'xwininfo -name' should do what you want. On my current desktop, I have a
Netscape window and two nxterm windows (and no xcalc) windows. Using
xwininfo like this should tell you whether any of these particular windows
exists:
% xwininfo -name Netscape | grep xwininfo | sed 's/.*/Window Found/'
Window Found
% xwininfo -name nxterm | grep xwininfo | sed 's/.*/Window Found/'
Window Found
% xwininfo -name xcalc | grep xwininfo | sed 's/.*/Window Found/'
xwininfo: error: No window with name xcalc exists!
If you're trying to use it in a script, which seems much more useful than
running it from the command line, simply check the return value ('0' means
that the window exists).
Shawn