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: Duncan Simpson
Subject: Re: lynx-dev displaying current page title in xterm window title
Date: Tue, 23 May 2000 19:54:27 +0000

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)
    {
        tputs(ts);
        fputs(t, stdout);
        fputc('\007', stdout);
    }
}

-- 
Duncan (-:
"software industry, the: unique industry where selling substandard goods is
legal and you can charge extra for fixing the problems."



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

reply via email to

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