2019-08-11 20:54:28 +02:00
|
|
|
foot(1)
|
|
|
|
|
|
|
|
|
|
# NAME
|
2022-04-21 10:04:11 +02:00
|
|
|
|
2019-08-11 20:54:28 +02:00
|
|
|
foot - Wayland terminal emulator
|
|
|
|
|
|
|
|
|
|
# SYNOPSIS
|
2022-04-21 10:04:11 +02:00
|
|
|
|
2019-08-15 19:17:51 +02:00
|
|
|
*foot* [_OPTIONS_]++
|
2020-05-08 18:43:03 +02:00
|
|
|
*foot* [_OPTIONS_] <_command_> [_COMMAND OPTIONS_]
|
2019-08-15 19:17:51 +02:00
|
|
|
|
2020-05-08 18:43:03 +02:00
|
|
|
All trailing (non-option) arguments are treated as a command, and its
|
|
|
|
|
arguments, to execute (instead of the default shell).
|
2019-08-11 20:54:28 +02:00
|
|
|
|
2020-08-13 18:34:24 +02:00
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
|
|
*foot* is a Wayland terminal emulator. Running it without arguments
|
|
|
|
|
will start a new terminal window with your default shell.
|
|
|
|
|
|
|
|
|
|
You can override the default shell by appending a custom command to
|
|
|
|
|
the foot command line
|
|
|
|
|
|
2020-10-08 19:54:28 +02:00
|
|
|
*foot sh -c "echo hello world && sleep 5"*
|
2020-08-13 18:34:24 +02:00
|
|
|
|
2019-08-11 20:54:28 +02:00
|
|
|
# OPTIONS
|
|
|
|
|
|
2019-12-17 19:09:09 +01:00
|
|
|
*-c*,*--config*=_PATH_
|
2022-04-21 10:04:11 +02:00
|
|
|
Path to configuration file, see *foot.ini*(5) for details.
|
2019-12-17 19:09:09 +01:00
|
|
|
|
2020-11-23 19:19:19 +01:00
|
|
|
*-C*,*--check-config*
|
2020-07-29 17:48:22 +02:00
|
|
|
Verify configuration and then exit with 0 if ok, otherwise exit
|
2021-05-01 10:58:35 +02:00
|
|
|
with 230 (see *EXIT STATUS*).
|
2020-07-29 17:48:22 +02:00
|
|
|
|
2021-06-23 14:34:09 +02:00
|
|
|
*-o*,*--override*=[_SECTION_.]_KEY_=_VALUE_
|
2021-06-11 04:40:08 -05:00
|
|
|
Override an option set in the configuration file. If _SECTION_ is not
|
2021-06-23 14:34:09 +02:00
|
|
|
given, defaults to _main_.
|
2021-06-11 04:40:08 -05:00
|
|
|
|
2019-08-11 20:54:28 +02:00
|
|
|
*-f*,*--font*=_FONT_
|
2019-09-21 20:01:55 +02:00
|
|
|
Comma separated list of fonts to use, in fontconfig format (see
|
|
|
|
|
*FONT FORMAT*).
|
|
|
|
|
|
|
|
|
|
The first font is the primary font. The remaining fonts are
|
|
|
|
|
fallback fonts that will be used whenever a glyph cannot be found
|
|
|
|
|
in the primary font.
|
|
|
|
|
|
|
|
|
|
The fallback fonts are searched in the order they appear. If a
|
|
|
|
|
glyph cannot be found in any of the fallback fonts, the dynamic
|
|
|
|
|
fallback list from fontconfig (for the primary font) is
|
|
|
|
|
searched.
|
|
|
|
|
|
|
|
|
|
Default: _monospace_.
|
2019-08-11 20:54:28 +02:00
|
|
|
|
2020-09-08 19:17:29 +02:00
|
|
|
*-w*,*--window-size-pixels*=_WIDTHxHEIGHT_
|
|
|
|
|
Set initial window width and height, in pixels. Default: _700x500_.
|
|
|
|
|
|
|
|
|
|
*-W*,*--window-size-chars*=_WIDTHxHEIGHT_
|
|
|
|
|
Set initial window width and height, in characters. Default: _not set_.
|
|
|
|
|
|
2019-08-11 20:54:28 +02:00
|
|
|
*-t*,*--term*=_TERM_
|
2021-05-30 10:52:01 +02:00
|
|
|
Value to set the environment variable *TERM* to (see *TERMINFO*
|
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-07 16:42:51 +02:00
|
|
|
and *ENVIRONMENT*). Default: _@default_terminfo@_.
|
2020-04-01 18:40:51 +02:00
|
|
|
|
2020-11-23 19:19:19 +01:00
|
|
|
*-T*,*--title*=_TITLE_
|
2020-04-01 19:59:47 +02:00
|
|
|
Initial window title. Default: _foot_.
|
|
|
|
|
|
2020-04-01 18:40:51 +02:00
|
|
|
*-a*,*--app-id*=_ID_
|
|
|
|
|
Value to set the *app-id* property on the Wayland window
|
2023-05-02 01:53:01 +10:00
|
|
|
to. Default: _foot_ (normal mode), or _footclient_ (server mode).
|
2019-08-11 20:54:28 +02:00
|
|
|
|
2020-11-23 19:19:19 +01:00
|
|
|
*-m*,*--maximized*
|
2020-03-26 19:47:00 +01:00
|
|
|
Start in maximized mode. If both *--maximized* and *--fullscreen*
|
|
|
|
|
are specified, the _last_ one takes precedence.
|
|
|
|
|
|
2020-11-23 19:19:19 +01:00
|
|
|
*-F*,*--fullscreen*
|
2020-03-26 19:47:00 +01:00
|
|
|
Start in fullscreen mode. If both *--maximized* and *--fullscreen*
|
|
|
|
|
are specified, the _last_ one takes precedence.
|
|
|
|
|
|
2021-02-12 09:43:05 +01:00
|
|
|
*-L*,*--login-shell*
|
2020-02-20 18:36:52 +01:00
|
|
|
Start a login shell, by prepending a '-' to argv[0].
|
|
|
|
|
|
2021-02-12 09:43:20 +01:00
|
|
|
*-D*,*--working-directory*=_DIR_
|
|
|
|
|
Initial working directory for the client application. Default:
|
|
|
|
|
_CWD of foot_.
|
|
|
|
|
|
2022-01-15 17:37:31 +01:00
|
|
|
*-s*,*--server*[=_PATH_|_FD_]
|
2019-11-03 13:46:47 +01:00
|
|
|
Run as a server. In this mode, a single foot instance hosts
|
2019-11-19 14:02:17 +01:00
|
|
|
multiple terminals (windows). Use *footclient*(1) to launch new
|
2019-11-03 13:46:47 +01:00
|
|
|
terminals.
|
|
|
|
|
|
|
|
|
|
This saves some memory since for example fonts and glyph caches
|
|
|
|
|
can be shared between the terminals.
|
|
|
|
|
|
|
|
|
|
It also saves upstart time since the config has already been
|
|
|
|
|
loaded and parsed, and most importantly, fonts have already been
|
|
|
|
|
loaded (and their glyph caches are likely to already have been
|
|
|
|
|
populated).
|
2019-12-14 13:01:37 +01:00
|
|
|
|
2019-11-03 13:46:47 +01:00
|
|
|
Each terminal will have its own rendering threads, but all Wayland
|
|
|
|
|
communication, as well as input/output to the shell, is
|
|
|
|
|
multiplexed in the main thread. Thus, this mode might result in
|
|
|
|
|
slightly worse performance when multiple terminals are under heavy
|
|
|
|
|
load.
|
|
|
|
|
|
|
|
|
|
Also be aware that should one terminal crash, it will take all the
|
|
|
|
|
others with it.
|
2019-12-14 13:01:37 +01:00
|
|
|
|
2020-08-02 12:28:53 +02:00
|
|
|
The default path is
|
2020-08-02 13:10:31 +02:00
|
|
|
*$XDG\_RUNTIME\_DIR/foot-$WAYLAND\_DISPLAY.sock*.
|
2020-08-02 12:28:53 +02:00
|
|
|
|
2020-08-02 13:10:31 +02:00
|
|
|
If *$XDG\_RUNTIME\_DIR* is not set, the default path is instead
|
2020-08-02 12:28:53 +02:00
|
|
|
*/tmp/foot.sock*.
|
|
|
|
|
|
2020-08-02 13:10:31 +02:00
|
|
|
If *$XDG\_RUNTIME\_DIR* is set, but *$WAYLAND\_DISPLAY* is not,
|
|
|
|
|
the default path is *$XDG\_RUNTIME\_DIR/foot.sock*.
|
2020-08-02 12:28:53 +02:00
|
|
|
|
|
|
|
|
Note that if you change the default, you will also need to use the
|
|
|
|
|
*--server-socket* option in *footclient*(1) and point it to your
|
|
|
|
|
custom socket path.
|
2019-11-03 13:46:47 +01:00
|
|
|
|
2022-01-15 17:37:31 +01:00
|
|
|
If the argument is a number, foot will interpret it as the file descriptor
|
|
|
|
|
of a socket provided by a supervision daemon (such as systemd or s6), and
|
|
|
|
|
use that socket as it's own.
|
|
|
|
|
|
2023-02-14 12:11:40 +01:00
|
|
|
Two systemd units (foot-server.{service,socket}) are provided to use that
|
|
|
|
|
feature with systemd. To use socket activation, only enable the
|
|
|
|
|
socket unit.
|
2022-01-15 17:37:31 +01:00
|
|
|
|
|
|
|
|
Note that starting *foot --server* as a systemd service will use
|
2023-02-14 12:11:40 +01:00
|
|
|
the environment of the systemd user instance; thus, you'll need
|
|
|
|
|
to import *$WAYLAND_DISPLAY* in it using *systemctl --user
|
|
|
|
|
import-environment WAYLAND_DISPLAY*.
|
2022-01-15 17:37:31 +01:00
|
|
|
|
2020-11-23 19:19:19 +01:00
|
|
|
*-H*,*--hold*
|
2020-02-03 19:58:32 +01:00
|
|
|
Remain open after child process exits.
|
|
|
|
|
|
2020-02-05 19:53:50 +01:00
|
|
|
*-p*,*--print-pid*=_FILE_|_FD_
|
|
|
|
|
Print PID to this file, or FD, when successfully started. The file
|
|
|
|
|
(or FD) is closed immediately after writing the PID. When a _FILE_
|
2020-03-17 12:52:00 +01:00
|
|
|
as been specified, the file is unlinked at exit.
|
2020-02-05 19:53:50 +01:00
|
|
|
|
|
|
|
|
This option can only be used in combination with *-s*,*--server*.
|
|
|
|
|
|
2021-06-26 22:15:09 +01:00
|
|
|
*-d*,*--log-level*={*info*,*warning*,*error*,*none*}
|
2021-02-09 21:11:22 +01:00
|
|
|
Log level, used both for log output on stderr as well as
|
change default log level to WARNING
The default foot output looks like this, in Debian testing "bookworm"
at the time of writing:
anarcat@angela:pubpaste$ foot true
info: main.c:421: version: 1.13.1 +pgo +ime +graphemes -assertions
info: main.c:428: arch: Linux x86_64/64-bit
info: main.c:440: locale: fr_CA.UTF-8
info: config.c:3003: loading configuration from /home/anarcat/.config/foot/foot.ini
info: fcft.c:338: fcft: 3.1.5 +graphemes -runs +svg(nanosvg) -assertions
info: fcft.c:377: fontconfig: 2.13.1, freetype: 2.12.1, harfbuzz: 5.2.0
info: fcft.c:838: /home/anarcat/.local/share/fonts/Fira-4.202/otf/FiraMono-Regular.otf: size=8.00pt/8px, dpi=75.00
info: wayland.c:1353: eDP-1: 2256x1504+0x0@60Hz 0x095F 13.32" scale=2 PPI=205x214 (physical) PPI=136x143 (logical), DPI=271.31
info: wayland.c:1509: requesting SSD decorations
info: fcft.c:838: /home/anarcat/.local/share/fonts/Fira-4.202/otf/FiraMono-Bold.otf: size=24.00pt/32px, dpi=96.00
info: fcft.c:838: /home/anarcat/.local/share/fonts/Fira-4.202/otf/FiraMono-Regular.otf: size=24.00pt/32px, dpi=96.00
info: fcft.c:838: /home/anarcat/.local/share/fonts/Fira-4.202/otf/FiraMono-Bold.otf: size=24.00pt/32px, dpi=96.00
info: fcft.c:838: /home/anarcat/.local/share/fonts/Fira-4.202/otf/FiraMono-Regular.otf: size=24.00pt/32px, dpi=96.00
info: terminal.c:700: cell width=19, height=39
info: terminal.c:588: using 16 rendering threads
info: wayland.c:859: using SSD decorations
info: main.c:680: goodbye
anarcat@angela:pubpaste$
That's 17 lines of output that are *mostly* useless for most use
cases. I might understand having this output during the project's
startup, when it's helpful for diagnostics, but now Foot just mostly
works everywhere, and I've never had a use for any of that stuff in
the (arguably short) time I've been using Foot so far.
And if I do, there's the `--log-level` commandline option to tweak
this. At first, I looked at tweaking the log level through the config
file. But as explained in this issue:
https://codeberg.org/dnkl/foot/issues/1142
... there's a chicken and egg problem there that makes it hard to
implement and possibly confusing for users as well.
There's also the possibility for users to change the shortcut with
which they start foot, for example a `.desktop` file so that menu
systems that support those start foot properly. But that only works in
that environment, and not through the so many things that will just
call `foot` and hope it will do the right thing.
In my case, I have `foot` hardcoded in a lot of places now, between
sway and waybar, and this is only going to grow. Others have suggested
adding the flag to a $TERMINAL global variable, but that won't help
.desktop users.
So, instead of playing whack-a-mole with the log levels, just make it
so that, by default, foot is silent. This is actually one of the
[basics of UNIX philosophy][1]:
> Rule of Silence: When a program has nothing surprising to say, it
> should say nothing.
And yes, I am aware I am severely violating that principle by writing
a way too long commit log for a one-line patch, but there you go, I
figured it was good to document the why of this properly.
[1]: https://web.archive.org/web/20031102053334/http://www.faqs.org/docs/artu/ch01s06.html
2022-11-18 11:07:16 -05:00
|
|
|
syslog. Default: _warning_.
|
2021-02-09 21:11:22 +01:00
|
|
|
|
2020-02-05 19:54:16 +01:00
|
|
|
*-l*,*--log-colorize*=[{*never*,*always*,*auto*}]
|
2020-03-17 12:54:33 +01:00
|
|
|
Enables or disables colorization of log output on stderr. Default:
|
|
|
|
|
_auto_.
|
2020-02-05 19:54:16 +01:00
|
|
|
|
|
|
|
|
*-S*,*--log-no-syslog*
|
|
|
|
|
Disables syslog logging. Logging is only done on stderr. This
|
|
|
|
|
option can only be used in combination with *-s*,*--server*.
|
|
|
|
|
|
2019-08-11 20:54:28 +02:00
|
|
|
*-v*,*--version*
|
2019-12-17 19:09:09 +01:00
|
|
|
Show the version number and quit.
|
2019-08-11 20:54:28 +02:00
|
|
|
|
2021-09-18 23:40:40 +01:00
|
|
|
*-e*
|
|
|
|
|
Ignored; for compatibility with *xterm -e*.
|
|
|
|
|
|
|
|
|
|
This option was added in response to several program launchers
|
|
|
|
|
passing *-e* to arbitrary terminals, under the assumption that
|
|
|
|
|
they all implement the same semantics for it as *xterm*(1).
|
|
|
|
|
Ignoring it allows foot to be invoked as e.g. *foot -e man foot*
|
|
|
|
|
with the same results as with xterm, instead of producing an
|
|
|
|
|
"invalid option" error.
|
|
|
|
|
|
2019-08-30 20:26:29 +02:00
|
|
|
# KEYBOARD SHORTCUTS
|
|
|
|
|
|
2022-01-27 18:39:12 +01:00
|
|
|
The following keyboard shortcuts are available by default. They can be
|
|
|
|
|
changed in *foot.ini*(5). There are also more actions (disabled by
|
|
|
|
|
default) available; see *foot.ini*(5).
|
2019-08-30 20:26:29 +02:00
|
|
|
|
2020-01-04 14:57:59 +01:00
|
|
|
## NORMAL MODE
|
|
|
|
|
|
2019-08-30 20:26:29 +02:00
|
|
|
*shift*+*page up*/*page down*
|
|
|
|
|
Scroll up/down in history
|
|
|
|
|
|
2022-01-27 18:45:22 +01:00
|
|
|
*ctrl*+*shift*+*c*, *XF86Copy*
|
2019-08-30 20:26:29 +02:00
|
|
|
Copy selected text to the _clipboard_
|
|
|
|
|
|
2022-01-27 18:45:22 +01:00
|
|
|
*ctrl*+*shift*+*v*, *XF86Paste*
|
2019-08-30 20:26:29 +02:00
|
|
|
Paste from _clipboard_
|
|
|
|
|
|
2020-10-10 23:36:41 +02:00
|
|
|
*shift*+*insert*
|
|
|
|
|
Paste from the _primary selection_.
|
|
|
|
|
|
2019-08-30 20:26:29 +02:00
|
|
|
*ctrl*+*shift*+*r*
|
|
|
|
|
Start a scrollback search
|
|
|
|
|
|
2020-02-10 21:57:55 +01:00
|
|
|
*ctrl*+*+*, *ctrl*+*=*
|
2022-04-04 01:28:03 +02:00
|
|
|
Increase font size by 0.5pt
|
2020-02-09 11:36:49 +01:00
|
|
|
|
|
|
|
|
*ctrl*+*-*
|
2022-04-04 01:28:03 +02:00
|
|
|
Decrease font size by 0.5pt
|
2020-02-09 11:36:49 +01:00
|
|
|
|
2020-02-10 21:57:55 +01:00
|
|
|
*ctrl*+*0*
|
2020-02-09 11:36:49 +01:00
|
|
|
Reset font size
|
|
|
|
|
|
2020-03-17 21:52:44 +01:00
|
|
|
*ctrl*+*shift*+*n*
|
|
|
|
|
Spawn a new terminal. If the shell has been configured to emit the
|
|
|
|
|
_OSC 7_ escape sequence, the new terminal will start in the
|
|
|
|
|
current working directory.
|
|
|
|
|
|
2023-07-10 12:36:55 +02:00
|
|
|
*ctrl*+*shift*+*o*
|
2022-01-27 18:54:38 +01:00
|
|
|
Activate URL mode, allowing you to "launch" URLs.
|
2022-01-27 18:45:41 +01:00
|
|
|
|
2023-07-10 12:37:10 +02:00
|
|
|
*ctrl*+*shift*+*u*
|
|
|
|
|
Activate Unicode input.
|
|
|
|
|
|
osc: add support for OSC 133;A (prompt markers)
This patch adds support for the OSC-133;A sequence, introduced by
FinalTerm and implemented by iTerm2, Kitty and more. See
https://iterm2.com/documentation-one-page.html#documentation-escape-codes.html.
The shell emits the OSC just before printing the prompt. This lets the
terminal know where, in the scrollback, there are prompts.
We implement this using a simple boolean in the row struct ("this row
has a prompt"). The prompt marker must be reflowed along with the text
on window resizes.
In an ideal world, erasing, or overwriting the cell where the OSC was
emitted, would remove the prompt mark. Since we don't store this
information in the cell struct, we can't do that. The best we can do
is reset it in erase_line(). This works well enough in the "normal"
screen, when used with a "normal" shell. It doesn't really work in
fullscreen apps, on the alt screen. But that doesn't matter since we
don't support jumping between prompts on the alt screen anyway.
To be able to jump between prompts, two new key bindings have been
added: prompt-prev and prompt-next, bound to ctrl+shift+z and
ctrl+shift+x respectively.
prompt-prev will jump to the previous, not currently visible, prompt,
by moving the viewport, ensuring the prompt is at the top of the
screen.
prompt-next jumps to the next prompt, visible or not. Again, by moving
the viewport to ensure the prompt is at the top of the screen. If
we're at the bottom of the scrollback, the viewport is instead moved
as far down as possible.
Closes #30
2022-06-15 18:44:23 +02:00
|
|
|
*ctrl*+*shift*+*z*
|
|
|
|
|
Jump to the previous, currently not visible, prompt. Requires
|
|
|
|
|
shell integration.
|
|
|
|
|
|
|
|
|
|
*ctrl*+*shift*+*x*
|
|
|
|
|
Jump to the next prompt. Requires shell integration.
|
|
|
|
|
|
2020-01-04 14:57:59 +01:00
|
|
|
## SCROLLBACK SEARCH
|
2019-08-30 20:26:29 +02:00
|
|
|
|
|
|
|
|
*ctrl*+*r*
|
2022-01-27 18:39:46 +01:00
|
|
|
Search _backward_ for the next match. If the search string is
|
|
|
|
|
empty, the last searched-for string is used.
|
2019-08-30 20:26:29 +02:00
|
|
|
|
|
|
|
|
*ctrl*+*s*
|
2022-01-27 18:39:46 +01:00
|
|
|
Search _forward_ for the next match. If the search string is
|
|
|
|
|
empty, the last searched-for string is used.
|
2019-08-30 20:26:29 +02:00
|
|
|
|
2020-01-04 14:58:29 +01:00
|
|
|
*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*+*shift*+*w*
|
|
|
|
|
Same as *ctrl*+*w*, except that the only word separating
|
|
|
|
|
characters are whitespace characters.
|
|
|
|
|
|
2022-04-26 18:34:18 +02:00
|
|
|
*ctrl*+*v*, *ctrl*+*shift*+*v*, *ctrl*+*y*, *XF86Paste*
|
2021-07-08 10:43:51 +01:00
|
|
|
Paste from clipboard into the search buffer.
|
2020-11-01 12:39:57 +01:00
|
|
|
|
|
|
|
|
*shift*+*insert*
|
|
|
|
|
Paste from primary selection into the search buffer.
|
|
|
|
|
|
2021-05-25 16:51:07 +01:00
|
|
|
*escape*, *ctrl*+*g*, *ctrl*+*c*
|
2019-08-30 20:26:29 +02:00
|
|
|
Cancel the search
|
|
|
|
|
|
|
|
|
|
*return*
|
|
|
|
|
Finish the search and copy the current match to the primary
|
2019-11-29 22:09:08 +01:00
|
|
|
selection. The terminal selection is kept, allowing you to press
|
|
|
|
|
*ctrl*+*shift*+*c* to copy it to the clipboard.
|
2019-08-30 20:26:29 +02:00
|
|
|
|
2022-04-21 10:04:11 +02:00
|
|
|
## URL MODE
|
2022-01-27 18:45:53 +01:00
|
|
|
|
|
|
|
|
*t*
|
|
|
|
|
Toggle URL visibility in jump label.
|
|
|
|
|
|
2022-01-27 18:54:48 +01:00
|
|
|
*escape*, *ctrl*+*g*, *ctrl*+*c*, *ctrl*+*d*
|
2022-04-04 01:28:03 +02:00
|
|
|
Exit URL mode without launching a URL.
|
2022-01-27 18:45:53 +01:00
|
|
|
|
2022-04-21 10:04:11 +02:00
|
|
|
## MOUSE SHORTCUTS
|
2019-08-30 20:26:29 +02:00
|
|
|
|
|
|
|
|
*left*, single-click
|
|
|
|
|
Drag to select; when released, the selected text is copied to the
|
2020-01-04 23:56:17 +01:00
|
|
|
_primary_ selection. This feature is normally *disabled* whenever
|
|
|
|
|
the client has enabled _mouse tracking_, but can be forced by
|
|
|
|
|
holding *shift*.
|
2020-01-04 14:58:43 +01:00
|
|
|
|
|
|
|
|
Holding *ctrl* will create a block selection.
|
2019-08-30 20:26:29 +02:00
|
|
|
|
|
|
|
|
*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 the _primary_ selection
|
|
|
|
|
|
2020-04-04 12:09:56 +02:00
|
|
|
*right*
|
2020-07-31 06:07:42 +02:00
|
|
|
Extend current selection. Clicking immediately extends the
|
|
|
|
|
selection, while hold-and-drag allows you to interactively resize
|
|
|
|
|
the selection.
|
2020-04-04 12:09:56 +02:00
|
|
|
|
2019-11-03 16:23:18 +01:00
|
|
|
*wheel*
|
|
|
|
|
Scroll up/down in history
|
2019-08-11 20:54:28 +02:00
|
|
|
|
2023-07-05 00:19:21 +08:00
|
|
|
## TOUCHSCREEN
|
|
|
|
|
|
|
|
|
|
*tap*
|
|
|
|
|
Emulates mouse left button click.
|
|
|
|
|
|
|
|
|
|
*drag*
|
|
|
|
|
Scrolls up/down in history.
|
|
|
|
|
|
|
|
|
|
Holding for a while before dragging (time delay can be configured)
|
|
|
|
|
emulates mouse dragging with left button held.
|
|
|
|
|
|
|
|
|
|
|
2019-08-11 20:54:28 +02:00
|
|
|
# FONT FORMAT
|
|
|
|
|
|
|
|
|
|
The font is specified in FontConfig syntax. That is, a colon-separated
|
|
|
|
|
list of font name and font options.
|
|
|
|
|
|
|
|
|
|
_Examples_:
|
|
|
|
|
- Dina:weight=bold:slant=italic
|
2019-09-21 20:43:29 +02:00
|
|
|
- Courier New:size=12
|
2019-08-12 20:00:09 +02:00
|
|
|
|
2021-02-07 11:39:07 +01:00
|
|
|
# URLs
|
|
|
|
|
|
|
|
|
|
Foot supports URL detection. But, unlike many other terminal
|
|
|
|
|
emulators, where URLs are highlighted when they are hovered and opened
|
|
|
|
|
by clicking on them, foot uses a keyboard driven approach.
|
|
|
|
|
|
2024-02-06 12:36:45 +01:00
|
|
|
Pressing *ctrl*+*shift*+*o* enters _"Open URL mode"_, where all currently
|
2021-02-07 11:39:07 +01:00
|
|
|
visible URLs are underlined, and is associated with a
|
2024-02-06 12:36:45 +01:00
|
|
|
_"jump-label"_. The jump-label indicates the _key sequence_
|
|
|
|
|
(e.g. *"AF"*) to use to activate the URL.
|
2021-02-07 11:39:07 +01:00
|
|
|
|
|
|
|
|
The key binding can, of course, be customized, like all other key
|
|
|
|
|
bindings in foot. See *show-urls-launch* and *show-urls-copy* in
|
|
|
|
|
*foot.ini*(5).
|
|
|
|
|
|
|
|
|
|
*show-urls-launch* by default opens the URL with *xdg-open*. This can
|
|
|
|
|
be changed with the *url-launch* option.
|
|
|
|
|
|
|
|
|
|
*show-urls-copy* is an alternative to *show-urls-launch*, that changes
|
2022-04-04 01:28:03 +02:00
|
|
|
what activating a URL _does_; instead of opening it, it copies it to
|
2021-02-07 11:39:07 +01:00
|
|
|
the clipboard. It is unbound by default.
|
|
|
|
|
|
2021-02-13 11:45:38 +01:00
|
|
|
Jump label colors, the URL underline color, and the letters used in
|
|
|
|
|
the jump label key sequences can be configured.
|
2021-02-07 11:39:07 +01:00
|
|
|
|
2020-01-20 21:28:15 +01:00
|
|
|
# ALT/META CHARACTERS
|
|
|
|
|
|
|
|
|
|
By default, foot prefixes meta characters with *ESC*. This corresponds
|
|
|
|
|
to XTerm's *metaSendsEscape* option set to *true*.
|
|
|
|
|
|
2020-07-25 09:39:03 +02:00
|
|
|
This can be disabled programmatically with *\E[?1036l* (and enabled
|
2020-01-20 21:28:15 +01:00
|
|
|
again with *\E[?1036h*).
|
|
|
|
|
|
|
|
|
|
When disabled, foot will instead set the 8:th bit of meta character
|
|
|
|
|
and then UTF-8 encode it. This corresponds to XTerm's *eightBitMeta*
|
|
|
|
|
option set to *true*.
|
|
|
|
|
|
2020-07-25 09:39:03 +02:00
|
|
|
This can also be disabled programmatically with *rmm* (Reset Meta Mode,
|
2020-01-20 21:28:15 +01:00
|
|
|
*\E[?1034l*), and enabled again with *smm* (Set Meta Mode,
|
|
|
|
|
*\E[?1034h*).
|
|
|
|
|
|
2020-02-21 19:11:03 +01:00
|
|
|
# BACKSPACE
|
|
|
|
|
|
|
|
|
|
Foot transmits DEL (*^?*) on backspace. This corresponds to XTerm's
|
|
|
|
|
*backarrowKey* option set to *false*, and to DECBKM being _reset_.
|
|
|
|
|
|
|
|
|
|
To instead transmit BS (*^H*), press *ctrl*+*backspace*.
|
|
|
|
|
|
|
|
|
|
Note that foot does *not* implement DECBKM, and that the behavior
|
|
|
|
|
described above *cannot* be changed.
|
|
|
|
|
|
|
|
|
|
Finally, pressing *alt* will prefix the transmitted byte with ESC.
|
2019-08-12 20:00:09 +02:00
|
|
|
|
2020-11-11 18:37:28 +01:00
|
|
|
# KEYPAD
|
|
|
|
|
|
|
|
|
|
By default, *Num Lock* overrides the run-time configuration keypad
|
|
|
|
|
mode; when active, the keypad is always considered to be in
|
|
|
|
|
_numerical_ mode. This corresponds to XTerm's *numLock* option set to
|
|
|
|
|
*true*.
|
|
|
|
|
|
|
|
|
|
In this mode, the keypad keys always sends either numbers (Num Lock is
|
|
|
|
|
active) or cursor movement keys (up, down, left, right, page up, page
|
|
|
|
|
down etc).
|
|
|
|
|
|
|
|
|
|
This can be disabled programmatically with *\E[?1035l* (and enabled
|
|
|
|
|
again with *\E[?1035h*).
|
|
|
|
|
|
|
|
|
|
When disabled, the keypad sends custom escape sequences instead of
|
|
|
|
|
numbers, when in _application_ mode.
|
|
|
|
|
|
2019-08-12 20:00:09 +02:00
|
|
|
# CONFIGURATION
|
|
|
|
|
|
2022-04-21 10:04:11 +02:00
|
|
|
foot will search for a configuration file in the following locations,
|
|
|
|
|
in this order:
|
|
|
|
|
|
|
|
|
|
- *XDG_CONFIG_HOME/foot/foot.ini* (defaulting to
|
2022-05-24 18:18:15 +02:00
|
|
|
*$HOME/.config/foot/foot.ini* if unset)
|
2022-04-21 10:04:11 +02:00
|
|
|
- *XDG_CONFIG_DIRS/foot/foot.ini* (defaulting to
|
|
|
|
|
*/etc/xdg/foot/foot.ini* if unset)
|
|
|
|
|
|
|
|
|
|
An example configuration file containing all options with their default value
|
|
|
|
|
commented out will usually be installed to */etc/xdg/foot/foot.ini*.
|
|
|
|
|
|
|
|
|
|
For more information, see *foot.ini*(5).
|
2019-08-12 20:00:09 +02:00
|
|
|
|
osc: add support for OSC 133;A (prompt markers)
This patch adds support for the OSC-133;A sequence, introduced by
FinalTerm and implemented by iTerm2, Kitty and more. See
https://iterm2.com/documentation-one-page.html#documentation-escape-codes.html.
The shell emits the OSC just before printing the prompt. This lets the
terminal know where, in the scrollback, there are prompts.
We implement this using a simple boolean in the row struct ("this row
has a prompt"). The prompt marker must be reflowed along with the text
on window resizes.
In an ideal world, erasing, or overwriting the cell where the OSC was
emitted, would remove the prompt mark. Since we don't store this
information in the cell struct, we can't do that. The best we can do
is reset it in erase_line(). This works well enough in the "normal"
screen, when used with a "normal" shell. It doesn't really work in
fullscreen apps, on the alt screen. But that doesn't matter since we
don't support jumping between prompts on the alt screen anyway.
To be able to jump between prompts, two new key bindings have been
added: prompt-prev and prompt-next, bound to ctrl+shift+z and
ctrl+shift+x respectively.
prompt-prev will jump to the previous, not currently visible, prompt,
by moving the viewport, ensuring the prompt is at the top of the
screen.
prompt-next jumps to the next prompt, visible or not. Again, by moving
the viewport to ensure the prompt is at the top of the screen. If
we're at the bottom of the scrollback, the viewport is instead moved
as far down as possible.
Closes #30
2022-06-15 18:44:23 +02:00
|
|
|
# SHELL INTEGRATION
|
|
|
|
|
|
|
|
|
|
## Current working directory
|
|
|
|
|
|
|
|
|
|
New foot terminal instances (bound to *ctrl*+*shift*+*n* by default)
|
|
|
|
|
will open in the current working directory, if the shell in the
|
2024-02-06 12:36:45 +01:00
|
|
|
"parent" terminal reports directory changes.
|
osc: add support for OSC 133;A (prompt markers)
This patch adds support for the OSC-133;A sequence, introduced by
FinalTerm and implemented by iTerm2, Kitty and more. See
https://iterm2.com/documentation-one-page.html#documentation-escape-codes.html.
The shell emits the OSC just before printing the prompt. This lets the
terminal know where, in the scrollback, there are prompts.
We implement this using a simple boolean in the row struct ("this row
has a prompt"). The prompt marker must be reflowed along with the text
on window resizes.
In an ideal world, erasing, or overwriting the cell where the OSC was
emitted, would remove the prompt mark. Since we don't store this
information in the cell struct, we can't do that. The best we can do
is reset it in erase_line(). This works well enough in the "normal"
screen, when used with a "normal" shell. It doesn't really work in
fullscreen apps, on the alt screen. But that doesn't matter since we
don't support jumping between prompts on the alt screen anyway.
To be able to jump between prompts, two new key bindings have been
added: prompt-prev and prompt-next, bound to ctrl+shift+z and
ctrl+shift+x respectively.
prompt-prev will jump to the previous, not currently visible, prompt,
by moving the viewport, ensuring the prompt is at the top of the
screen.
prompt-next jumps to the next prompt, visible or not. Again, by moving
the viewport to ensure the prompt is at the top of the screen. If
we're at the bottom of the scrollback, the viewport is instead moved
as far down as possible.
Closes #30
2022-06-15 18:44:23 +02:00
|
|
|
|
|
|
|
|
This is done with the OSC-7 escape sequence. Most shells can be
|
|
|
|
|
scripted to do this, if they do not support it natively. See the wiki
|
|
|
|
|
(https://codeberg.org/dnkl/foot/wiki#user-content-spawning-new-terminal-instances-in-the-current-working-directory)
|
|
|
|
|
for details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Jumping between prompts
|
|
|
|
|
|
|
|
|
|
Foot can move the current viewport to focus prompts of already
|
|
|
|
|
executed commands (bound to *ctrl*+*shift*+*z*/*x* by default).
|
|
|
|
|
|
|
|
|
|
For this to work, the shell needs to emit an OSC-133;A
|
|
|
|
|
(*\\E]133;A\\E\\\\*) sequence before each prompt.
|
|
|
|
|
|
|
|
|
|
In zsh, one way to do this is to add a _precmd_ hook:
|
|
|
|
|
|
|
|
|
|
*precmd() {
|
|
|
|
|
print -Pn "\\e]133;A\\e\\\\"
|
|
|
|
|
}*
|
|
|
|
|
|
|
|
|
|
See the wiki
|
|
|
|
|
(https://codeberg.org/dnkl/foot/wiki#user-content-jumping-between-prompts)
|
|
|
|
|
for details, and examples for other shells.
|
|
|
|
|
|
2024-02-06 12:36:45 +01:00
|
|
|
## Piping last command's output
|
2022-12-08 12:17:55 +01:00
|
|
|
|
2024-02-06 12:36:45 +01:00
|
|
|
The key binding *pipe-command-output* can pipe the last command's
|
2022-12-08 12:17:55 +01:00
|
|
|
output to an application of your choice (similar to the other
|
|
|
|
|
*pipe-\** key bindings):
|
|
|
|
|
|
|
|
|
|
*\[key-bindings\]++
|
|
|
|
|
pipe-command-output=[sh -c "f=$(mktemp); cat - > $f; footclient emacsclient -nw $f; rm $f"] Control+Shift+g*
|
|
|
|
|
|
2024-02-06 12:36:45 +01:00
|
|
|
When pressing *ctrl*+*shift*+*g*, the last command's output is written
|
2022-12-08 12:17:55 +01:00
|
|
|
to a temporary file, then an emacsclient is started in a new
|
|
|
|
|
footclient instance. The temporary file is removed after the
|
|
|
|
|
footclient instance has closed.
|
|
|
|
|
|
|
|
|
|
For this to work, the shell must emit an OSC-133;C (*\\E]133;C\\E\\\\*)
|
|
|
|
|
sequence before command output starts, and an OSC-133;D
|
|
|
|
|
(*\\E]133;D\\E\\\\*) when the command output ends.
|
|
|
|
|
|
|
|
|
|
In fish, one way to do this is to add _preexec_ and _postexec_ hooks:
|
|
|
|
|
|
|
|
|
|
*function foot_cmd_start --on-event fish_preexec
|
|
|
|
|
echo -en "\\e]133;C\\e\\\\"
|
|
|
|
|
end*
|
|
|
|
|
|
|
|
|
|
*function foot_cmd_end --on-event fish_postexec
|
|
|
|
|
echo -en "\\e]133;D\\e\\\\"
|
|
|
|
|
end*
|
|
|
|
|
|
|
|
|
|
See the wiki
|
|
|
|
|
(https://codeberg.org/dnkl/foot/wiki#user-content-piping-last-commands-output)
|
|
|
|
|
for details, and examples for other shells
|
|
|
|
|
|
2021-05-30 10:51:49 +02:00
|
|
|
# TERMINFO
|
|
|
|
|
|
|
|
|
|
Client applications use the terminfo identifier specified by the
|
|
|
|
|
environment variable *TERM* (set by foot) to determine terminal
|
|
|
|
|
capabilities.
|
|
|
|
|
|
|
|
|
|
Foot has two terminfo definitions: *foot* and *foot-direct*, with
|
|
|
|
|
*foot* being the default.
|
|
|
|
|
|
|
|
|
|
The difference between the two is in the number of colors they
|
2021-06-01 19:02:53 +02:00
|
|
|
describe; *foot* describes 256 colors and *foot-direct* 16.7 million
|
|
|
|
|
colors (24-bit truecolor).
|
2021-05-30 10:51:49 +02:00
|
|
|
|
|
|
|
|
Note that using the *foot* terminfo does not limit the number of
|
|
|
|
|
usable colors to 256; applications can still use 24-bit RGB colors. In
|
|
|
|
|
fact, most applications work best with *foot* (including 24-bit
|
2022-04-04 01:28:03 +02:00
|
|
|
colors). Using *\*-direct* terminfo entries has been known to crash
|
2021-05-30 10:51:49 +02:00
|
|
|
some ncurses applications even.
|
|
|
|
|
|
2021-06-01 19:02:53 +02:00
|
|
|
There are however applications that need a *\*-direct* terminfo entry
|
2021-05-30 10:51:49 +02:00
|
|
|
for 24-bit support. Emacs is one such example.
|
|
|
|
|
|
|
|
|
|
While using either *foot* or *foot-direct* is strongly recommended, it
|
|
|
|
|
is possible to use e.g. *xterm-256color* as well. This can be useful
|
|
|
|
|
when remoting to a system where foot's terminfo entries cannot easily
|
|
|
|
|
be installed.
|
|
|
|
|
|
|
|
|
|
Note that terminfo entries can be installed in the user's home
|
|
|
|
|
directory. I.e. if you do not have root access, or if there is no
|
2021-06-01 19:02:53 +02:00
|
|
|
distro package for foot's terminfo entries, you can install foot's
|
2021-05-30 10:51:49 +02:00
|
|
|
terminfo entries manually, by copying *foot* and *foot-direct* to
|
|
|
|
|
*~/.terminfo/f/*.
|
|
|
|
|
|
2022-01-14 13:36:31 +01:00
|
|
|
# XTGETTCAP
|
|
|
|
|
|
|
|
|
|
*XTGETTCAP* is an escape sequence initially introduced by XTerm, and
|
|
|
|
|
also implemented (and extended, to some degree) by Kitty.
|
|
|
|
|
|
|
|
|
|
It allows querying the terminal for terminfo classic, file-based,
|
|
|
|
|
terminfo definition. For example, if all applications used this
|
2024-02-06 12:36:45 +01:00
|
|
|
feature, you would no longer have to install foot's terminfo on remote
|
2022-01-14 13:36:31 +01:00
|
|
|
hosts you SSH into.
|
|
|
|
|
|
2024-02-06 12:36:45 +01:00
|
|
|
XTerm's implementation (as of XTerm-370) only supports querying key
|
2022-01-14 13:36:31 +01:00
|
|
|
(as in keyboard keys) capabilities, and three custom capabilities:
|
|
|
|
|
|
|
|
|
|
- TN - terminal name
|
|
|
|
|
- Co - number of colors (alias for the colors capability)
|
|
|
|
|
- RGB - number of bits per color channel (different semantics from
|
|
|
|
|
the RGB capability in file-based terminfo definitions!).
|
|
|
|
|
|
|
|
|
|
Kitty has extended this, and also supports querying all integer and
|
|
|
|
|
string capabilities.
|
|
|
|
|
|
|
|
|
|
Foot supports this, and extends it even further, to also include
|
2024-02-06 12:36:45 +01:00
|
|
|
boolean capabilities. This means foot's entire terminfo can be queried
|
2022-01-14 13:36:31 +01:00
|
|
|
via *XTGETTCAP*.
|
|
|
|
|
|
|
|
|
|
Note that both Kitty and foot handles responses to multi-capability
|
|
|
|
|
queries slightly differently, compared to XTerm.
|
|
|
|
|
|
|
|
|
|
XTerm will send a single DCS reply, with ;-separated
|
|
|
|
|
capability/value pairs. There are a couple of issues with this:
|
|
|
|
|
|
|
|
|
|
- The success/fail flag in the beginning of the response is always 1
|
|
|
|
|
(success), unless the very first queried capability is invalid.
|
2024-02-06 12:36:45 +01:00
|
|
|
- XTerm will not respond at all to an invalid capability, unless it's
|
2022-01-14 13:36:31 +01:00
|
|
|
the first one in the XTGETTCAP query.
|
|
|
|
|
- XTerm will end the response at the first invalid capability.
|
|
|
|
|
|
|
|
|
|
In other words, if you send a large multi-capability query, you will
|
|
|
|
|
only get responses up to, but not including, the first invalid
|
|
|
|
|
capability. All subsequent capabilities will be dropped.
|
|
|
|
|
|
|
|
|
|
Kitty and foot on the other hand, send one DCS response for each
|
|
|
|
|
capability in the multi query. This allows us to send a proper
|
|
|
|
|
success/fail flag for each queried capability. Responses for all
|
|
|
|
|
queried capabilities are always sent. No queries are ever dropped.
|
|
|
|
|
|
2022-04-21 10:04:11 +02:00
|
|
|
# EXIT STATUS
|
|
|
|
|
|
|
|
|
|
Foot will exit with code 230 if there is a failure in foot itself.
|
|
|
|
|
|
|
|
|
|
In all other cases, the exit code is that of the client application
|
|
|
|
|
(i.e. the shell).
|
2022-01-14 13:36:31 +01:00
|
|
|
|
2021-05-30 03:29:31 +01:00
|
|
|
# ENVIRONMENT
|
|
|
|
|
|
2022-05-28 19:28:36 +02:00
|
|
|
## Variables used by foot
|
2021-05-30 03:29:31 +01:00
|
|
|
|
|
|
|
|
*SHELL*
|
|
|
|
|
The default child process to run, when no _command_ argument is
|
|
|
|
|
specified and the *shell* option in *foot.ini*(5) is not set.
|
|
|
|
|
|
2022-05-24 18:18:15 +02:00
|
|
|
*HOME*
|
|
|
|
|
Used to determine the location of the configuration file, see
|
|
|
|
|
*foot.ini*(5) for details.
|
|
|
|
|
|
2021-05-30 03:29:31 +01:00
|
|
|
*XDG\_CONFIG\_HOME*
|
2022-04-21 10:04:11 +02:00
|
|
|
Used to determine the location of the configuration file, see
|
|
|
|
|
*foot.ini*(5) for details.
|
2021-05-30 03:29:31 +01:00
|
|
|
|
|
|
|
|
*XDG\_CONFIG\_DIRS*
|
2022-04-21 10:04:11 +02:00
|
|
|
Used to determine the location of the configuration file, see
|
|
|
|
|
*foot.ini*(5) for details.
|
2021-05-30 03:29:31 +01:00
|
|
|
|
|
|
|
|
*XDG\_RUNTIME\_DIR*
|
|
|
|
|
Used to construct the default _PATH_ for the *--server*
|
|
|
|
|
option, when no explicit argument is given (see above).
|
|
|
|
|
|
|
|
|
|
*WAYLAND\_DISPLAY*
|
|
|
|
|
Used to construct the default _PATH_ for the *--server*
|
|
|
|
|
option, when no explicit argument is given (see above).
|
|
|
|
|
|
|
|
|
|
*XCURSOR\_THEME*
|
|
|
|
|
The name of the *Xcursor*(3) theme to use for pointers (typically
|
|
|
|
|
set by the Wayland compositor).
|
|
|
|
|
|
|
|
|
|
*XCURSOR\_SIZE*
|
|
|
|
|
The size to use for *Xcursor*(3) pointers (typically set by the
|
|
|
|
|
Wayland compositor).
|
|
|
|
|
|
2022-05-28 19:28:36 +02:00
|
|
|
## Variables set in the child process
|
2021-05-30 03:29:31 +01:00
|
|
|
|
|
|
|
|
*TERM*
|
|
|
|
|
terminfo/termcap identifier. This is used by client applications
|
|
|
|
|
to determine which capabilities a terminal supports. The value is
|
|
|
|
|
set according to either the *--term* command-line option or the
|
|
|
|
|
*term* config option in *foot.ini*(5).
|
|
|
|
|
|
|
|
|
|
*COLORTERM*
|
|
|
|
|
This variable is set to *truecolor*, to indicate to client
|
|
|
|
|
applications that 24-bit RGB colors are supported.
|
|
|
|
|
|
slave: don't skip setting environment variables when using a custom environment
When launching footclient with -E,--client-environment the environment
variables that should be set by foot, wasn't.
Those variables are:
* TERM
* COLORTERM
* PWD
* SHELL
and all variables defined by the user in the [environment] section in
foot.ini.
In the same way, we did not *unset* TERM_PROGRAM and
TERM_PROGRAM_VERSION.
This patch fixes it by "cloning" the custom environment, making it
mutable, and then adding/removing the variables above from it.
Instead of calling setenv()/unsetenv() directly, we add the wrapper
functions add_to_env() and del_from_env().
When *not* using a custom environment, they simply call
setenv()/unsetenv().
When we *are* using a custom environment, add_to_env() first loops all
existing variables, looking for a match. If a match is found, it's
updated with the new value. If it's not found, a new entry is added.
del_from_env() loops all entries, and removes it when a match is
found. If no match is found, nothing is done.
The mutable environment is allocated on the heap, but never free:d. We
don't need to free it, since it's only allocated after forking, in the
child process.
Closes #1568
2024-01-09 16:50:47 +01:00
|
|
|
*PWD*
|
|
|
|
|
Current working directory (at the time of launching foot)
|
|
|
|
|
|
|
|
|
|
*SHELL*
|
|
|
|
|
Set to the launched shell, if the shell is valid (it is listed in
|
|
|
|
|
*/etc/shells*).
|
|
|
|
|
|
2022-05-28 19:28:36 +02:00
|
|
|
In addition to the variables listed above, custom environment
|
|
|
|
|
variables may be defined in *foot.ini*(5).
|
|
|
|
|
|
slave: don't skip setting environment variables when using a custom environment
When launching footclient with -E,--client-environment the environment
variables that should be set by foot, wasn't.
Those variables are:
* TERM
* COLORTERM
* PWD
* SHELL
and all variables defined by the user in the [environment] section in
foot.ini.
In the same way, we did not *unset* TERM_PROGRAM and
TERM_PROGRAM_VERSION.
This patch fixes it by "cloning" the custom environment, making it
mutable, and then adding/removing the variables above from it.
Instead of calling setenv()/unsetenv() directly, we add the wrapper
functions add_to_env() and del_from_env().
When *not* using a custom environment, they simply call
setenv()/unsetenv().
When we *are* using a custom environment, add_to_env() first loops all
existing variables, looking for a match. If a match is found, it's
updated with the new value. If it's not found, a new entry is added.
del_from_env() loops all entries, and removes it when a match is
found. If no match is found, nothing is done.
The mutable environment is allocated on the heap, but never free:d. We
don't need to free it, since it's only allocated after forking, in the
child process.
Closes #1568
2024-01-09 16:50:47 +01:00
|
|
|
## Variables *unset* in the child process
|
|
|
|
|
|
|
|
|
|
*TERM_PROGRAM*
|
|
|
|
|
*TERM_PROGRAM_VERSION*
|
|
|
|
|
These environment variables are set by certain other terminal
|
|
|
|
|
emulators. We unset them, to prevent applications from
|
|
|
|
|
misdetecting foot.
|
|
|
|
|
|
|
|
|
|
In addition to the variables listed above, custom environment
|
|
|
|
|
variables to unset may be defined in *foot.ini*(5).
|
|
|
|
|
|
2020-04-04 20:36:46 +02:00
|
|
|
# BUGS
|
|
|
|
|
|
|
|
|
|
Please report bugs to https://codeberg.org/dnkl/foot/issues
|
|
|
|
|
|
2021-10-16 15:30:21 +02:00
|
|
|
Before you open a new issue, please search existing bug reports, both
|
|
|
|
|
open and closed ones. Chances are someone else has already reported
|
|
|
|
|
the same issue.
|
|
|
|
|
|
2020-04-04 20:54:28 +02:00
|
|
|
The report should contain the following:
|
|
|
|
|
|
2021-10-16 15:25:11 +02:00
|
|
|
- Foot version (*foot --version*).
|
2022-11-23 16:27:50 +01:00
|
|
|
- Log output from foot (run *foot -d info* from another terminal).
|
2021-10-16 15:25:11 +02:00
|
|
|
- Which Wayland compositor (and version) you are running.
|
2020-04-04 20:54:28 +02:00
|
|
|
- If reporting a crash, please try to provide a *bt full* backtrace
|
2021-10-16 15:25:11 +02:00
|
|
|
with symbols.
|
|
|
|
|
- Steps to reproduce. The more details the better.
|
|
|
|
|
|
2020-11-27 22:39:33 +01:00
|
|
|
# IRC
|
|
|
|
|
|
2021-05-19 22:30:08 +01:00
|
|
|
\#foot on irc.libera.chat
|
2020-11-27 22:39:33 +01:00
|
|
|
|
2019-08-12 20:00:09 +02:00
|
|
|
# SEE ALSO
|
|
|
|
|
|
2020-08-27 20:02:30 +02:00
|
|
|
*foot.ini*(5), *footclient*(1)
|