2019-11-03 13:47:19 +01:00
|
|
|
footclient(1)
|
|
|
|
|
|
|
|
|
|
# NAME
|
|
|
|
|
footclient - start new terminals in a foot server
|
|
|
|
|
|
|
|
|
|
# SYNOPSIS
|
2020-08-03 02:53:25 +01:00
|
|
|
*footclient* [_OPTIONS_]++
|
|
|
|
|
*footclient* [_OPTIONS_] <_command_> [_COMMAND OPTIONS_]
|
2019-11-03 13:47:19 +01: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-11-03 13:47:19 +01:00
|
|
|
|
2020-08-13 18:34:44 +02:00
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
|
|
*footclient* is used together with *foot*(1) in *--server*
|
|
|
|
|
mode.
|
|
|
|
|
|
|
|
|
|
Running it without arguments will open a new terminal window (hosted
|
|
|
|
|
in the foot server), with your default shell. The exit code will be
|
2021-05-01 10:58:35 +02:00
|
|
|
that of the terminal. I.e *footclient* does not exit until the
|
|
|
|
|
terminal has terminated.
|
2020-08-13 18:34:44 +02:00
|
|
|
|
2019-11-03 13:47:19 +01:00
|
|
|
# OPTIONS
|
|
|
|
|
|
|
|
|
|
*-t*,*--term*=_TERM_
|
2021-05-30 10:54:02 +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-11-03 13:47:19 +01:00
|
|
|
|
2025-11-12 11:04:25 +01:00
|
|
|
*toplevel-tag*=_TAG_
|
|
|
|
|
Value to set the *toplevel-tag* property on the Wayland window
|
|
|
|
|
to. The compositor can use this value for session management,
|
|
|
|
|
window rules etc. Default: _not set_
|
|
|
|
|
|
2020-11-22 18:36:37 +00: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_.
|
|
|
|
|
|
2020-11-23 19:19:19 +01:00
|
|
|
*-m*,*--maximized*
|
2020-03-27 21:14:49 +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-27 21:14:49 +01:00
|
|
|
Start in fullscreen mode. If both *--maximized* and *--fullscreen*
|
|
|
|
|
are specified, the _last_ one takes precedence.
|
|
|
|
|
|
2020-11-23 19:19:19 +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:30 +01:00
|
|
|
*-D*,*--working-directory*=_DIR_
|
|
|
|
|
Initial working directory for the client application. Default:
|
|
|
|
|
_CWD of footclient_.
|
|
|
|
|
|
2019-12-14 13:01:54 +01:00
|
|
|
*-s*,*--server-socket*=_PATH_
|
2020-08-02 13:10:31 +02:00
|
|
|
Connect to _PATH_ instead of
|
|
|
|
|
*$XDG\_RUNTIME\_DIR/foot-$WAYLAND\_DISPLAY.sock*.
|
2019-12-14 13:01:54 +01:00
|
|
|
|
2020-11-23 19:19:19 +01:00
|
|
|
*-H*,*--hold*
|
2020-05-26 20:12:44 +02:00
|
|
|
Remain open after child process exits.
|
|
|
|
|
|
2021-03-13 07:49:57 -03:00
|
|
|
*-N*,*--no-wait*
|
|
|
|
|
Detach the client process from the running terminal, exiting
|
|
|
|
|
immediately.
|
|
|
|
|
|
2021-06-23 14:34:23 +02:00
|
|
|
*-o*,*--override*=[_SECTION_.]_KEY_=_VALUE_
|
|
|
|
|
Override an option set in the configuration file. If _SECTION_ is not
|
|
|
|
|
given, defaults to _main_.
|
|
|
|
|
|
2022-04-11 12:31:45 +02:00
|
|
|
*-E*,*--client-environment*
|
2022-04-11 12:34:38 +02:00
|
|
|
The child process in the new terminal instance will use
|
|
|
|
|
footclient's environment, instead of the server's.
|
2022-04-11 12:31:45 +02:00
|
|
|
|
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
|
|
|
Environment variables listed in the *Variables set in the child
|
|
|
|
|
process* section will be overwritten by the foot server. For
|
|
|
|
|
example, the new terminal will use *TERM* from the configuration,
|
|
|
|
|
not footclient's environment.
|
|
|
|
|
|
2021-06-26 22:15:09 +01:00
|
|
|
*-d*,*--log-level*={*info*,*warning*,*error*,*none*}
|
2021-02-09 21:11:30 +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:30 +01:00
|
|
|
|
2020-02-05 19:54:16 +01:00
|
|
|
*-l*,*--log-colorize*=[{*never*,*always*,*auto*}]
|
|
|
|
|
Enables or disables colorization of log output on stderr.
|
|
|
|
|
|
2019-11-03 13:47:19 +01:00
|
|
|
*-v*,*--version*
|
|
|
|
|
Show the version number and quit
|
|
|
|
|
|
2021-09-18 23:40:40 +01:00
|
|
|
*-e*
|
|
|
|
|
Ignored; for compatibility with *xterm -e*. See *foot*(1) for more
|
|
|
|
|
details.
|
|
|
|
|
|
2021-05-01 10:58:35 +02:00
|
|
|
# EXIT STATUS
|
|
|
|
|
|
2022-10-04 13:04:03 +09:00
|
|
|
Footclient will exit with code 220 if there is a failure in footclient
|
2021-05-01 10:58:35 +02:00
|
|
|
itself (for example, the server socket does not exist).
|
|
|
|
|
|
|
|
|
|
If *-N*,*--no-wait* is used, footclient exits with code 0 as soon as
|
|
|
|
|
the foot server has been instructed to open a new window.
|
|
|
|
|
|
|
|
|
|
If not, footclient may also exit with code 230. This indicates a
|
|
|
|
|
failure in the foot server.
|
|
|
|
|
|
|
|
|
|
In all other cases the exit code is that of the client application
|
|
|
|
|
(i.e. the shell).
|
|
|
|
|
|
2021-05-30 10:53:54 +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:53:54 +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
|
|
|
|
|
colors)). Using *\*-direct* terminfo entries has been known to crash
|
|
|
|
|
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:53:54 +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:53:54 +02:00
|
|
|
terminfo entries manually, by copying *foot* and *foot-direct* to
|
|
|
|
|
*~/.terminfo/f/*.
|
|
|
|
|
|
2021-05-30 03:29:31 +01:00
|
|
|
# ENVIRONMENT
|
|
|
|
|
|
2022-05-28 19:28:36 +02:00
|
|
|
## Variables used by footclient
|
2021-05-30 03:29:31 +01:00
|
|
|
|
|
|
|
|
*XDG\_RUNTIME\_DIR*
|
|
|
|
|
Used to construct the default _PATH_ for the *--server-socket*
|
|
|
|
|
option, when no explicit argument is given (see above).
|
|
|
|
|
|
|
|
|
|
*WAYLAND\_DISPLAY*
|
|
|
|
|
Used to construct the default _PATH_ for the *--server-socket*
|
|
|
|
|
option, when no explicit argument is given (see above).
|
|
|
|
|
|
2023-03-09 14:13:57 +01:00
|
|
|
If the socket at default _PATH_ does not exist, *footclient* will
|
|
|
|
|
fallback to the less specific path, with the following priority:
|
|
|
|
|
*$XDG\_RUNTIME\_DIR/foot-$WAYLAND\_DISPLAY.sock*,
|
|
|
|
|
*$XDG\_RUNTIME\_DIR/foot.sock*, */tmp/foot.sock*.
|
|
|
|
|
|
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).
|
|
|
|
|
|
2025-07-31 17:37:19 +02:00
|
|
|
# Signals
|
|
|
|
|
|
|
|
|
|
The following signals have special meaning in footclient:
|
|
|
|
|
|
config: add [colors-dark] and [colors-light], replacing [colors] and [colors2]
The main reason for having two color sections is to be able to switch
between dark and light. Thus, it's better if the section names reflect
this, rather than the more generic 'colors' and 'colors2' (which was
the dark one and which was the light one, now again?)
When the second color section was added, we kept the original name,
colors, to make sure we didn't break existing configurations, and
third-party themes.
However, in the long run, it's probably better to be specific in the
section naming, to avoid confusion.
So, add 'colors-dark', and 'colors-light'. Keep 'colors' and 'colors2'
as aliases for now, but mark them as deprecated. They WILL be removed
in a future release.
Also rename the option values for initial-color-theme, from 1/2, to
dark/light. Keep the old ones for now, marked as deprecated.
Update all bundled themes to use the new names. In the light-only
themes (i.e. themes that define a single, light, theme), use
colors-light, and set initial-color-theme=light.
Possible improvements: disable color switching if only one color
section has been explicitly configured (todo: figure out how to handle
the default color theme values...)
2025-12-19 09:29:06 +01:00
|
|
|
- SIGUSR1: switch to the dark color theme (*[colors-dark]*).
|
|
|
|
|
- SIGUSR2: switch to the light color theme (*[colors-light]*).
|
2025-07-31 17:37:19 +02:00
|
|
|
|
|
|
|
|
When sending SIGUSR1/SIGUSR2 to a footclient instance, the theme is
|
|
|
|
|
changed in that instance only. This is different from when you send
|
|
|
|
|
SIGUSR1/SIGUSR2 to the server process, where all instances change the
|
|
|
|
|
theme.
|
|
|
|
|
|
|
|
|
|
Note: for obvious reasons, this is not supported when footclient is
|
|
|
|
|
started with *--no-wait*.
|
|
|
|
|
|
2019-11-03 13:47:19 +01:00
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
|
|
*foot*(1)
|