[Top][All Lists]

[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: Thu, 25 May 2000 14:41:38 +0500 (SAMST)

On Wed, 24 May 2000, Klaus Weide wrote:

> On Tue, 23 May 2000, Duncan Simpson wrote:
> > void set_title(const char *t)
> > {
> >     char *ts;
> > 
> >     if (tgetent("hs") && (td=tgetstr("ts", NULL))!=NULL)
> >     {
> >     tputs(ts);
> >     fputs(t, stdout);
> >     fputc('\007', stdout);
> >     }
> > }
> Additional remarks:
> 1) Shouldn't you use tiget* functions instead of tget*, or both?
>    (i.e. terminfo vs termcap)
> 2) How do you do it in Slang, anyway?
> 3) Use an external program or script instead.  Avoids problems 1) and 2).
>    Users who want this fancy decorative stuff shouldn't mind the
>    overhead.  After all, lynx already provides a document "title" on
>    the very first line.

  I think that setting page title in the xterm window title, combined with the
use of taskbar or various "window list menu" will make the use of lynx in X
slightly more comfortable when several xterms with lynxes are opened (so I
don't consider that as "fancy decorative stuff").
  As for set_ws_title you've referenced in other message - it sets the window
title to the docuement title only when there are no links on the page,
otherwise it sets the window title to the So I won't use

>    Better yet, somebody has already made such a helper program:
> ----- /usr/doc/xtermset/copyright ---
> This package was debianized by Tommi Virtanen <address@hidden> on
> Mon,  1 Nov 1999 20:06:46 +0200.
> It was downloaded from
> Upstream Author(s): Breyten Ernsting <address@hidden>
>                     Decklin Foster <address@hidden>

 I looked at the sources of this program - it just strncmp's the value of
$TERM with "xterm" or "dtterm" (not strcmp, but strncmp), and then uses the
standard xterm escape sequences. Seems this is a good approach (at least it's
better than checking for $WINDOWID since user can run telnet in xterm, and
run lynx from other host, and in this case $WINDOWID won't exist).
 I would add "kterm" to the set of prefixes the $TERM is compared with since
'kterm' uses this terminfo.
 I think that program is not maintained any more, and there is no reason not
to use the algorithm it uses without invoking that program directly.
 Anyway, user will be able to control the use of this functionality in

 Best regards,

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

reply via email to

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