TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TCLUG:6088] Banal xterm question
Well xwininfo takes parameters like so :
xwininfo -name "xterm" and gives you back a lot of information.
I am not sure what happens when there is more than 1 window
called xterm though.
Hmm, but I did not know about the WINDOWID environment variable,
Thanks!
Then all you might need to do is something like:
window = atoi(getenv("WINDOWID"));
if( window == 0 ) {
/* scream, ... */
fprintf( stderr, "Cannot locate windowid\n" );
exit( EXIT_FAILURE );
}
Instead of the fscanf( argv[2], "%x", &window ) bit..
On second thoughts just keep doing what you are doing now ! The lesser
code I write the fewer bugs I can put in !!
regards,
sandipan
---
bob@math.umn.edu wrote:
>
> Sandipan,
>
> Thanks! Works fine. However, I could not see how to do a non-interactive
> window grab with xwininfo. Instead I did printenv WINDOWID, then converted
> it to hex. The combination gives a nice popup message that iconifies
> after a bit.
>
> > Here is a program that will do it. But you will have to know the
> > window id of the xterm. You can find that out by running xwininfo.
> > I am not sure there are any control sequences that will do it. But
> > you can take a look at the source code README file which has
> > references to control sequences that change the behaviour of the xterm.
> >
> > You can compile the program with :
> > gcc -o myiconify myiconify.c -lX11
> >
> > And run it like so :
> > myiconify -i 0x400005
> > to iconify it or
> > myiconify -o 0x400005
> > to reverse the process. But you will have to find out the window
> > id of the xterm window, some other way. You can use xwininfo and
> > do a grep for the title and the cut the window id part of it.
> >
> > Enjoy !
> > --
> > sandipan
> <snip>
>
> Adios,
> Chris
> --
> C.S. Cornuelle
> School of Mathematics/MCIM
> 206 Church St. SE
> University of Minnesota
> Minneapolis, MN 55455
> (612) 626-8930, 624-9069
> bob@math.umn.edu
> --
> Ferventer Vestite
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@listserv.real-time.com
> For additional commands, e-mail: tclug-list-help@listserv.real-time.com
> Try our website: http://tclug.real-time.com