Commit graph

65 commits

Author SHA1 Message Date
Daniel Eklöf
58d967b2f3
Codespell fixes 2023-10-03 14:11:55 +02:00
Daniel Eklöf
139fd6d55c
meson: add -Dterminfo-base-name option
This defines the base name of the generated terminfo files. It
defaults to the value of -Ddefault-terminfo (i.e. 'foot')

Example:

  meson -Ddefault-terminfo=foot-bananas -Dterminfo-base-name=foot-apples

The generated terminfo files will be

* terminfo/f/foot-apples
* terminfo/f/foot-apples-direct

The default value of $TERM will be 'foot-bananas'
2023-07-28 15:40:53 +02:00
Daniel Eklöf
e78319fccd
utmp: rewrite utmp logging
This patch generalizes the utmp support, to not only support
libutempter, but also ulog (and in the future, even more interfaces).

* Rename config option main.utempter to main.utmp-helper
* Add meson option -Dutmp-backend=none|libutempter|ulog|auto
* Rename meson option -Ddefault-utempter-path to -Dutmp-default-helper-path
* utmp is no longer detected at compile time, but at runtime instead.

Meson will configure the following pre-processor macros, based on the
selected utmp backend:

* UTMP_ADD - argument to pass to utmp helper when adding a record (starting foot)
* UTMP_DEL - argument to pass to utmp helper when removing a record (exiting foot)
* UTMP_DEL_HAVE_ARGUMENT - if defined, UTMP_DEL expects an extra argument ($WAYLAND_DISPLAY)
* UTMP_DEFAULT_HELPER_PATH - path to the default utmp helper binary

The documentation has been updated to mention which arguments are
passed to the helper binary.

Closes #1314
2023-05-22 18:47:25 +02:00
Harri Nieminen
ae26915916 fix typos 2023-03-29 00:45:18 +03:00
Daniel Eklöf
a9fc7ce180
pgo: run xtgettcap without any arguments
We execute xtgettcap in the parent terminal. Thus we don’t know if it
implements XTGETTCAP, and thus it’s not guaranteed to exit - it may
hang indefinitely waiting for a reply.

Fix by not actually quering anything.
2022-10-10 17:18:04 +02:00
Daniel Eklöf
4fca380585
install.md: add ./utils/xtgettcap name to "full PGO" instructions too 2022-10-09 16:27:10 +02:00
Daniel Eklöf
f747650b77
install.md: add xtgettcap to PGO build instructions 2022-10-08 16:56:28 +02:00
Daniel Eklöf
aa10b1d2da
Add support for creating utmp records
This patch adds support for creating utmp records using the ‘utempter’
helper binary from the ‘libutempter’ package.

* New config option ‘main.utempter’
* New meson command line option, -Ddefault-utempter-path. Defaults to
  auto-detecting the path.

The default value of the new ‘main.utempter’ config option depends on
the meson command line option ‘-Ddefault-utempter-path’.

If ‘main.utempter’ is *not* set to ‘none’, foot will try to execute
the utempter helper binary to create utmp records when a new terminal
is instantiated. The record is removed when the terminal instance is
destroyed.
2022-09-23 23:02:25 +02:00
Daniel Eklöf
020148d67c
install.md: add ‘utf8proc’ 2022-09-23 20:20:56 +02:00
Daniel Eklöf
62fe452cc2
meson: add -Dsystemd-units-dir=<path> meson command line option
This allows package maintainers to override the location to which our
systemd service files are installed.

It’s value is an *absolute* path, and *not* relative ${prefix}.

The default is ${systemduserunitdir}.
2022-05-12 13:45:53 +02:00
Daniel Eklöf
c7248cf763
meson: add -Dtests=false|true option
When set to false, no test binaries are neither built, nor
executed (with “ninja test”).

Closes #919
2022-04-22 17:05:25 +02:00
Merlin Büge
e6f884a9e1
doc + meson.build: update information about foot.ini, small cleanup
- foot.ini.5: mention location of example config file
- foot.1: replace outdated (or incomplete) information about the
  location of the config file with references to foot.ini.5
- foot.1 and foot.ini.5: conform to scdoc specification, thus surround each
  header with (at least) one blank line. additionally consistently use exactly
  one line before/after each header (was sometimes two before)
- foot.1: some parts of the keybindings had their own section, move into
  KEYBOARD SHORTCUTS section
- foot.1: move EXIT STATUS section to the end where it is commonly found
- foot.1: copy information about config file handling from the beginning of
  foot.ini.5 into the CONFIGURATION section of foot.1
- INSTALL.md: foot.ini is no longer included in the documentation
- meson.build: do not bundle foot.ini with documentation anymore, see also
  https://codeberg.org/dnkl/foot/pulls/1015

Closes #1002
2022-04-22 17:00:04 +02:00
Max Gautier
522f4e522e Install notes regarding systemd unit files 2022-02-26 16:10:12 +01:00
Daniel Eklöf
ab6b1b3679
install: remove reference to the Arch AUR package 2022-02-02 21:08:22 +01:00
grtcdr
fc99379a0c
docs: remove arch linux from install.md now that it's in the official repositories 2022-02-02 20:13:38 +01:00
Daniel Eklöf
a9eb71d2f9
install: add UTF-8 locate to runtime deps 2021-12-03 22:46:09 +01:00
Daniel Eklöf
67b8dc9d1e
install: update instructions on how to manually compile the terminfo 2021-12-03 22:44:35 +01:00
Daniel Eklöf
a08f4bc551
PKGBUILD: drop
The bundled PKGBUILD has been pretty much identical to the one in the
AUR package “foot-git” for a long time now.
2021-11-07 15:58:42 +01:00
Daniel Eklöf
bf42884494
install: remove text describing obsolete differences between PKGBUILDs 2021-10-31 14:26:53 +01:00
Daniel Eklöf
d4b365b55c
pgo: full-inner: add --override tweak.grapheme-shaping=no
Grapheme shaping is now enabled by default in foot. However, when
generating the profiling data in PGO builds, this results in skewed
optimizations.

The end result is worse benchmark results regardless of whether
grapheme-shaping is enabled or not (when running the benchmarks).
2021-10-16 16:58:59 +02:00
Daniel Eklöf
e789628f82
install: improve readability of the PGO LC_CTYPE paragraph 2021-10-02 15:24:48 +02:00
Daniel Eklöf
9389f337d0
pgo: full-inner: do not set LC_CTYPE=en_US.UTF-8
That locale may not exist. Instead, require the user/build script to
explicitly set an UTF-8 locale.

Document this in INSTALL.md, and in the bundled PKGBUILD.
2021-10-02 14:46:02 +02:00
Daniel Eklöf
aa0f2a71cc
install.md: document pgo/*.sh scripts 2021-09-12 16:57:07 +02:00
Daniel Eklöf
55433d7797
install: terminfo: pipe sed output to tic
Related to #700
2021-08-30 19:42:02 +02:00
Daniel Eklöf
051745d7b1
install: document how to manually pre-process the terminfo source file
Related to #700
2021-08-30 19:35:56 +02:00
Daniel Eklöf
9434066546
meson: terminfo install location now defaults to $datadir/terminfo
The meson command line option -Dcustom-terminfo-install-location has
been changed in the following ways:

* If unset, $datadir/terminfo is used, and TERMINFO is *not* exported
* If set, that value (relative to $prefix) is used, and TERMINFO *is*
exported.
* The special value ‘no’ is removed.

-Ddefault-terminfo now also changes the terminfo names generated when
-Dterminfo=enabled.

Furthermore, the documentation for the TERMINFO environment variable
has been removed from the foot.1 and footclient.1 man pages (but as
mentioned above, foot *will* still set it if
-Dcustom-terminfo-install-location has been used).

INSTALL.md has been updated to now recommend using ncurses’ terminfo
definitions, if available. But also to document the other
alternatives; installing the terminfo definitions in a custom
location, or installing them with a diferent name. It also describes
the general problem, and the disadvantages of each alternative (but
without going into too much depth).
2021-08-30 19:09:13 +02:00
Daniel Eklöf
8a7264e905
slave: set TERMINFO instead of TERMINFO_DIRS
This seems to be slightly better supported than TERMINFO_DIRS. It also
simplifies our code, since it’s no longer an issue of whether to
append or not - we just set TERMINFO, and ignore whatever it was set
to before.

Also closes #687
2021-08-18 20:18:35 +02:00
Daniel Eklöf
7639186865
terminfo: install to $datadir/foot/terminfo by default, append to TERMINFO_DIRS
As of 2021-07-31, ncurses ships its own version of foot’s terminfo.

Since:

* It doesn’t have the non-standard Sync,Tc,setrgbf,setrgbb
  capabilities.
* It doesn’t set hs,fsl,dsl (statusbar).
* We want to be able to update our termminfo without waiting for an
  ncurses release.
* Foot should be installable and usable on Linux systems that doesn’t
  have the latest ncurses.

we still want to ship our own version. We can however not install it
to the default terminfo location (e.g. /usr/share/terminfo), since it
will collide with the ncurses provided files.

Our options are to either rename our terminfo to something else, or to
keep the name, but install our terminfo files somewhere else.

The first option would be the easy one. However, I think it makes
sense to use the same name. For example, a user that SSH’s into a
remote system that does *not* have our own version installed,
but *does* have the ncurses one, will gracefully fall back to that
one, which is better than manually having to set
e.g. TERM=xterm-256color.

Now, if we want to use the same name, we need to install it somewhere
else. But where? And how do we ensure our version is preferred over
the ncurses one?

I opted to $datadir/foot/terminfo (e.g. /usr/share/foot/terminfo) by
default. It makes it namespaced to foot (i.e. we’re not introducing a
new “standard” terminfo location), thus guaranteeing it wont collide
with ncurses.

To enable applications to find it, we export TERMINFO_DIRS. This is a
list of *additional* directories to search for terminfo files. If it’s
already defined, we *append* to it.

The nice thing with this is, if there’s no terminfo in that
location (e.g. when you SSH into a remote), the default terminfo
location is *also* searched. But only *after* having searched through
TERMINFO_DIRS.

In short: our version is preferred, but the ncurses one (or an older
version of our terminfo package!) will be used if ours cannot be
found.

To enable packagers full control over the new behavior, the existing
meson command line options have been modified, and a new option added:

-Dterminfo=disabled|enabled|auto: *build* and *install* the terminfo
files.

-Dcustom-terminfo-install-location=<path>: *where* the terminfo files
are expected to be found.

This *needs* to be set *even* if -Dterminfo=disabled. For example, if
the packaging script builds and packages the terminfo files separate
from the regular foot build. The path is *relative to $prefix*, and
defaults to $datadir/foot/terminfo.

This is the value that will be appended to TERMINFO_DIRS. Note that
you can set it to ‘no’, in which case foot will *not* set/modify
TERMINFO_DIRS. Only do this if you don’t intend to package foot’s
terminfo files at all (i.e. you plan on using the ncurses ones only).

-Ddefault-terminfo=foot. Allows overriding the default TERM
value. This should only be changed if the target platform doesn’t
support terminfo files.

Closes #671
2021-08-17 21:04:30 +02:00
Daniel Eklöf
7c686208a1
meson: add -Ddocs=disabled|enabled|auto command line option
When enabled (the default, if scdoc is found), we build and install
the man pages, example foot.ini, readme, changelog and license files.
2021-07-24 13:12:10 +02:00
Daniel Eklöf
4a6dea04c2
install: add -Dgrapheme-clustering to the list of custom meson options 2021-06-24 17:57:34 +02:00
Daniel Eklöf
501548080d
install: add the new ‘terminfo-install-location’ option
And flesh out the description of the ‘terminfo’ option, and how it
relates to the new ‘terminfo-install-location’.

Also add instructions on how to manually generate the terminfo files.
2021-06-23 17:04:12 +02:00
Daniel Martí
8ae8635add INSTALL: fix an unclosed markdown quote
While skimming this doc, I noticed that "-Dterminfo" wasn't rendering
properly as it was lacking its closing backquote.

While at it, tweak the Arch wiki link, as it redirects to replace
/index.php with /title.
2021-05-13 09:49:38 +01:00
Daniel Eklöf
a88a86f797
install: add ‘ninja test’ to all build types
While we don’t (yet) have any unit tests for foot, users can build
foot with e.g. fcft and/or tllist as sub-projects. *They* have tests,
and when doing PGO builds, those test binaries *must* be executed, or
we get link failures in the final build.
2021-03-28 17:24:35 +02:00
Daniel Eklöf
3fd9256c02
install: clang-11.x compatible PGO instructions
LLVM/Clang 11.x throws errors for _files_ without any profiling data:

  error: ../../async.c: Function control flow change detected (hash mismatch) async_write Hash = 72057641800614222 [-Werror,-Wbackend-plugin]

This caused multiple issues with the current PGO instructions:

* The `pgo` binary failed to link with `meson configure -Db_pgo=use`
  when doing a full PGO build (since it isn't used in this case);
* `footclient` fails to link for the same reason.
* `foot` fails to link for the same reason in **partial** PGO builds.

The solution is to make sure all binaries that are built in the final
phase (`-Db_pgo=use`) have been executed in the _generate_ phase.

Doing this also means we can drop `-Wno-missing-profile` and friends.

Also add `--sixel` to the `generate-alt-random-writes` command line in
the description for a full PGO build.

Closes #418
2021-03-26 22:16:55 +01:00
Daniel Eklöf
243578d308
install: add ‘llvm’ as an optional build dependency
It is needed for PGO builds with Clang.
2021-03-26 22:16:54 +01:00
Simon Schricker
b169623b64
Add: Bash completion for foot and footclient
* use toe for terminfo, thanks Craig.
* adds optional dependency on bash-completion for positional arguments

Co-authored-by: Craig Barnes <craigbarnes@protonmail.com>
2021-03-17 13:10:28 +01:00
Daniel Eklöf
4ff07a0d18
install: add libnotify and xdg-utils as optional dependencies 2021-02-14 12:10:38 +01:00
Daniel Eklöf
3d71b74442
install: add -Dterminfo to list of compile-time options 2021-02-09 19:46:06 +01:00
Daniel Eklöf
aa13dfb4e8
install: remove -march=native
This simplifies the instructions. People interested in performance are
likely to know how to use it.
2020-12-21 13:01:38 +01:00
Daniel Eklöf
4fe95e6354
install.md: mention that packagers should not use -march=native 2020-12-21 12:24:47 +01:00
Daniel Eklöf
5a1dcbb04d
install.md: add -Wno-profile-instr-unprofiled to clang flags in PGO builds 2020-12-21 12:24:29 +01:00
Daniel Eklöf
288ea360cb
install: fix typo in ‘ninja’ 2020-12-21 12:15:59 +01:00
Craig Barnes
013cca646d meson: use wrap files for fcft/tllist subprojects
See: https://mesonbuild.com/Wrap-dependency-system-manual.html
2020-12-19 22:43:09 +00:00
Daniel Eklöf
6494ba24c9
install: simplify sentence 2020-12-08 19:19:09 +01:00
Daniel Eklöf
fe6cf547f1
install: highlight option default value in options list 2020-12-07 20:44:12 +01:00
Daniel Eklöf
ab699338b3
install: highlight option name in options list 2020-12-07 20:44:12 +01:00
Daniel Eklöf
559c87b84a
install: add ‘options’ section, describing compile-time options 2020-12-07 20:44:12 +01:00
Daniel Eklöf
7755af5bea
install: add --sixel to suggested command line for generate-alt-random-writes 2020-11-24 21:31:44 +01:00
Daniel Eklöf
24164101b3
install: minor tweaks to PGO instructions 2020-11-22 19:29:45 +01:00
Daniel Eklöf
6214cdeaf1
install: re-write release build instructions 2020-11-22 19:29:44 +01:00