dnkl/foot
41
2.0k
Fork
You've already forked foot
243

Allow installing terminfo files to a custom location #673

Manually merged
dnkl merged 1 commit from terminfo-dirs into master 2021年08月17日 21:28:11 +02:00
Owner
Copy link

Ncurses 2021年07月31日 added terminfo definitions for foot. Since they lack several non-standard capabilities (used by e.g. tmux), we still want to be able to use our own terminfo definitions.

The choices were to either rename our definitions, or install them to a custom location. Kitty, for example, calls its terminfo xterm-kitty, while ncurses calls it kitty. urxvt calls its terminfo rxvt-unicode{,-256color}, while ncurses calls it rxvt. Kitty also installs its terminfo to a custom location (/usr/lib/kitty/terminfo on Arch).

I'd rather not rename it. Being able to have the same name also means we can gracefully fallback to ncurses' version on e.g. remote systems where our terminfo hasn't been installed.

To facilitate this, the following changes have been made:

  • (削除) meson no longer builds or installs the terminfo files. (削除ここまで)
  • -Dterminfo has been changed to only control whether or not the terminfo definitions are built (and installed) or not. It no longer controls the default value of TERM.
  • INSTALL.md has been updated with information describing the terminfo situation, and how to actually build and package the terminfo files.
  • (削除) -Dterminfo has been removed (it controlled whether or not to build the terminfo definitions) (削除ここまで)
  • -Dterminfo-install-location has been renamed to -Dcustom-terminfo-install-location, and the custom value disabled is no longer supported.
  • When -Dcustom-terminfo-install-location is set to anything but no, foot will append this value to the TERMINFO_DIRS environment variable in the client application's process. The value is relative ${prefix}. The default is ${datadir}/foot/terminfo.

By appending to TERMINFO_DIRS, applications will search for the foot terminfo there first. If it can't find it there (for example, on remote systems where the foot terminfo definitions haven't been installed), the default location will be searched instead.

Thus, a distro that manually builds and packages (in a separate package) the terminfo files, could configure the foot build with:

meson -Dterminfo=disabled ...

This will result in a build that uses foot as the default TERM, with our terminfo files expected to be in ${prefix}/${datadir}/foot/terminfo (e.g. /usr/share/foot/terminfo).

To actually build the terminfo files you'd:

tic -o $DESTDIR/share/foot/terminfo -x -e foot,foot-direct foot.info

To complete disable "our" terminfo files, and instead rely completely on ncurses', you could do:

meson -Dterminfo=disabled -Dcustom-terminfo-install-location=no

Closes #671

Ncurses 2021年07月31日 added terminfo definitions for foot. Since they lack several non-standard capabilities (used by e.g. tmux), we still want to be able to use our own terminfo definitions. The choices were to either rename our definitions, or install them to a custom location. Kitty, for example, calls its terminfo `xterm-kitty`, while ncurses calls it `kitty`. urxvt calls its terminfo `rxvt-unicode{,-256color}`, while ncurses calls it `rxvt`. Kitty _also_ installs its terminfo to a custom location (`/usr/lib/kitty/terminfo` on Arch). I'd rather _not_ rename it. Being able to have the same name also means we can gracefully fallback to ncurses' version on e.g. remote systems where our terminfo hasn't been installed. To facilitate this, the following changes have been made: * ~~meson no longer builds or installs the terminfo files.~~ * `-Dterminfo` has been changed to **only** control whether or not the terminfo definitions are built (and installed) or not. It no longer controls the default value of `TERM`. * INSTALL.md has been updated with information describing the terminfo situation, and how to actually build and package the terminfo files. * ~~`-Dterminfo` has been removed (it controlled whether or not to build the terminfo definitions)~~ * `-Dterminfo-install-location` has been renamed to `-Dcustom-terminfo-install-location`, and the custom value `disabled` is no longer supported. * When `-Dcustom-terminfo-install-location` is set to **anything but `no`**, foot will **append** this value to the `TERMINFO_DIRS` environment variable in the client application's process. The value is relative `${prefix}`. The default is `${datadir}/foot/terminfo`. By appending to `TERMINFO_DIRS`, applications will search for the `foot` terminfo there first. If it can't find it there (for example, on remote systems where the foot terminfo definitions haven't been installed), the default location will be searched instead. Thus, a distro that manually builds and packages (in a separate package) the terminfo files, could configure the foot build with: ```sh meson -Dterminfo=disabled ... ``` This will result in a build that uses `foot` as the default `TERM`, with our terminfo files expected to be in `${prefix}/${datadir}/foot/terminfo` (e.g. `/usr/share/foot/terminfo`). To actually build the terminfo files you'd: ```sh tic -o $DESTDIR/share/foot/terminfo -x -e foot,foot-direct foot.info ``` To complete disable "our" terminfo files, and instead rely completely on ncurses', you could do: ```sh meson -Dterminfo=disabled -Dcustom-terminfo-install-location=no ``` Closes #671
INSTALL.md Outdated
@ -119,0 +129,4 @@
* New capabilities added to the `xterm-256color` terminfo could
potentially break foot.
As of ncurses 2021年07月21日, ncurses ships a version of foots
Contributor
Copy link
-As of ncurses 2021年07月21日, ncurses ships a version of foot’s
+As of ncurses 2021年07月31日, ncurses ships a version of foot’s
```diff -As of ncurses 2021年07月21日, ncurses ships a version of foot’s +As of ncurses 2021年07月31日, ncurses ships a version of foot’s ```
Author
Owner
Copy link

Thanks! Fixed.

Thanks! Fixed.
dnkl marked this conversation as resolved
craigbarnes left a comment
Copy link

@dnkl The documentation looks good, aside from a few minor things noted below.

I'm running short of time, so I haven't looked at the other stuff for now.

@dnkl The documentation looks good, aside from a few minor things noted below. I'm running short of time, so I haven't looked at the other stuff for now.
INSTALL.md Outdated
@ -142,2 +173,2 @@
The two `terminfo` options are related, but control different aspects
of how the terminfo files are built, installed and used.
`-Ddefault-terminfo`: I strongly recommend leaving the default
value. It is meant as a last resort on platforms where individual
Collaborator
Copy link

It's slightly unclear what "it" is referring to here. I think it'd be clearer if the sentence started with e.g. "this option is meant to be used as a last resort...".

It's slightly unclear what "it" is referring to here. I think it'd be clearer if the sentence started with e.g. "this option is meant to be used as a last resort...".
Author
Owner
Copy link

Changed to your suggested wording.

Changed to your suggested wording.
dnkl marked this conversation as resolved
INSTALL.md Outdated
@ -144,0 +180,4 @@
`/usr/share/foot/terminfo`. Use `-Dcustom-terminfo-install-location`
to tell foot where the terminfo is. Foot will append this path to the
`TERMINFO_DIRS` environment variable in the client applications
process. The value is **relative ${prefix}**.
Collaborator
Copy link

I think this should be "relative to ${prefix}".

I think this should be "relative **to** ${prefix}".
Author
Owner
Copy link

Fixed.

Fixed.
dnkl marked this conversation as resolved
INSTALL.md Outdated
@ -158,0 +203,4 @@
`/usr/lib/foot/terminfo`. This is the value foot will append to the
`TERMINFO_DIRS` environment variable.
If `-Dterminfo` enabled (the default), then the terminfo files will be
Collaborator
Copy link

s/enabled/is enabled/

s/enabled/is enabled/
Author
Owner
Copy link

Fixed.

Fixed.
dnkl marked this conversation as resolved
dnkl manually merged commit f4da46350e into master 2021年08月17日 21:28:11 +02:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dnkl/foot!673
Reference in a new issue
dnkl/foot
No description provided.
Delete branch "terminfo-dirs"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?