A fast, lightweight and minimalistic Wayland terminal emulator
Find a file
Daniel Eklöf 135dbc301c
README: expand the 'install' section
* Talk about tllist + fcft
* Mention that the PKGBUILD requires tllist+fcft to be installed as
  system libraries
* Provide a short how-to-configure-and build with meson description
2019-12-29 15:28:34 +01:00
completions completions: zsh: footclient: auto-complete files for -s,--server-socket 2019-12-17 19:10:19 +01:00
doc doc: foot.5: mention that setting workers=0 disables multithreading 2019-12-17 19:09:19 +01:00
scripts script: generate-alt-random: reduce output size 2019-12-19 20:01:52 +01:00
subprojects fcft: update to 0.4.0 2019-12-05 19:33:18 +01:00
.gitignore gitignore: makepkg generated directories (pkg + src) 2019-11-24 18:46:35 +01:00
.gitlab-ci.yml ci: run unit tests 2019-11-18 17:03:30 +01:00
.gitmodules fcft: use fcft instead of local copy of font.c/font.h 2019-12-01 13:43:51 +01:00
async.c async: add async_write(), a write primitive to write to a NONBLOCK:ing FD 2019-11-04 13:46:30 +01:00
async.h async: add async_write(), a write primitive to write to a NONBLOCK:ing FD 2019-11-04 13:46:30 +01:00
base64.c base64: implement encode() 2019-07-19 14:19:42 +02:00
base64.h base64: implement encode() 2019-07-19 14:19:42 +02:00
client.c client/server: client sends its CWD to server 2019-12-21 19:56:37 +01:00
commands.c commands: scrollback: don't scrollback if mouse tracking is enabled 2019-11-30 16:57:52 +01:00
commands.h scrollback: initial support for mouse scrolling 2019-07-10 09:15:37 +02:00
config.c config: enable user to specify path to configuration file 2019-12-17 19:08:43 +01:00
config.h config: enable user to specify path to configuration file 2019-12-17 19:08:43 +01:00
csi.c csi: change DA3 reply to "FOOT", in hex 2019-12-21 20:35:55 +01:00
csi.h performance improvements 2019-07-07 16:32:18 +02:00
fdm.c fdm: close fd even if we didn't find it in our list 2019-12-15 15:06:09 +01:00
fdm.h fdm: add fdm_event_add() and fdm_event_del() 2019-11-03 00:52:24 +01:00
foot.desktop desktop: clean up, remove unsupported entries 2019-09-29 20:50:27 +02:00
foot.info terminfo: set RGB flag in foot-direct 2019-12-26 17:57:45 +01:00
footrc config: change default bright5 and bright 6 colors 2019-09-21 12:09:50 +02:00
generate-version.sh generate-version: redirect *both* stdout and stderr to /dev/null 2019-11-27 21:19:59 +01:00
grid.c grid: remove commented out code 2019-08-23 20:07:27 +02:00
grid.h search: wip: initial search matching 2019-08-27 19:33:19 +02:00
input.c term: term_spawn_new(): new function, spawns a new foot/footclient process 2019-12-21 15:27:17 +01:00
input.h input: input_repeat() takes a 'struct wayland' pointer 2019-10-27 18:44:58 +01:00
keymap.h keymap: add meta modifier mappings for keypad keys 2019-08-15 20:07:33 +02:00
LICENSE add license 2019-06-12 20:10:12 +02:00
log.c log: caller can control syslog level 2019-12-17 19:07:28 +01:00
log.h log: caller can control syslog level 2019-12-17 19:07:28 +01:00
main.c term: term_init: add 'cwd' argument 2019-12-21 19:57:28 +01:00
meson.build PKGBUILD/meson: bump version to 1.0.0 2019-12-15 12:43:46 +01:00
misc.c selection: break out isword() to a new file 2019-12-03 19:16:58 +01:00
misc.h selection: break out isword() to a new file 2019-12-03 19:16:58 +01:00
osc.c osc: implement OSC 7 - set PWD 2019-12-21 19:42:59 +01:00
osc.h ocs: renamed parameter size -> required_size in osc_ensure_size() 2019-07-19 09:56:00 +02:00
PKGBUILD PKGBUILD: run foot with the default configuration 2019-12-19 20:00:54 +01:00
README.md README: expand the 'install' section 2019-12-29 15:28:34 +01:00
render.c render: fix bug when erasing old cursor; send correct compositor damage 2019-12-19 07:29:05 +01:00
render.h render: attrs_to_font: const:ify 2019-12-19 07:28:33 +01:00
search.c search: match_to_end_of_word: reset end_col when done with a row 2019-12-03 20:26:32 +01:00
search.h search: wip: re-direct input while searching, and build a search buffer 2019-08-27 17:23:28 +02:00
selection.c selection: optimize \r\n -> \n when receiving clipboard data 2019-12-15 12:11:12 +01:00
selection.h selection: document the asynchronous behavior of text_from_{primary,clipboard} 2019-11-05 09:13:47 +01:00
server.c server: verify CWD string length matches the indicated length 2019-12-21 20:05:14 +01:00
server.h server: implement a --server mode 2019-11-01 20:39:09 +01:00
shm.c fcft: include <fcft/fcft.h>, and use fcft/stride.h instead of local copy 2019-12-01 14:03:24 +01:00
shm.h shm: automatic buffer purging is now delayed one cycle 2019-11-02 01:27:05 +01:00
slave.c term: term_init: add 'cwd' argument 2019-12-21 19:57:28 +01:00
slave.h term: term_init: add 'cwd' argument 2019-12-21 19:57:28 +01:00
terminal.c term: term_init: add 'cwd' argument 2019-12-21 19:57:28 +01:00
terminal.h term: term_init: add 'cwd' argument 2019-12-21 19:57:28 +01:00
tokenize.c slave: break out command line tokenizer 2019-07-17 09:46:45 +02:00
tokenize.h slave: break out command line tokenizer 2019-07-17 09:46:45 +02:00
vt.c Revert "vt: refactor" 2019-12-20 23:59:23 +01:00
vt.h Rename: vt_to_slave() -> term_to_slave() 2019-11-03 00:52:24 +01:00
wayland.c wayland: include more output (monitor) details in the log output 2019-12-05 19:35:34 +01:00
wayland.h wayland: include more output (monitor) details in the log output 2019-12-05 19:35:34 +01:00

foot

foot is a fast Wayland terminal emulator.

Index

  1. Features
  2. Non-features
  3. What does not work?
  4. Fonts
  5. Shortcuts
    1. Keyboard
    2. Mouse
  6. Server mode
  7. Requirements
    1. Running
    2. Building
  8. Installing
    1. Arch Linux
    2. Other

Features

  • Fast (TODO insert benchmark results here)
  • Wayland native
  • DE agnostic
  • User configurable font fallback
  • Scrollback search
  • Color emoji support
  • "Server" mode (one master process, many windows)

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
  • Graphical elements (menu, buttons etc)

What does not work?

This is a list of known, but probably not all, issues:

  • Unicode combining characters

    Examples: á (LATIN SMALL LETTER A + COMBINING ACUTE ACCENT)

  • Reflow text on window resize

  • GNOME; might work, but without window decorations.

    Strictly speaking, foot is at fault here; all Wayland applications must be able to draw their own window decorations (but foot is not).

    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".

Fonts

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!

If a glyph cannot be found in any of the user configured fallback fonts, then fontconfig's list is used.

Shortcuts

At the moment, all shortcuts are hard coded and cannot be changed. It is not possible to define new key bindings.

Keyboard

  • shift+page up/page down

    Scroll up/down in history

  • ctrl+shift+c

    Copy selected text to the clipboard

  • ctrl+shift+v

    Paste from clipboard

  • ctrl+shift+r

    Start a scrollback search

While doing a scrollback search, the following shortcuts are available:

  • ctrl+r

    Search backward for next match

  • ctrl+s

    Search forward for next match

  • ctrl+w

    Extend current selection (and thus the search criteria) to the end of the word, or the next word if currently at a word separating character.

  • ctrl+shiftw

    Same as ctrl+w, except that the only word separating characters are whitespace characters.

  • escape, ctrl+g

    Cancel the search

  • return

    Finish the search and copy the current match to the primary selection

Mouse

  • left - single-click

    Drag to select; when released, the selected text is copied to the primary selection. Note that this feature is normally disabled whenever the client has enabled mouse tracking, but can be forced by holding shift.

  • left - double-click

    Selects the word (separated by spaces, period, comma, parenthesis etc) under the pointer. Hold ctrl to select everything under the pointer up to, and until, the next space characters.

  • left - triple-click

    Selects the entire row

  • middle

    Paste from primary selection

  • wheel

    Scroll up/down in history

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.

Requirements

Running

  • fontconfig
  • freetype
  • pixman
  • wayland (client and cursor libraries)
  • xkbcommon
  • tllist, unless built as a subproject
  • fcft, unless built as a subproject

Building

In addition to the dev variant of the packages above, you need:

  • meson
  • ninja
  • wayland protocols
  • ncurses
  • scdoc

Installing

foot makes use of a couple of libraries I have developed: tllist and 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.

Arch Linux

Use makepkg to build the bundled PKGBUILD (run makepkg in the source root directory).

It requires tllist and fcft to be installed as system libraries. If you do not want this, please edit the PKGBUILD file, or install manually (see Other below).

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.

Other

Foot uses meson. If you are unfamiliar with it, the official tutorial might be a good starting point.

I also recommend taking a look at the bundled Arch 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:

mkdir -p bld/debug && cd bld/debug

Second, configure the build (if you intend to install it globally, you might also want --prefix=/usr):

meson --buildtype=debug ../..

Three, build it:

ninja

You can now run it directly from the build directory:

./foot

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:

./foot --term xterm-256color

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:

ninja install