lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev displaying current page title in xterm window title


From: Vlad Harchev
Subject: Re: lynx-dev displaying current page title in xterm window title
Date: Wed, 24 May 2000 11:05:03 +0500 (SAMST)

On Wed, 24 May 2000, Vlad Harchev wrote:

> On Tue, 23 May 2000, Duncan Simpson wrote:
> 
> > 
> > A little termcap reading shows that some older hadrware also has a set 
> > title 
> > feature (with moderately different control sequences from xterm). lynx 
> > couldtest hs to test for support and use ts fro instructions on how to do 
> > it.
> > 
> > >From the termcap man page
> > 
> >        hs   Has a status line
> >        ds   Disable status line
> >        ts   Move cursor to column %1 of status line
> > 
> > in xterm, and presumably others, sending <ts>Ritle<BEL> sets the staus line 
> > (aka xterm title). You could cut ts off the beginning of ds and take the 
> > rest 
> > as the end of the title string if you felt the need. Title setting code 
> > could 
> > be as simple as
> > 
> > void set_title(const char *t)
> > {
> >     char *ts;
> > 
> >     if (tgetent("hs") && (td=tgetstr("ts", NULL))!=NULL)
>                             ^^ ts
> >     {
> >     tputs(ts);
> >     fputs(t, stdout);
> >     fputc('\007', stdout);
> >     }
> > }
> 
>  Thank you very much for this nice hint.  Since there is no comment from Tom, 
> I assume it will work fine (so I won't test for existance of $WINDOWID).

 One more question - is it safe to write the title string longer that number
of columns (seems it's OK for xterm since different font could be used for
window title) - will the long title "wrap" to next line on hardware that
supports setting titles?
 

 Best regards,
  -Vlad


; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]