[Top][All Lists]

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

Re: incomplete terminfo for foot-terminal

From: Thomas Dickey
Subject: Re: incomplete terminfo for foot-terminal
Date: Fri, 12 Nov 2021 15:36:11 -0500
User-agent: Mutt/1.10.1 (2018-07-13)

On Fri, Nov 12, 2021 at 08:29:51PM +0100, Jonas Große Sundrup wrote:
> Hi,
> I recently ran into an issue with the foot terminal in combination with
> the terminal file manager ranger.
> ranger has the option to adjust the terminal title according to the
> current directory, which does work fine on foot.
> However, with the terminfo shipped with ncurses it doesn't work,
> becauese apparently it doesn't indicate that foot supports tsl
> and fsl.

There's a problem with that.  The standard definition of tsl says
it uses a parameter:

          to_status_line              tsl       ts     move to status line,
                                                       column #1

There's no parameter in


and promoting this error interferes with applications written for a valid tsl.

With that in mind, I proposed this a while back:

# TS is a string capability which acts like "tsl", but uses no parameter and
#    goes to the first column of the "status line".

e.g., as done here:

# These building-blocks allow access to the X titlebar and icon name as a
# status line.  There are a few problems in using them in entries:
# a) tsl should have a parameter to denote the column on which to transfer to
#    the status line.
# b) the "0" code for xterm updates both icon-title and window title.  Some
#    window managers such as twm (and possibly window managers descended from
#    it such as tvtwm, ctwm, and vtwm) track windows by icon-name. Thus, you
#    don't want to mess with icon-name when using those window managers.
# The extension "TS" is preferable, because it does not accept a parameter.
# However, if you are using a non-extended terminfo, "TS" is not visible.
xterm+sl|access X title line and icon name,
        dsl=\E]0;\007, fsl=^G, tsl=\E]0;, TS=\E]0;,
xterm+sl-twm|access X title line (pacify twm-descended window managers),
        dsl=\E]2;\007, fsl=^G, tsl=\E]2;, TS=\E]2;,

I don't recall why I trimmed _that_ detail (it's been a few months).

Since those "tsl" are for the most part incorrect, you might want to check

Checking foot's sources, it looks as if a


would work.  Adding the "use=" is preferred to copy/paste of the content.

> In particular, curses.tigetstr('tsl') as well as curses.tigetstr('fsl')
> from the curses-python-module report None, whereas they do report  a
> proper sequence when I use the terminfo provided by upstream.
> Hence I assume that the terminfo shipped with ncurses for foot is
> incomplete. Is there any way to send a patch to fix that or do you
> prefer to fix that directly?
> Thanks,
> Jonas

Thomas E. Dickey <dickey@invisible-island.net>

Attachment: signature.asc
Description: PGP signature

reply via email to

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