#634956 ncurses-base: xterm should have hs, tsl and fsl (in other word: use status line for window title)

#634956#5
Date:
2011-07-21 09:26:58 UTC
From:
To:
Hello,

Graphical terminal emulator have a useful specific feature that other do not
have: the window title. But here again, they use different control sequence to
access to it. I think this makes this feature a good candidate for terminfo,
but there exist no capability related to “window title”.

Fortunately, the graphical terminal emulator often miss another feature, the
status line, which has a function very close to the window title. In fact the
window title is perceived as replacing, or implementing a status line for
graphical terminal emulators. Thus, several terminal emulators declared the hs,
tsl and fls capabilities to control the status line: this is the case of
terminator, rxvt-unicode and st, for instance.

So, would it be possible to add hs, tsl, fsl and wsl to the xterm definition?
I think that would be:
    hs,
    tsl=\E]0;,
    fsl=^G,
    wsl=-1,

This is useful to write terminal-independant shell configuration that set the
window title. A common use is to add the working directory to the window title,
for instance.

#634956#10
Date:
2011-07-21 09:44:27 UTC
From:
To:
The status capabilities are documented (and standardized) to use a
parameter (the starting column at which to begin writing).

xterm's title control sequence doesn't honor that parameter.

Therefore any use of that would have to be via an extension entry.

#634956#15
Date:
2011-07-21 10:00:59 UTC
From:
To:
Thomas Dickey, 2011-07-21 05:44 UTC-0400:

Are they? The terminfo manpage only indicates that tsl is to go to the
status line, first column. Then the status line may allow to use control
sequence; this is indicated by the capability eslok.

Then there is also the wsl capability that indicates the status line
width if it is different from the terminal width: for rxvt-unicode it is
set to -1, which I guess is to indicate that it has a free width.

#634956#20
Date:
2011-07-21 10:39:26 UTC
From:
To:
The "#1" means that its a parameter, and (tersely) that it's the column.
Not ambiguous.

If rxvt-unicode had documentation, we might discuss it...

#634956#25
Date:
2011-07-21 11:04:45 UTC
From:
To:
Thomas Dickey, 2011-07-21 06:39 UTC-0400:

Oh, right, I missed it, sorry. Okay, that was my suggestion but are now
this topic better than I do, so I shall let you decide what to do with
this report now.

#634956#30
Date:
2011-07-21 12:02:02 UTC
From:
To:
Tanguy Ortolo, 2011-07-21 13:04 UTC+0200:
but if the decision is between adding or not hs, tsl and fsl to the
xterm definition, I think this is the question that should be
considered: will the situation be better or worse than it is currently?

For what I see, the current situation is:
* many shell configurations and programs use hardcoded escape sequences
  for xterm only, and do not use other terminal's window title features
  because they do not know about it;
* several other graphical terminal emulators expose tsl and fsl for
  window title, simply ignoring the column argument;
* as far as I know, there exist no program that use the status line
  column selection, but I may be wrong: did you get many bug reports
  about rxvt-unicode's tsl that does not honor the position argument?

Introducing tsl and fsl would:
* allow to write portable shell configurations and programs;
* break all the programs that rely on the status line column
  selection.

If the number of programs that rely on the status line column selection
is actually null, then I think this would only be a benefit.

#634956#35
Date:
2011-07-21 20:41:36 UTC
From:
To:
more to the point (a quick glance at the terminal database shows me that a
majority use the parameter, and that the "several" which you may be
considering is still only a small fraction of the total).  For discussion
purposes, there's a "xterm+sl block, which has only been mentioned 2-3
times over the past 10 years.

bug reports about urxvt would be forwarded to its developer...

(an extension name would not conflict with existing usage)