2019-08-08 22:35:55 +02:00
|
|
|
# foot
|
|
|
|
|
|
2019-08-17 12:42:28 +02:00
|
|
|
**foot** is a fast Wayland terminal emulator.
|
2019-08-08 22:35:55 +02:00
|
|
|
|
2019-08-29 23:05:19 +02:00
|
|
|
## Index
|
|
|
|
|
|
|
|
|
|
1. [Features](#features)
|
|
|
|
|
1. [Non-features](#non-features)
|
2019-09-20 21:45:10 +02:00
|
|
|
1. [What does not work?](#what-does-not-work)
|
2019-08-29 23:12:39 +02:00
|
|
|
1. [Fonts](#fonts)
|
|
|
|
|
1. [Shortcuts](#shortcuts)
|
|
|
|
|
1. [Keyboard](#keyboard)
|
|
|
|
|
1. [Mouse](#mouse)
|
2019-11-19 00:18:02 +01:00
|
|
|
1. [Server mode](#server-mode)
|
2019-08-29 23:05:19 +02:00
|
|
|
1. [Requirements](#requirements)
|
2019-08-29 23:05:38 +02:00
|
|
|
1. [Running](#running)
|
|
|
|
|
1. [Building](#building)
|
2019-08-29 23:11:11 +02:00
|
|
|
1. [Installing](#installing)
|
|
|
|
|
1. [Arch Linux](#arch-linux)
|
|
|
|
|
1. [Other](#other)
|
2019-08-29 23:05:19 +02:00
|
|
|
|
2019-08-08 22:35:55 +02:00
|
|
|
|
2019-08-29 22:55:49 +02:00
|
|
|
## Features
|
|
|
|
|
|
|
|
|
|
* Fast (**TODO** insert benchmark results here)
|
|
|
|
|
* Wayland native
|
|
|
|
|
* DE agnostic
|
|
|
|
|
* User configurable font fallback
|
|
|
|
|
* Scrollback search
|
|
|
|
|
* Color emoji support
|
2019-11-19 00:01:55 +01:00
|
|
|
* "Server" mode (one master process, many windows)
|
2019-08-29 22:55:49 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
## Non-features
|
|
|
|
|
|
|
|
|
|
This is a non-exhaustive list of things some people might consider
|
|
|
|
|
being important features (i.e. _"must-haves"_), that are unlikely to
|
|
|
|
|
ever be supported by foot.
|
|
|
|
|
|
|
|
|
|
* Tabs
|
2019-11-03 12:24:14 +01:00
|
|
|
* Graphical elements (menu, buttons etc)
|
2019-08-29 22:55:49 +02:00
|
|
|
|
|
|
|
|
|
2019-09-20 21:45:10 +02:00
|
|
|
## What does not work?
|
|
|
|
|
|
|
|
|
|
This is a list of known, but probably not all, issues:
|
|
|
|
|
|
2020-01-01 15:11:50 +01:00
|
|
|
* Unicode combining characters
|
2020-01-01 15:12:00 +01:00
|
|
|
|
2020-01-01 15:07:12 +01:00
|
|
|
Examples: á (`LATIN SMALL LETTER A` + `COMBINING ACUTE ACCENT`)
|
2020-01-01 15:12:00 +01:00
|
|
|
|
2019-09-21 12:14:51 +02:00
|
|
|
* Reflow text on window resize
|
2020-01-01 15:12:00 +01:00
|
|
|
|
2020-01-01 15:11:50 +01:00
|
|
|
* GNOME; might work, but without window decorations.
|
2020-01-01 15:12:00 +01:00
|
|
|
|
2020-01-01 15:07:12 +01:00
|
|
|
Strictly speaking, foot is at fault here; all Wayland applications
|
|
|
|
|
_must_ be able to draw their own window decorations (but foot is
|
|
|
|
|
not).
|
2019-11-03 12:24:14 +01:00
|
|
|
|
2020-01-01 15:07:12 +01:00
|
|
|
However, most people want a uniform look and feel on their
|
|
|
|
|
desktop, including the window decorations. For this reason, a
|
|
|
|
|
Wayland application can request _Server Side Decorations_
|
|
|
|
|
(SSD). GNOME will reply with a "_I hear you, but sorry, I wont do
|
|
|
|
|
that_".
|
2019-11-03 12:24:14 +01:00
|
|
|
|
2019-09-20 21:45:10 +02:00
|
|
|
|
2019-08-08 22:35:55 +02:00
|
|
|
## Fonts
|
|
|
|
|
|
2019-08-29 23:00:49 +02:00
|
|
|
**foot** supports all fonts that can be loaded by _freetype_,
|
|
|
|
|
including **bitmap** fonts and **color emoji** fonts.
|
|
|
|
|
|
|
|
|
|
Foot uses _fontconfig_ to locate and configure the font(s) to
|
|
|
|
|
use. Since fontconfig's fallback mechanism is imperfect, especially
|
|
|
|
|
for monospace fonts (it doesn't prefer monospace fonts even though the
|
|
|
|
|
requested font is one), foot allows you, the user, to configure the
|
|
|
|
|
fallback fonts to use.
|
|
|
|
|
|
|
|
|
|
This also means you can configure _each_ fallback font individually;
|
|
|
|
|
you want _that_ fallback font to use _this_ size, and you want that
|
|
|
|
|
_other_ fallback font to be _italic_? No problem!
|
2019-08-08 22:35:55 +02:00
|
|
|
|
2019-08-11 15:55:23 +02:00
|
|
|
If a glyph cannot be found in _any_ of the user configured fallback
|
|
|
|
|
fonts, _then_ fontconfig's list is used.
|
|
|
|
|
|
2019-08-08 22:35:55 +02:00
|
|
|
|
|
|
|
|
## Shortcuts
|
|
|
|
|
|
|
|
|
|
At the moment, all shortcuts are hard coded and cannot be changed. It
|
|
|
|
|
is **not** possible to define new key bindings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Keyboard
|
|
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
<kbd>shift</kbd>+<kbd>page up</kbd>/<kbd>page down</kbd>
|
|
|
|
|
: Scroll up/down in history
|
2019-08-29 22:46:26 +02:00
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
<kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>c</kbd>
|
|
|
|
|
: Copy selected text to the _clipboard_
|
2019-08-29 22:48:25 +02:00
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
<kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>v</kbd>
|
|
|
|
|
: Paste from _clipboard_
|
2019-08-29 22:48:25 +02:00
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
<kbd>ctrl</kbd>+<kbd>shift</kbd>+<kbd>r</kbd>
|
|
|
|
|
: Start a scrollback search
|
2019-08-29 22:48:25 +02:00
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
---
|
2019-08-27 21:20:24 +02:00
|
|
|
|
|
|
|
|
While doing a scrollback search, the following shortcuts are
|
|
|
|
|
available:
|
|
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
<kbd>ctrl</kbd>+<kbd>r</kbd>
|
|
|
|
|
: Search _backward_ for next match
|
2019-08-30 20:18:12 +02:00
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
<kbd>ctrl</kbd>+<kbd>s</kbd>
|
|
|
|
|
: Search _forward_ for next match
|
2019-08-30 20:18:12 +02:00
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
<kbd>ctrl</kbd>+<kbd>w</kbd>
|
|
|
|
|
: Extend current selection (and thus the search criteria) to the end
|
2019-12-03 19:23:56 +01:00
|
|
|
of the word, or the next word if currently at a word separating
|
|
|
|
|
character.
|
|
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
<kbd>ctrl</kbd>+<kbd>shift</kbd><kbd>w</kbd>
|
|
|
|
|
: Same as <kbd>ctrl</kbd>+<kbd>w</kbd>, except that the only word
|
2019-12-03 19:43:45 +01:00
|
|
|
separating characters are whitespace characters.
|
|
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
<kbd>escape</kbd>, <kbd>ctrl</kbd>+<kbd>g</kbd>
|
|
|
|
|
: Cancel the search
|
2019-08-29 22:48:25 +02:00
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
<kbd>return</kbd>
|
|
|
|
|
: Finish the search and copy the current match to the primary
|
2019-08-30 20:26:20 +02:00
|
|
|
selection
|
2019-08-08 22:35:55 +02:00
|
|
|
|
|
|
|
|
### Mouse
|
|
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
<kbd>left</kbd> - **single-click**
|
|
|
|
|
: Drag to select; when released, the selected text is copied to the
|
2019-08-29 23:02:18 +02:00
|
|
|
_primary_ selection. Note that this feature is normally **disabled**
|
|
|
|
|
whenever the client has enabled _mouse tracking_, but can be forced
|
|
|
|
|
by holding <kbd>shift</kbd>.
|
2019-08-29 22:48:25 +02:00
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
<kbd>left</kbd> - **double-click**
|
|
|
|
|
: Selects the _word_ (separated by spaces, period, comma, parenthesis
|
2019-08-29 22:50:35 +02:00
|
|
|
etc) under the pointer. Hold <kbd>ctrl</kbd> to select everything
|
|
|
|
|
under the pointer up to, and until, the next space characters.
|
2019-08-29 22:48:25 +02:00
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
<kbd>left</kbd> - **triple-click**
|
|
|
|
|
: Selects the entire row
|
2019-08-29 23:12:39 +02:00
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
<kbd>middle</kbd>
|
|
|
|
|
: Paste from _primary_ selection
|
2019-11-03 12:24:14 +01:00
|
|
|
|
2020-01-01 15:01:27 +01:00
|
|
|
<kbd>wheel</kbd>
|
|
|
|
|
: Scroll up/down in history
|
2019-11-03 12:24:14 +01:00
|
|
|
|
2019-08-29 23:12:39 +02:00
|
|
|
|
2019-11-19 00:17:13 +01:00
|
|
|
## Server mode
|
|
|
|
|
|
|
|
|
|
When run normally, **foot** is a single-window application; if you
|
|
|
|
|
want another window, start another foot process.
|
|
|
|
|
|
|
|
|
|
However, foot can also be run in a _server_ mode. In this mode, one
|
|
|
|
|
process hosts multiple windows. Note that this is **nothing** like
|
|
|
|
|
tabs. When first started in server mode, **no** windows are available.
|
|
|
|
|
|
|
|
|
|
You open new windows by running `footclient`. This is a small process
|
|
|
|
|
that instructs the foot server to open a new terminal window. The
|
|
|
|
|
client process remains running until the terminal window is
|
|
|
|
|
closed. The exit value of the client process is that of the shell that
|
|
|
|
|
was running in the terminal window.
|
|
|
|
|
|
|
|
|
|
The point of this mode is **a)** reduced memory footprint - all
|
|
|
|
|
terminal windows will share fonts and glyph cache, and **b)** reduced
|
|
|
|
|
startup time - loading fonts and populating the glyph cache takes
|
|
|
|
|
time, but in server mode it only happens once.
|
|
|
|
|
|
|
|
|
|
The downside is a performance penalty; all windows' input and output
|
|
|
|
|
are multiplexed in the same thread (but each window will have its own
|
|
|
|
|
set of rendering threads). This means that if one window is very busy
|
|
|
|
|
with, for example, producing output, then other windows will suffer.
|
|
|
|
|
|
|
|
|
|
And of course, should the server process crash, **all** windows will
|
|
|
|
|
be gone.
|
|
|
|
|
|
|
|
|
|
Typical usage would be to start the server process (`foot --server`)
|
|
|
|
|
when starting your Wayland compositor (i.e. logging in to your
|
|
|
|
|
desktop), and then run `footclient` instead of `foot` whenever you
|
|
|
|
|
want to launch a new terminal.
|
|
|
|
|
|
|
|
|
|
|
2019-08-29 23:12:39 +02:00
|
|
|
## Requirements
|
|
|
|
|
|
|
|
|
|
### Running
|
|
|
|
|
|
|
|
|
|
* fontconfig
|
|
|
|
|
* freetype
|
|
|
|
|
* pixman
|
|
|
|
|
* wayland (_client_ and _cursor_ libraries)
|
|
|
|
|
* xkbcommon
|
2019-12-01 13:57:59 +01:00
|
|
|
* [tllist](https://codeberg.org/dnkl/tllist), _unless_ built as a subproject
|
|
|
|
|
* [fcft](https://codeberg.org/dnkl/fcft), _unless_ built as a subproject
|
2019-08-29 23:12:39 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
### Building
|
|
|
|
|
|
|
|
|
|
In addition to the dev variant of the packages above, you need:
|
|
|
|
|
|
|
|
|
|
* meson
|
|
|
|
|
* ninja
|
|
|
|
|
* wayland protocols
|
|
|
|
|
* ncurses
|
|
|
|
|
* scdoc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Installing
|
|
|
|
|
|
2019-12-29 15:28:34 +01:00
|
|
|
foot makes use of a couple of libraries I have developed:
|
|
|
|
|
[tllist](https://codeberg.org/dnkl/tllist) and
|
|
|
|
|
[fcft](https://codeberg.org/dnkl/fcft). As such, they will most likely
|
|
|
|
|
not have been installed already. You can either install them as system
|
|
|
|
|
libraries, or you can build them as _subprojects_ in foot.
|
|
|
|
|
|
|
|
|
|
When building foot, they will first be searched for as system
|
|
|
|
|
libraries. If **found**, foot will link dynamically against them.
|
|
|
|
|
|
|
|
|
|
If **not** found, they will be searched for as subprojects. In a foot
|
|
|
|
|
git clone, they will be available as git _submodules_ and you can
|
|
|
|
|
simply check them out with `git submodule update --init`. In this
|
|
|
|
|
case, foot will link statically against them.
|
|
|
|
|
|
|
|
|
|
If you have downloaded a zip/tar file, you need to manually copy the
|
|
|
|
|
correct version of the library source code into the `subprojects`
|
|
|
|
|
folder. If you are unsure how to do this, it might be easier to
|
|
|
|
|
install them as system libraries.
|
|
|
|
|
|
|
|
|
|
|
2019-08-29 23:12:39 +02:00
|
|
|
### Arch Linux
|
|
|
|
|
|
|
|
|
|
Use [makepkg](https://wiki.archlinux.org/index.php/Makepkg) to build
|
2019-11-03 12:24:14 +01:00
|
|
|
the bundled [PKGBUILD](PKGBUILD) (run `makepkg` in the source root
|
2019-11-03 13:54:12 +01:00
|
|
|
directory).
|
2019-08-29 23:12:39 +02:00
|
|
|
|
2019-12-29 15:28:34 +01:00
|
|
|
It **requires** [tllist](https://codeberg.org/dnkl/tllist) and
|
|
|
|
|
[fcft](https://codeberg.org/dnkl/fcft) to be installed as system
|
|
|
|
|
libraries. If you do not want this, please edit the PKGBUILD file, or
|
|
|
|
|
install manually (see [Other](#other) below).
|
|
|
|
|
|
2019-08-29 23:15:13 +02:00
|
|
|
Note that it will do a profiling-guided build, and that this requires
|
|
|
|
|
a running wayland session since it needs to run an intermediate build
|
|
|
|
|
of foot.
|
|
|
|
|
|
2019-08-29 23:12:39 +02:00
|
|
|
|
|
|
|
|
### Other
|
|
|
|
|
|
|
|
|
|
Foot uses _meson_. If you are unfamiliar with it, the official
|
|
|
|
|
[tutorial](https://mesonbuild.com/Tutorial.html) might be a good
|
|
|
|
|
starting point.
|
|
|
|
|
|
2019-10-05 16:41:20 +02:00
|
|
|
I also recommend taking a look at the bundled Arch
|
2019-12-29 15:28:34 +01:00
|
|
|
[PKGBUILD](PKGBUILD) file, to see how it builds foot. Especially so if
|
|
|
|
|
you intend to install a release build of foot, in which case you might
|
|
|
|
|
be interested in the compiler flags used there.
|
|
|
|
|
|
|
|
|
|
First, create a build directory, and switch to it:
|
2019-12-29 15:37:35 +01:00
|
|
|
```sh
|
|
|
|
|
mkdir -p bld/debug && cd bld/debug
|
|
|
|
|
```
|
2019-12-29 15:28:34 +01:00
|
|
|
|
|
|
|
|
Second, configure the build (if you intend to install it globally, you
|
|
|
|
|
might also want `--prefix=/usr`):
|
2019-12-29 15:37:35 +01:00
|
|
|
```sh
|
|
|
|
|
meson --buildtype=debug ../..
|
|
|
|
|
```
|
2019-12-29 15:28:34 +01:00
|
|
|
|
|
|
|
|
Three, build it:
|
2019-12-29 15:37:35 +01:00
|
|
|
```sh
|
|
|
|
|
ninja
|
|
|
|
|
```
|
2019-12-29 15:28:34 +01:00
|
|
|
|
|
|
|
|
You can now run it directly from the build directory:
|
2019-12-29 15:37:35 +01:00
|
|
|
```sh
|
|
|
|
|
./foot
|
|
|
|
|
```
|
2019-12-29 15:28:34 +01:00
|
|
|
|
|
|
|
|
But note that it will default to `TERM=foot`, and that this terminfo
|
|
|
|
|
has not been installed yet. However, most things should work with the
|
|
|
|
|
`xterm-256color` terminfo:
|
2019-12-29 15:37:35 +01:00
|
|
|
```sh
|
|
|
|
|
./foot --term xterm-256color
|
|
|
|
|
```
|
2019-12-29 15:28:34 +01:00
|
|
|
|
|
|
|
|
But, I **recommend** you install the `foot` and `foot-direct` terminfo
|
|
|
|
|
files. You can either copy them manually (typically to
|
|
|
|
|
`/usr/share/terminfo/f` - but this is dependens on the distro), or
|
|
|
|
|
just install everything:
|
2019-12-29 15:37:35 +01:00
|
|
|
```sh
|
|
|
|
|
ninja install
|
|
|
|
|
```
|