2020-08-27 20:02:30 +02:00
|
|
|
foot.ini(5)
|
2019-08-12 20:00:09 +02:00
|
|
|
|
|
|
|
|
# NAME
|
2022-04-21 10:04:11 +02:00
|
|
|
|
2020-11-26 18:22:45 +01:00
|
|
|
foot.ini - configuration file for *foot*(1)
|
2019-08-12 20:00:09 +02:00
|
|
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
|
|
|
|
|
*foot* uses the standard _unix configuration format_, with section based
|
2021-09-08 22:42:58 -07:00
|
|
|
key/value pairs. The default section is usually unnamed, i.e. not prefixed
|
|
|
|
|
with a _[section]_. However it can also be explicitly named _[main]_,
|
|
|
|
|
say if it needs to be reopened after any of the other sections.
|
2019-08-12 20:00:09 +02:00
|
|
|
|
|
|
|
|
foot will search for a configuration file in the following locations,
|
|
|
|
|
in this order:
|
|
|
|
|
|
2022-04-06 18:44:09 +02:00
|
|
|
- *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-06 18:44:09 +02:00
|
|
|
- *XDG_CONFIG_DIRS/foot/foot.ini* (defaulting to
|
|
|
|
|
*/etc/xdg/foot/foot.ini* if unset)
|
2019-08-12 20:00:09 +02:00
|
|
|
|
2022-04-21 10:04:11 +02:00
|
|
|
An example configuration file containing all options with their default value
|
|
|
|
|
commented out will usually be installed to */etc/xdg/foot/foot.ini*.
|
|
|
|
|
|
2022-12-02 15:03:07 +01:00
|
|
|
Options are set using KEY=VALUE pairs:
|
|
|
|
|
|
|
|
|
|
*\[colors\]*++
|
|
|
|
|
*background=000000*++
|
|
|
|
|
*foreground=ffffff*
|
|
|
|
|
|
|
|
|
|
Empty values (*KEY=*) are not supported. String options do allow the
|
|
|
|
|
empty string to be set, but it must be quoted: *KEY=""*)
|
|
|
|
|
|
2021-09-08 22:42:58 -07:00
|
|
|
# SECTION: main
|
2019-08-12 20:00:09 +02:00
|
|
|
|
2021-01-07 11:48:15 +01:00
|
|
|
*shell*
|
|
|
|
|
Executable to launch. Typically a shell. Default: _$SHELL_ if set,
|
|
|
|
|
otherwise the user's default shell (as specified in
|
|
|
|
|
_/etc/passwd_). You can also pass arguments. For example
|
|
|
|
|
*/bin/bash --norc*.
|
|
|
|
|
|
|
|
|
|
*login-shell*
|
|
|
|
|
Boolean. If enabled, the shell will be launched as a login shell,
|
|
|
|
|
by prepending a '-' to argv[0]. Default: _no_.
|
|
|
|
|
|
|
|
|
|
*term*
|
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
|
|
|
Value to set the environment variable *TERM* to. Default:
|
|
|
|
|
_@default_terminfo@_
|
2021-01-07 11:48:15 +01:00
|
|
|
|
2020-10-20 21:04:47 +02:00
|
|
|
*font*, *font-bold*, *font-italic*, *font-bold-italic*
|
2020-12-31 12:57:37 +01:00
|
|
|
Comma separated list of fonts to use, in fontconfig format. That
|
|
|
|
|
is, a font name followed by a list of colon-separated
|
2024-06-07 16:18:28 +02:00
|
|
|
options. Most noteworthy is *:size=n* (or *:pixelsize=n*), which
|
|
|
|
|
is used to set the font size. Note that the font size is also
|
|
|
|
|
affected by the *dpi-aware* option.
|
2020-12-31 12:57:37 +01:00
|
|
|
|
|
|
|
|
Examples:
|
2021-07-30 14:56:55 +02:00
|
|
|
- Dina:weight=bold:slant=italic
|
|
|
|
|
- Courier New:size=12
|
|
|
|
|
- Fantasque Sans Mono:fontfeatures=ss01
|
2023-10-13 18:51:10 +00:00
|
|
|
- Meslo LG S:size=12, Noto Color Emoji:size=12
|
2024-06-07 16:18:28 +02:00
|
|
|
- Courier New:pixelsize=8
|
2019-09-21 19:50:16 +02:00
|
|
|
|
2020-10-20 21:04:47 +02:00
|
|
|
For each option, 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.
|
2019-09-21 19:50:16 +02:00
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
2020-10-20 21:04:47 +02:00
|
|
|
*font-bold*, *font-italic* and *font-bold-italic* allow custom
|
|
|
|
|
fonts to be used for bold/italic/bold+italic fonts. If left
|
|
|
|
|
unconfigured, the bold/italic variants of the regular font(s)
|
|
|
|
|
specified in *font* are used. *Note*: you _may_ have to tweak the
|
|
|
|
|
size(s) of the custom bold/italic fonts to match the regular font.
|
|
|
|
|
|
2020-10-20 21:12:25 +02:00
|
|
|
To disable bold and/or italic fonts, set e.g. *font-bold* to
|
|
|
|
|
_exactly_ the same value as *font*.
|
|
|
|
|
|
2024-06-07 16:18:28 +02:00
|
|
|
**size** is in _points_ (as defined by the FontConfig format). To
|
|
|
|
|
set a _pixel_ size, use **pixelsize** instead. Note that pixel
|
|
|
|
|
sizes are unaffected by DPI aware rendering (see *dpi-aware*), but
|
|
|
|
|
are affected by desktop scaling.
|
|
|
|
|
|
2020-12-31 12:57:37 +01:00
|
|
|
Default: _monospace:size=8_ (*font*), _not set_ (*font-bold*,
|
2020-10-20 21:04:47 +02:00
|
|
|
*font-italic*, *font-bold-italic*).
|
2019-08-12 20:00:09 +02:00
|
|
|
|
2022-12-15 11:10:32 +01:00
|
|
|
*font-size-adjustment*
|
|
|
|
|
Amount, in _points_, _pixels_ or _percent_, to increment/decrement
|
|
|
|
|
the font size when zooming in our out.
|
|
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
```
|
|
|
|
|
font-size-adjustment=0.5 # Adjust by 0.5 points
|
2023-06-23 18:10:19 +00:00
|
|
|
font-size-adjustment=10px # Adjust by 10 pixels
|
2022-12-15 11:10:32 +01:00
|
|
|
font-size-adjustment=7.5% # Adjust by 7.5 percent
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Default: _0.5_
|
|
|
|
|
|
2021-05-28 17:44:13 +02:00
|
|
|
*include*
|
|
|
|
|
Absolute path to configuration file to import.
|
|
|
|
|
|
|
|
|
|
The import file has its own section scope. I.e. the including
|
|
|
|
|
configuration is still in the default section after the include,
|
|
|
|
|
regardless of which section the included file ends in.
|
|
|
|
|
|
2021-07-30 14:53:12 +02:00
|
|
|
- The path must be an absolute path, or start with *~/*.
|
|
|
|
|
- Multiple include directives are allowed, but only one path per
|
|
|
|
|
directive.
|
|
|
|
|
- Nested imports are allowed.
|
2021-05-28 17:44:13 +02:00
|
|
|
|
|
|
|
|
Default: _not set_.
|
|
|
|
|
|
2021-01-07 11:48:50 +01:00
|
|
|
*line-height*
|
2021-01-07 17:07:42 +01:00
|
|
|
An absolute value, in _points_, that override line height from the
|
2021-01-07 11:48:50 +01:00
|
|
|
font metrics.
|
|
|
|
|
|
2021-04-30 20:31:47 +02:00
|
|
|
You can specify a height in _pixels_ by using the *px* suffix:
|
2021-01-07 17:07:42 +01:00
|
|
|
e.g. *line-height=12px*.
|
|
|
|
|
|
2024-07-07 16:31:40 +02:00
|
|
|
*Warning*: when changing the font size at runtime (i.e. zooming in
|
|
|
|
|
our out), foot will change the line height by the same
|
|
|
|
|
percentage. However, due to rounding, it is possible the line
|
|
|
|
|
height will be "too small" for some font sizes, causing
|
|
|
|
|
e.g. underscores to "disappear".
|
|
|
|
|
|
2021-01-07 17:07:42 +01:00
|
|
|
See also: *vertical-letter-offset*.
|
2021-01-07 11:48:50 +01:00
|
|
|
|
2021-01-11 10:56:40 +01:00
|
|
|
Default: _not set_.
|
2021-01-07 11:48:50 +01:00
|
|
|
|
|
|
|
|
*letter-spacing*
|
2021-01-07 17:07:42 +01:00
|
|
|
Spacing between letters, in _points_. A positive value will
|
|
|
|
|
increase the cell size, and a negative value shrinks it.
|
|
|
|
|
|
2021-04-30 20:31:47 +02:00
|
|
|
You can specify a letter spacing in _pixels_ by using the *px*
|
2021-01-07 17:07:42 +01:00
|
|
|
suffix: e.g. *letter-spacing=2px*.
|
2021-01-07 11:48:50 +01:00
|
|
|
|
2021-01-07 17:07:42 +01:00
|
|
|
See also: *horizontal-letter-offset*.
|
2021-01-07 11:48:50 +01:00
|
|
|
|
|
|
|
|
Default: _0_.
|
|
|
|
|
|
|
|
|
|
*horizontal-letter-offset*, *vertical-letter-offset*
|
|
|
|
|
Configure the horizontal and vertical offsets used when
|
2021-01-07 17:07:42 +01:00
|
|
|
positioning glyphs within cells, in _points_, relative to the top
|
|
|
|
|
left corner.
|
|
|
|
|
|
2021-04-30 20:31:47 +02:00
|
|
|
To specify an offset in _pixels_, append *px*:
|
2021-01-07 17:07:42 +01:00
|
|
|
e.g. *horizontal-letter-offset=2px*.
|
2021-01-07 11:48:50 +01:00
|
|
|
|
|
|
|
|
Default: _0_.
|
|
|
|
|
|
2021-06-17 17:52:38 +02:00
|
|
|
*underline-offset*
|
|
|
|
|
Use a custom offset for underlines. The offset is, by default, in
|
|
|
|
|
_points_ and relative the font's baseline. A positive value
|
|
|
|
|
positions the underline under the baseline, while a negative value
|
|
|
|
|
positions it above the baseline.
|
|
|
|
|
|
|
|
|
|
To specify an offset in _pixels_, append *px*:
|
|
|
|
|
*underline-offset=2px*.
|
|
|
|
|
|
|
|
|
|
If left unset (the default), the offset specified in the font is
|
|
|
|
|
used, or estimated by foot if the font lacks underline positioning
|
|
|
|
|
information.
|
|
|
|
|
|
|
|
|
|
Default: _unset_.
|
|
|
|
|
|
2022-08-19 02:54:49 +02:00
|
|
|
*underline-thickness*
|
|
|
|
|
Use a custom thickness (height) for underlines. The thickness is, by
|
|
|
|
|
default, in _points_.
|
|
|
|
|
|
|
|
|
|
To specify a thickness in _pixels_, append *px*:
|
|
|
|
|
*underline-thickness=1px*.
|
|
|
|
|
|
|
|
|
|
If left unset (the default), the thickness specified in the font is
|
|
|
|
|
used.
|
|
|
|
|
|
|
|
|
|
Default: _unset_
|
|
|
|
|
|
2024-08-25 11:28:21 +03:00
|
|
|
*strikeout-thickness*
|
|
|
|
|
Use a custom thickness (height) for strikeouts. The thickness is, by
|
|
|
|
|
default, in _points_.
|
|
|
|
|
|
|
|
|
|
To specify a thickness in _pixels_, append *px*:
|
|
|
|
|
*strikeout-thickness=1px*.
|
|
|
|
|
|
|
|
|
|
If left unset (the default), the thickness specified in the font is
|
|
|
|
|
used.
|
|
|
|
|
|
|
|
|
|
Default: _unset_
|
|
|
|
|
|
2024-08-09 08:24:53 +02:00
|
|
|
*box-drawings-uses-font-glyphs*
|
|
|
|
|
Boolean. When disabled, foot generates box/line drawing characters
|
|
|
|
|
itself. The are several advantages to doing this instead of using
|
|
|
|
|
font glyphs:
|
2021-04-09 23:19:20 +02:00
|
|
|
|
2021-04-10 11:24:23 +02:00
|
|
|
- No antialiasing effects where e.g. line endpoints appear
|
|
|
|
|
dimmed down, or blurred.
|
2021-04-09 23:19:20 +02:00
|
|
|
- Line- and box characters are guaranteed to span the entire cell,
|
|
|
|
|
resulting in a gap-less appearance.
|
|
|
|
|
- No alignment issues, i.e. lines are centered when they should be.
|
|
|
|
|
- Many fonts lack some, or all, of the line- and box drawing
|
|
|
|
|
characters, causing fallback fonts to be used, which results
|
2021-04-10 11:24:23 +02:00
|
|
|
in out-of-place looking glyphs (for example, badly sized).
|
2021-04-09 23:19:20 +02:00
|
|
|
|
|
|
|
|
When enabled, box/line drawing characters are rendered using font
|
|
|
|
|
glyphs. This may result in a more uniform look, in some use cases.
|
|
|
|
|
|
2024-08-09 08:24:53 +02:00
|
|
|
When disabled, foot will render the following Unicode codepoints
|
|
|
|
|
by itself:
|
|
|
|
|
|
|
|
|
|
- U+02500 - U+0259F
|
|
|
|
|
- U+02800 - U+028FF
|
|
|
|
|
- U+1Fb00 - U+1FB9B
|
|
|
|
|
|
2021-04-09 23:19:20 +02:00
|
|
|
Default: _no_.
|
|
|
|
|
|
2020-11-17 17:59:31 +01:00
|
|
|
*dpi-aware*
|
2023-06-26 17:55:04 +02:00
|
|
|
Boolean.
|
2021-09-22 22:00:28 +02:00
|
|
|
|
|
|
|
|
When set to *yes*, fonts are sized using the monitor's DPI, making
|
|
|
|
|
a font of a given size have the same physical size, regardless of
|
|
|
|
|
monitor. In other words, if you drag a foot window between
|
|
|
|
|
different monitors, the font size remains the same.
|
2020-11-17 17:59:31 +01:00
|
|
|
|
2020-12-17 12:05:22 +01:00
|
|
|
In this mode, the monitor's scaling factor is ignored; doubling
|
|
|
|
|
the scaling factor will *not* double the font size.
|
2020-11-17 17:59:31 +01:00
|
|
|
|
2020-12-17 12:05:22 +01:00
|
|
|
When set to *no*, the monitor's DPI is ignored. The font is
|
|
|
|
|
instead sized using the monitor's scaling factor; doubling the
|
|
|
|
|
scaling factor *does* double the font size.
|
|
|
|
|
|
2021-09-22 22:00:28 +02:00
|
|
|
Note that this option typically does not work with bitmap fonts,
|
|
|
|
|
which only contains a pre-defined set of sizes, and cannot be
|
|
|
|
|
dynamically scaled. Whichever size (of the available ones) that
|
|
|
|
|
best matches the DPI or scaling factor, will be used.
|
|
|
|
|
|
2021-09-22 22:01:17 +02:00
|
|
|
Also note that if the font size has been specified in pixels
|
|
|
|
|
(*:pixelsize=*_N_, instead of *:size=*_N_), DPI scaling
|
|
|
|
|
(*dpi-aware=yes*) will have no effect (the specified pixel size
|
|
|
|
|
will be used as is). But, if the monitor's scaling factor is used
|
|
|
|
|
to size the font (*dpi-aware=no*), the font's pixel size will be
|
|
|
|
|
multiplied with the scaling factor.
|
|
|
|
|
|
2023-06-26 17:55:04 +02:00
|
|
|
Default: _no_
|
2020-11-17 17:59:31 +01:00
|
|
|
|
2020-02-15 19:02:05 +01:00
|
|
|
*pad*
|
2020-04-25 22:39:53 +02:00
|
|
|
Padding between border and glyphs, in pixels (subject to output
|
2022-04-04 01:28:03 +02:00
|
|
|
scaling), in the form _XxY_.
|
2021-01-06 11:17:29 +01:00
|
|
|
|
|
|
|
|
This will add _at least_ X pixels on both the left and right
|
|
|
|
|
sides, and Y pixels on the top and bottom sides. The grid content
|
|
|
|
|
will be anchored in the top left corner. I.e. if the window
|
|
|
|
|
manager forces an odd window size on foot, the additional pixels
|
|
|
|
|
will be added to the right and bottom sides.
|
|
|
|
|
|
|
|
|
|
To instead center the grid content, append *center* (e.g. *pad=5x5
|
|
|
|
|
center*).
|
|
|
|
|
|
2022-09-03 12:16:41 +02:00
|
|
|
Default: _0x0_.
|
2019-08-23 17:26:41 +02:00
|
|
|
|
2021-01-21 15:14:43 +01:00
|
|
|
*resize-delay-ms*
|
2022-10-05 17:05:44 +02:00
|
|
|
|
|
|
|
|
Time, in milliseconds, of "idle time" before foot performs text
|
|
|
|
|
reflow, and sends the new window dimensions to the client
|
|
|
|
|
application while doing an interactive resize of a foot
|
|
|
|
|
window. Idle time in this context is a period of time where the
|
|
|
|
|
window size is not changing.
|
2021-01-21 15:14:43 +01:00
|
|
|
|
|
|
|
|
In other words, while you are fiddling with the window size, foot
|
2022-10-05 17:05:44 +02:00
|
|
|
does not send the updated dimensions to the client. It also does a
|
|
|
|
|
fast "truncating" resize of the grid, instead of actually
|
|
|
|
|
reflowing the contents. Only when you pause the fiddling for
|
|
|
|
|
*resize-delay-ms* milliseconds is the client updated, and the
|
|
|
|
|
contents properly reflowed.
|
2021-01-21 15:14:43 +01:00
|
|
|
|
|
|
|
|
Emphasis is on _while_ here; as soon as the interactive resize
|
|
|
|
|
ends (i.e. when you let go of the window border), the final
|
|
|
|
|
dimensions is sent to the client, without any delays.
|
|
|
|
|
|
|
|
|
|
Setting it to 0 disables the delay completely.
|
|
|
|
|
|
|
|
|
|
Default: _100_.
|
|
|
|
|
|
2024-01-17 15:00:14 -05:00
|
|
|
*resize-by-cells*
|
|
|
|
|
Boolean.
|
|
|
|
|
|
|
|
|
|
When set to *yes*, the window size will be constrained to multiples
|
|
|
|
|
of the cell size (plus any configured padding). When set to *no*,
|
|
|
|
|
the window size will be unconstrained, and padding may be adjusted
|
|
|
|
|
as necessary to accommodate window sizes that are not multiples of
|
|
|
|
|
the cell size.
|
|
|
|
|
|
|
|
|
|
This option only applies to floating windows. Sizes of maxmized, tiled
|
|
|
|
|
or fullscreen windows will not be constrained to multiples of the cell
|
|
|
|
|
size.
|
|
|
|
|
|
|
|
|
|
Default: _yes_
|
|
|
|
|
|
2024-08-14 10:35:58 -04:00
|
|
|
*resize-keep-grid*
|
|
|
|
|
Boolean.
|
|
|
|
|
|
|
|
|
|
When set to *yes*, the window size will be adjusted with changes in font
|
|
|
|
|
size to preserve the dimensions of the text grid. When set to *no*, the
|
|
|
|
|
window size will remain constant and the text grid will be adjusted as
|
|
|
|
|
necessary to fit the window.
|
|
|
|
|
|
|
|
|
|
This option only applies to floating windows.
|
|
|
|
|
|
|
|
|
|
Default: _yes_
|
|
|
|
|
|
2020-09-08 19:17:29 +02:00
|
|
|
*initial-window-size-pixels*
|
|
|
|
|
Initial window width and height in _pixels_ (subject to output
|
2022-04-04 01:28:03 +02:00
|
|
|
scaling), in the form _WIDTHxHEIGHT_. The height _includes_ the
|
2020-09-08 19:17:29 +02:00
|
|
|
titlebar when using CSDs. Mutually exclusive to
|
2024-06-25 08:12:40 +02:00
|
|
|
*initial-window-size-chars*.
|
|
|
|
|
|
|
|
|
|
Note that this option may not work as expected if fractional
|
|
|
|
|
scaling is being used, due to the fact that many compositors do
|
|
|
|
|
not report the correct scaling factor until after a window has
|
|
|
|
|
been mapped.
|
2024-06-25 08:20:03 +02:00
|
|
|
|
2024-06-25 08:12:40 +02:00
|
|
|
Default: _700x500_.
|
2020-09-08 19:17:29 +02:00
|
|
|
|
|
|
|
|
*initial-window-size-chars*
|
2022-04-04 01:28:03 +02:00
|
|
|
Initial window width and height in _characters_, in the form
|
2020-09-08 19:17:29 +02:00
|
|
|
_WIDTHxHEIGHT_. Mutually exclusive to
|
2020-09-14 17:34:04 +02:00
|
|
|
*initial-window-size-pixels*.'
|
|
|
|
|
|
|
|
|
|
Note that if you have a multi-monitor setup, with different
|
|
|
|
|
scaling factors, there is a possibility the window size will not
|
|
|
|
|
be set correctly. If that is the case, use
|
|
|
|
|
*initial-window-size-pixels* instead.
|
|
|
|
|
|
2024-06-25 08:12:40 +02:00
|
|
|
And, just like *initial-window-size-pixels*, this option may not
|
|
|
|
|
work as expected if fractional scaling is being used (see
|
2024-06-25 08:20:03 +02:00
|
|
|
*initial-window-size-pixels* for details).
|
|
|
|
|
|
2020-09-14 17:34:04 +02:00
|
|
|
Default: _not set_.
|
2020-09-08 19:17:29 +02:00
|
|
|
|
2020-03-28 12:04:00 +01:00
|
|
|
*initial-window-mode*
|
|
|
|
|
Initial window mode for each newly spawned window: *windowed*,
|
|
|
|
|
*maximized* or *fullscreen*. Default: _windowed_.
|
2020-03-26 19:39:12 +01:00
|
|
|
|
2020-04-01 19:59:47 +02:00
|
|
|
*title*
|
|
|
|
|
Initial window title. Default: _foot_.
|
|
|
|
|
|
2021-07-04 17:59:40 +02:00
|
|
|
*locked-title*
|
|
|
|
|
Boolean. If enabled, applications are not allowed to change the
|
|
|
|
|
title at run-time. Default: _no_.
|
|
|
|
|
|
2020-04-01 18:40:51 +02:00
|
|
|
*app-id*
|
|
|
|
|
Value to set the *app-id* property on the Wayland window to. The
|
|
|
|
|
compositor can use this value to e.g. group multiple windows, or
|
2023-05-02 01:53:01 +10:00
|
|
|
apply window management rules. Default: _foot_ (normal mode), or
|
|
|
|
|
_footclient_ (server mode).
|
2020-04-01 18:40:51 +02:00
|
|
|
|
2020-11-14 11:22:23 +01:00
|
|
|
*bold-text-in-bright*
|
2021-04-17 21:57:08 +02:00
|
|
|
Semi-boolean. When enabled, bold text is rendered in a brighter
|
|
|
|
|
color (in addition to using a bold font). The color is brightened
|
|
|
|
|
by increasing its luminance.
|
|
|
|
|
|
|
|
|
|
If set to *palette-based*, rather than a simple *yes|true*, colors
|
|
|
|
|
matching one of the 8 regular palette colors will be brightened
|
2021-07-22 18:22:39 +02:00
|
|
|
using the corresponding bright palette color. Other colors will
|
|
|
|
|
not be brightened.
|
2021-04-17 21:57:08 +02:00
|
|
|
|
|
|
|
|
Default: _no_.
|
2020-11-14 11:22:23 +01:00
|
|
|
|
2020-10-09 19:44:23 +02:00
|
|
|
*word-delimiters*
|
|
|
|
|
String of characters that act as word delimiters when selecting
|
2020-10-09 19:50:56 +02:00
|
|
|
text. Note that whitespace characters are _always_ word
|
|
|
|
|
delimiters, regardless of this setting. Default: _,│`|:"'()[]{}<>_
|
2020-10-09 19:44:23 +02:00
|
|
|
|
2021-01-20 17:56:14 +01:00
|
|
|
*selection-target*
|
|
|
|
|
Clipboard target to automatically copy selected text to. One of
|
|
|
|
|
*none*, *primary*, *clipboard* or *both*. Default: _primary_.
|
|
|
|
|
|
|
|
|
|
*workers*
|
|
|
|
|
Number of threads to use for rendering. Set to 0 to disable
|
|
|
|
|
multithreading. Default: the number of available logical CPUs
|
|
|
|
|
(including SMT). Note that this is not always the best value. In
|
|
|
|
|
some cases, the number of physical _cores_ is better.
|
|
|
|
|
|
2023-05-17 20:51:40 +02:00
|
|
|
*utmp-helper*
|
|
|
|
|
Path to utmp logging helper binary.
|
|
|
|
|
|
|
|
|
|
When starting foot, an utmp record is created by launching the
|
|
|
|
|
helper binary with the following arguments:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
@utmp_add_args@
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
When foot is closed, the utmp record is removed by launching the
|
|
|
|
|
helper binary with the following arguments:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
@utmp_del_args@
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Set to *none* to disable utmp records. Default: _@utmp_helper_path@_.
|
2022-09-23 20:24:04 +02:00
|
|
|
|
2022-05-28 19:28:36 +02:00
|
|
|
# SECTION: environment
|
|
|
|
|
|
|
|
|
|
This section is used to define environment variables that will be set
|
|
|
|
|
in the client application, in addition to the variables inherited from
|
|
|
|
|
the terminal process itself.
|
|
|
|
|
|
|
|
|
|
The format is simply:
|
|
|
|
|
|
|
|
|
|
*name*=_value_
|
|
|
|
|
|
|
|
|
|
Note: do not set *TERM* here; use the *term* option in the main
|
|
|
|
|
(default) section instead.
|
|
|
|
|
|
2024-12-21 06:52:00 +01:00
|
|
|
# SECTION: security
|
|
|
|
|
|
|
|
|
|
*osc52*
|
|
|
|
|
|
|
|
|
|
Whether OSC-52 (clipboard access) is enabled or disabled. One of
|
|
|
|
|
*disabled*, *copy-enabled*, *paste-enabled* or *enabled*.
|
|
|
|
|
|
|
|
|
|
OSC-52 gives terminal application access to the host clipboard
|
|
|
|
|
(i.e. the Wayland clipboard). This is normally not a security
|
|
|
|
|
issue, since all applications can access the clipboard directly
|
|
|
|
|
over the Wayland socket.
|
|
|
|
|
|
|
|
|
|
However, when SSH:ing into a remote system, or accessing a
|
|
|
|
|
container etc, the terminal applications may be untrusted, and you
|
|
|
|
|
might consider disabling the host clipboard access.
|
|
|
|
|
|
|
|
|
|
- *disabled*: disables all clipboard access
|
|
|
|
|
- *copy-enabled*: applications can write to the clipboard, but not
|
|
|
|
|
read from it.
|
|
|
|
|
- *paste-enabled*: applications can read from the clipboard, but
|
|
|
|
|
not write to it.
|
|
|
|
|
- *enabled*: all applications have full access to the host
|
|
|
|
|
clipboard. This is the default.
|
|
|
|
|
|
|
|
|
|
Default: _enabled_
|
|
|
|
|
|
|
|
|
|
|
2021-04-29 04:12:55 -05:00
|
|
|
# SECTION: bell
|
|
|
|
|
|
2025-01-17 10:10:10 +01:00
|
|
|
*system*
|
|
|
|
|
Boolean, when set to _yes_, ring the system bell. The bell is rung
|
|
|
|
|
independent of whether the foot window has keyboard focus or
|
|
|
|
|
not. Exact behavior is compositor dependent.
|
|
|
|
|
|
|
|
|
|
Default: _yes_
|
|
|
|
|
|
2021-04-29 04:12:55 -05:00
|
|
|
*urgent*
|
2025-01-17 10:10:10 +01:00
|
|
|
Boolean, when set to _yes_, foot will signal urgency to the
|
|
|
|
|
compositor through the XDG activation protocol whenever *BEL* is
|
|
|
|
|
received, and the window does NOT have keyboard focus.
|
2021-10-22 20:03:18 +02:00
|
|
|
|
|
|
|
|
If the compositor does not implement this protocol, the margins
|
|
|
|
|
will be painted in red instead.
|
2021-04-29 04:12:55 -05:00
|
|
|
|
|
|
|
|
Applications can enable/disable this feature programmatically with
|
|
|
|
|
the *CSI ? 1042 h* and *CSI ? 1042 l* escape sequences.
|
|
|
|
|
|
2021-05-07 04:40:07 -05:00
|
|
|
Default: _no_
|
2021-04-29 04:12:55 -05:00
|
|
|
|
|
|
|
|
*notify*
|
2025-01-17 10:10:10 +01:00
|
|
|
Boolean, when set to _yes_, foot will emit a desktop notification
|
|
|
|
|
using the command specified in the *notify* option whenever *BEL*
|
|
|
|
|
is received. By default, bell notifications are shown only when
|
|
|
|
|
the window does *not* have keyboard focus. See
|
osc: kitty notifications: implement focus|report
This patch adds support for window focusing, and sending events back
to the client application when a notification is closed.
* Refactor notification related configuration options:
- add desktop-notifications sub-section
- deprecate 'notify' in favor of 'desktop-notifications.command'
- deprecate 'notify-focus-inhibit' in favor of
'desktop-notifications.inhibit-when-focused'
* Refactor: rename 'struct kitty_notification' to 'struct
notification'
* Pass a 'struct notification' to notify_notify(), instead of many
arguments.
* notify_notify() now registers a reaper callback. When the notifier
process has terminated, the notification is considered closed, and we
either try to focus (activate) the window, or send an event to the
client application, depending on the notification setting.
* For the window activation, we need an XDG activation token. For now,
assume *everything* written on stdout is part of the token.
* Refactor: remove much of the warnings from OSC-99; we don't
typically log anything when an OSC/CSI has invalid values.
* Add icon support to OSC-99. This isn't part of the upstream
spec. Foot's implementation:
- uses the 'I' parameter
- the value is expected to be a symbolic icon name
- a quick check for absolute paths is done, and such icon requests
are ignored.
* Added ${icon} to the 'desktop-notifications.command' template. Uses
the icon specified in the notification, or ${app-id} if not set.
2024-07-23 06:59:46 +02:00
|
|
|
_desktop-notifications.inhibit-when-focused_.
|
2021-10-05 23:07:01 +02:00
|
|
|
|
|
|
|
|
Default: _no_
|
2021-04-29 04:12:55 -05:00
|
|
|
|
2023-10-07 19:37:04 +02:00
|
|
|
*visual*
|
2025-01-17 10:10:10 +01:00
|
|
|
Boolean, when set to _yes_, foot will flash the terminal
|
|
|
|
|
window. Default: _no_
|
2023-10-07 19:37:04 +02:00
|
|
|
|
2021-04-29 04:12:55 -05:00
|
|
|
*command*
|
|
|
|
|
When set, foot will execute this command when *BEL* is received.
|
|
|
|
|
Default: none
|
|
|
|
|
|
|
|
|
|
*command-focused*
|
2025-01-17 10:10:10 +01:00
|
|
|
Boolean, whether to run the command on *BEL* even while
|
|
|
|
|
focused. Default: _no_
|
2021-04-29 04:12:55 -05:00
|
|
|
|
osc: kitty notifications: implement focus|report
This patch adds support for window focusing, and sending events back
to the client application when a notification is closed.
* Refactor notification related configuration options:
- add desktop-notifications sub-section
- deprecate 'notify' in favor of 'desktop-notifications.command'
- deprecate 'notify-focus-inhibit' in favor of
'desktop-notifications.inhibit-when-focused'
* Refactor: rename 'struct kitty_notification' to 'struct
notification'
* Pass a 'struct notification' to notify_notify(), instead of many
arguments.
* notify_notify() now registers a reaper callback. When the notifier
process has terminated, the notification is considered closed, and we
either try to focus (activate) the window, or send an event to the
client application, depending on the notification setting.
* For the window activation, we need an XDG activation token. For now,
assume *everything* written on stdout is part of the token.
* Refactor: remove much of the warnings from OSC-99; we don't
typically log anything when an OSC/CSI has invalid values.
* Add icon support to OSC-99. This isn't part of the upstream
spec. Foot's implementation:
- uses the 'I' parameter
- the value is expected to be a symbolic icon name
- a quick check for absolute paths is done, and such icon requests
are ignored.
* Added ${icon} to the 'desktop-notifications.command' template. Uses
the icon specified in the notification, or ${app-id} if not set.
2024-07-23 06:59:46 +02:00
|
|
|
# SECTION: desktop-notifications
|
|
|
|
|
|
|
|
|
|
*command*
|
|
|
|
|
Command to execute to display a notification.
|
|
|
|
|
|
|
|
|
|
Template arguments
|
|
|
|
|
_${title}_ and _${body}_ will be replaced with the
|
|
|
|
|
notification's actual _title_ and _body_ (message content).
|
|
|
|
|
|
|
|
|
|
_${app-id}_ is replaced with the value of the command line
|
|
|
|
|
option _--app-id_, and defaults to *foot* (normal mode), or
|
|
|
|
|
*footclient* (server mode).
|
|
|
|
|
|
|
|
|
|
_${window-title}_ is replaced with the current window title.
|
|
|
|
|
|
|
|
|
|
_${icon}_ is replaced by the icon specified in the
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
notification request, or the empty string if no icon was
|
|
|
|
|
specified. Can be used with e.g. notify-send's *--icon*
|
|
|
|
|
option, or preferably, by setting the *image-path* hint (with
|
|
|
|
|
e.g. notify-send's *--hint* option).
|
|
|
|
|
|
|
|
|
|
_${category}_ is replaced by the notification's catogory. Can
|
|
|
|
|
be used together with e.g. notify-send's *--category* option.
|
osc: kitty notifications: implement focus|report
This patch adds support for window focusing, and sending events back
to the client application when a notification is closed.
* Refactor notification related configuration options:
- add desktop-notifications sub-section
- deprecate 'notify' in favor of 'desktop-notifications.command'
- deprecate 'notify-focus-inhibit' in favor of
'desktop-notifications.inhibit-when-focused'
* Refactor: rename 'struct kitty_notification' to 'struct
notification'
* Pass a 'struct notification' to notify_notify(), instead of many
arguments.
* notify_notify() now registers a reaper callback. When the notifier
process has terminated, the notification is considered closed, and we
either try to focus (activate) the window, or send an event to the
client application, depending on the notification setting.
* For the window activation, we need an XDG activation token. For now,
assume *everything* written on stdout is part of the token.
* Refactor: remove much of the warnings from OSC-99; we don't
typically log anything when an OSC/CSI has invalid values.
* Add icon support to OSC-99. This isn't part of the upstream
spec. Foot's implementation:
- uses the 'I' parameter
- the value is expected to be a symbolic icon name
- a quick check for absolute paths is done, and such icon requests
are ignored.
* Added ${icon} to the 'desktop-notifications.command' template. Uses
the icon specified in the notification, or ${app-id} if not set.
2024-07-23 06:59:46 +02:00
|
|
|
|
|
|
|
|
_${urgency}_ is replaced with the notifications urgency;
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
*low*, *normal* or *critical*. Can be used together with
|
|
|
|
|
e.g. notify-send's *--urgency* option.
|
|
|
|
|
|
|
|
|
|
_${expire-time}_ is replaced with the notification specified
|
|
|
|
|
notification timeout. Can be used together with
|
|
|
|
|
e.g. notify-send's *--expire-time* option.
|
|
|
|
|
|
|
|
|
|
_${replace-id}_ is replaced by the notification daemon
|
|
|
|
|
assigned ID that the notification replaces/updates. For this
|
|
|
|
|
to work, foot needs to know the externally assigned IDs of
|
|
|
|
|
previously emitted notifications, see the 'stdout' section
|
|
|
|
|
below. Can be used together with e.g. notify-send's
|
|
|
|
|
*--replace-id* option.
|
|
|
|
|
|
2024-08-04 14:16:56 +02:00
|
|
|
_${muted}_ is replaced by either *true* or *false*, depending
|
|
|
|
|
on whether the notification has requested all notification
|
|
|
|
|
sounds be muted. It is intended to set the *suppress-sound*
|
|
|
|
|
hint (with e.g. notify-send's *--hint* option).
|
|
|
|
|
|
2024-08-04 15:21:06 +02:00
|
|
|
_${sound-name}_ is replaced by sound-name requested by the
|
|
|
|
|
notification. This should be a name from the freedesktop sound
|
|
|
|
|
naming specification, but this is not something that foot
|
|
|
|
|
enforces. It is intended to set the *sound-name* hint (with
|
|
|
|
|
e.g. notify-send's *--hint* option).
|
|
|
|
|
|
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If
the notification ID of the 'current' notification doesn't match the
previous, unfinished one, the 'current' notification replaces the
previous one, instead of updating it.
* Update xstrjoin() to take an optional delimiter (for example ','),
and use that when joining categories and 'alive IDs'.
* Rename ${action-arg} to ${action-argument}
* Update handling of the 'n' parameter (symbolic icon name); the spec
allows it to be used multiple times, and the terminal is supposed to
pick the first one it can resolve. Foot can't resolve icons at all,
neither can 'notify-send' or 'fyi' (which is what foot typically
executes to display a notification); it's the notification daemon that
resolves icons.
The spec _could_ be interpreted to mean the terminal should lookup
.desktop files, and use the value of the 'Icon' key from the first
matching .desktop files. But foot doesn't read .desktop files, and I
don't intend to implement XDG directory scanning and parsing of
.desktop files just to figure out which icon to use.
Instead, use a simple heuristics; use the *shortest* symbolic
names. The idea is pretty simple: plain icon names are typically
shorter than .desktop file IDs.
2024-08-02 08:07:13 +02:00
|
|
|
_${action-argument}_ will be expanded to the
|
|
|
|
|
*command-action-argument* option, for each notification
|
|
|
|
|
action. There will always be at least one action, the
|
|
|
|
|
"default" action. Foot uses this to enable window focusing,
|
|
|
|
|
and reporting notification activation to applications that
|
|
|
|
|
requested such events.
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
|
|
|
|
|
Applications can also define their own custom notification
|
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If
the notification ID of the 'current' notification doesn't match the
previous, unfinished one, the 'current' notification replaces the
previous one, instead of updating it.
* Update xstrjoin() to take an optional delimiter (for example ','),
and use that when joining categories and 'alive IDs'.
* Rename ${action-arg} to ${action-argument}
* Update handling of the 'n' parameter (symbolic icon name); the spec
allows it to be used multiple times, and the terminal is supposed to
pick the first one it can resolve. Foot can't resolve icons at all,
neither can 'notify-send' or 'fyi' (which is what foot typically
executes to display a notification); it's the notification daemon that
resolves icons.
The spec _could_ be interpreted to mean the terminal should lookup
.desktop files, and use the value of the 'Icon' key from the first
matching .desktop files. But foot doesn't read .desktop files, and I
don't intend to implement XDG directory scanning and parsing of
.desktop files just to figure out which icon to use.
Instead, use a simple heuristics; use the *shortest* symbolic
names. The idea is pretty simple: plain icon names are typically
shorter than .desktop file IDs.
2024-08-02 08:07:13 +02:00
|
|
|
actions. See the *command-action-argument* option for details.
|
osc: kitty notifications: implement focus|report
This patch adds support for window focusing, and sending events back
to the client application when a notification is closed.
* Refactor notification related configuration options:
- add desktop-notifications sub-section
- deprecate 'notify' in favor of 'desktop-notifications.command'
- deprecate 'notify-focus-inhibit' in favor of
'desktop-notifications.inhibit-when-focused'
* Refactor: rename 'struct kitty_notification' to 'struct
notification'
* Pass a 'struct notification' to notify_notify(), instead of many
arguments.
* notify_notify() now registers a reaper callback. When the notifier
process has terminated, the notification is considered closed, and we
either try to focus (activate) the window, or send an event to the
client application, depending on the notification setting.
* For the window activation, we need an XDG activation token. For now,
assume *everything* written on stdout is part of the token.
* Refactor: remove much of the warnings from OSC-99; we don't
typically log anything when an OSC/CSI has invalid values.
* Add icon support to OSC-99. This isn't part of the upstream
spec. Foot's implementation:
- uses the 'I' parameter
- the value is expected to be a symbolic icon name
- a quick check for absolute paths is done, and such icon requests
are ignored.
* Added ${icon} to the 'desktop-notifications.command' template. Uses
the icon specified in the notification, or ${app-id} if not set.
2024-07-23 06:59:46 +02:00
|
|
|
|
|
|
|
|
Ways to trigger notifications
|
|
|
|
|
Applications can trigger notifications in the following ways:
|
|
|
|
|
|
|
|
|
|
- OSC 777: *\\e]777;notify;<title>;<body>\\e\\\\*
|
|
|
|
|
- OSC 99: *\\e]99;;<title>\\e\\\\* (this is just a bare bones
|
|
|
|
|
example; this protocol has lots of features, see
|
|
|
|
|
https://sw.kovidgoyal.net/kitty/desktop-notifications)
|
|
|
|
|
|
|
|
|
|
By default, notifications are *inhibited* if the foot window
|
|
|
|
|
has keyboard focus. See
|
|
|
|
|
_desktop-notifications.inhibit-when-focused_.
|
|
|
|
|
|
|
|
|
|
Window activation (focusing)
|
|
|
|
|
Foot can focus the window when the notification is
|
2024-07-23 16:52:18 +02:00
|
|
|
'activated'. It can also send an event back to the client
|
|
|
|
|
application, notifying it that the notification has been
|
|
|
|
|
'activated', This typically happens when the default action is
|
osc: kitty notifications: implement focus|report
This patch adds support for window focusing, and sending events back
to the client application when a notification is closed.
* Refactor notification related configuration options:
- add desktop-notifications sub-section
- deprecate 'notify' in favor of 'desktop-notifications.command'
- deprecate 'notify-focus-inhibit' in favor of
'desktop-notifications.inhibit-when-focused'
* Refactor: rename 'struct kitty_notification' to 'struct
notification'
* Pass a 'struct notification' to notify_notify(), instead of many
arguments.
* notify_notify() now registers a reaper callback. When the notifier
process has terminated, the notification is considered closed, and we
either try to focus (activate) the window, or send an event to the
client application, depending on the notification setting.
* For the window activation, we need an XDG activation token. For now,
assume *everything* written on stdout is part of the token.
* Refactor: remove much of the warnings from OSC-99; we don't
typically log anything when an OSC/CSI has invalid values.
* Add icon support to OSC-99. This isn't part of the upstream
spec. Foot's implementation:
- uses the 'I' parameter
- the value is expected to be a symbolic icon name
- a quick check for absolute paths is done, and such icon requests
are ignored.
* Added ${icon} to the 'desktop-notifications.command' template. Uses
the icon specified in the notification, or ${app-id} if not set.
2024-07-23 06:59:46 +02:00
|
|
|
invoked, and/or when the notification is clicked, but exact
|
|
|
|
|
behavior depends on the notification daemon in use, and how it
|
|
|
|
|
has been configured.
|
|
|
|
|
|
2024-07-23 16:41:52 +02:00
|
|
|
For this to work, foot needs to know when the notification was
|
|
|
|
|
activated (as opposed to just dismissed), and it needs an XDG
|
|
|
|
|
activation token.
|
2024-07-23 09:33:18 +02:00
|
|
|
|
2024-07-23 16:41:52 +02:00
|
|
|
There are two parts to handle this. First, the notification
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
must define an action. For this purpose, foot will add a
|
|
|
|
|
"default" action to the notification (see the
|
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If
the notification ID of the 'current' notification doesn't match the
previous, unfinished one, the 'current' notification replaces the
previous one, instead of updating it.
* Update xstrjoin() to take an optional delimiter (for example ','),
and use that when joining categories and 'alive IDs'.
* Rename ${action-arg} to ${action-argument}
* Update handling of the 'n' parameter (symbolic icon name); the spec
allows it to be used multiple times, and the terminal is supposed to
pick the first one it can resolve. Foot can't resolve icons at all,
neither can 'notify-send' or 'fyi' (which is what foot typically
executes to display a notification); it's the notification daemon that
resolves icons.
The spec _could_ be interpreted to mean the terminal should lookup
.desktop files, and use the value of the 'Icon' key from the first
matching .desktop files. But foot doesn't read .desktop files, and I
don't intend to implement XDG directory scanning and parsing of
.desktop files just to figure out which icon to use.
Instead, use a simple heuristics; use the *shortest* symbolic
names. The idea is pretty simple: plain icon names are typically
shorter than .desktop file IDs.
2024-08-02 08:07:13 +02:00
|
|
|
*command-action-argument* option).
|
2024-07-23 16:41:52 +02:00
|
|
|
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
Second, foot needs to know when the notification is activated,
|
2024-07-23 16:41:52 +02:00
|
|
|
and it needs to get hold of the XDG activation token.
|
|
|
|
|
|
|
|
|
|
Both are expected to be printed on stdout.
|
|
|
|
|
|
|
|
|
|
Foot expects the action name (not label) to be printed on a
|
|
|
|
|
single line. No prefix, no postfix.
|
|
|
|
|
|
|
|
|
|
Foot expects the activation token to be printed on a single
|
|
|
|
|
line, prefixed with *xdgtoken=*.
|
|
|
|
|
|
|
|
|
|
Example:
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
default++
|
|
|
|
|
xdgtoken=18179adf579a7a904ce73754964b1ec3
|
2024-07-23 09:33:18 +02:00
|
|
|
|
|
|
|
|
The expected format of stdout may change at any time. Please
|
|
|
|
|
read the changelog when upgrading foot.
|
osc: kitty notifications: implement focus|report
This patch adds support for window focusing, and sending events back
to the client application when a notification is closed.
* Refactor notification related configuration options:
- add desktop-notifications sub-section
- deprecate 'notify' in favor of 'desktop-notifications.command'
- deprecate 'notify-focus-inhibit' in favor of
'desktop-notifications.inhibit-when-focused'
* Refactor: rename 'struct kitty_notification' to 'struct
notification'
* Pass a 'struct notification' to notify_notify(), instead of many
arguments.
* notify_notify() now registers a reaper callback. When the notifier
process has terminated, the notification is considered closed, and we
either try to focus (activate) the window, or send an event to the
client application, depending on the notification setting.
* For the window activation, we need an XDG activation token. For now,
assume *everything* written on stdout is part of the token.
* Refactor: remove much of the warnings from OSC-99; we don't
typically log anything when an OSC/CSI has invalid values.
* Add icon support to OSC-99. This isn't part of the upstream
spec. Foot's implementation:
- uses the 'I' parameter
- the value is expected to be a symbolic icon name
- a quick check for absolute paths is done, and such icon requests
are ignored.
* Added ${icon} to the 'desktop-notifications.command' template. Uses
the icon specified in the notification, or ${app-id} if not set.
2024-07-23 06:59:46 +02:00
|
|
|
|
|
|
|
|
*Note*: notify-send does not, out of the box, support
|
|
|
|
|
reporting the XDG activation token in any way. This means
|
|
|
|
|
window activation will not work by default.
|
|
|
|
|
|
2024-07-24 16:02:19 +02:00
|
|
|
Stdout
|
|
|
|
|
Foot recognizes the following things from the notification
|
|
|
|
|
helper's stdout:
|
|
|
|
|
|
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If
the notification ID of the 'current' notification doesn't match the
previous, unfinished one, the 'current' notification replaces the
previous one, instead of updating it.
* Update xstrjoin() to take an optional delimiter (for example ','),
and use that when joining categories and 'alive IDs'.
* Rename ${action-arg} to ${action-argument}
* Update handling of the 'n' parameter (symbolic icon name); the spec
allows it to be used multiple times, and the terminal is supposed to
pick the first one it can resolve. Foot can't resolve icons at all,
neither can 'notify-send' or 'fyi' (which is what foot typically
executes to display a notification); it's the notification daemon that
resolves icons.
The spec _could_ be interpreted to mean the terminal should lookup
.desktop files, and use the value of the 'Icon' key from the first
matching .desktop files. But foot doesn't read .desktop files, and I
don't intend to implement XDG directory scanning and parsing of
.desktop files just to figure out which icon to use.
Instead, use a simple heuristics; use the *shortest* symbolic
names. The idea is pretty simple: plain icon names are typically
shorter than .desktop file IDs.
2024-08-02 08:07:13 +02:00
|
|
|
- _id_: integer in base 10, daemon assigned notification ID
|
|
|
|
|
- *id=*_id_: same as plain _nnn_.
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
- *default*: the 'default' action was triggered
|
|
|
|
|
- *action=*_default_: same as _default_
|
|
|
|
|
- *action=*_n_: application custom action _n_ triggered
|
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If
the notification ID of the 'current' notification doesn't match the
previous, unfinished one, the 'current' notification replaces the
previous one, instead of updating it.
* Update xstrjoin() to take an optional delimiter (for example ','),
and use that when joining categories and 'alive IDs'.
* Rename ${action-arg} to ${action-argument}
* Update handling of the 'n' parameter (symbolic icon name); the spec
allows it to be used multiple times, and the terminal is supposed to
pick the first one it can resolve. Foot can't resolve icons at all,
neither can 'notify-send' or 'fyi' (which is what foot typically
executes to display a notification); it's the notification daemon that
resolves icons.
The spec _could_ be interpreted to mean the terminal should lookup
.desktop files, and use the value of the 'Icon' key from the first
matching .desktop files. But foot doesn't read .desktop files, and I
don't intend to implement XDG directory scanning and parsing of
.desktop files just to figure out which icon to use.
Instead, use a simple heuristics; use the *shortest* symbolic
names. The idea is pretty simple: plain icon names are typically
shorter than .desktop file IDs.
2024-08-02 08:07:13 +02:00
|
|
|
- _n_: integer in base 10, appearing after the ID; application
|
|
|
|
|
custom action _n_ triggered
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
- *xdgtoken=*_xyz_: XDG activation token.
|
2024-07-24 16:02:19 +02:00
|
|
|
|
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If
the notification ID of the 'current' notification doesn't match the
previous, unfinished one, the 'current' notification replaces the
previous one, instead of updating it.
* Update xstrjoin() to take an optional delimiter (for example ','),
and use that when joining categories and 'alive IDs'.
* Rename ${action-arg} to ${action-argument}
* Update handling of the 'n' parameter (symbolic icon name); the spec
allows it to be used multiple times, and the terminal is supposed to
pick the first one it can resolve. Foot can't resolve icons at all,
neither can 'notify-send' or 'fyi' (which is what foot typically
executes to display a notification); it's the notification daemon that
resolves icons.
The spec _could_ be interpreted to mean the terminal should lookup
.desktop files, and use the value of the 'Icon' key from the first
matching .desktop files. But foot doesn't read .desktop files, and I
don't intend to implement XDG directory scanning and parsing of
.desktop files just to figure out which icon to use.
Instead, use a simple heuristics; use the *shortest* symbolic
names. The idea is pretty simple: plain icon names are typically
shorter than .desktop file IDs.
2024-08-02 08:07:13 +02:00
|
|
|
Example #1:
|
2024-07-24 16:02:19 +02:00
|
|
|
17++
|
|
|
|
|
action=default++
|
|
|
|
|
xdgtoken=95ebdfe56e4f47ddb5bba9d7dc3a2c35
|
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If
the notification ID of the 'current' notification doesn't match the
previous, unfinished one, the 'current' notification replaces the
previous one, instead of updating it.
* Update xstrjoin() to take an optional delimiter (for example ','),
and use that when joining categories and 'alive IDs'.
* Rename ${action-arg} to ${action-argument}
* Update handling of the 'n' parameter (symbolic icon name); the spec
allows it to be used multiple times, and the terminal is supposed to
pick the first one it can resolve. Foot can't resolve icons at all,
neither can 'notify-send' or 'fyi' (which is what foot typically
executes to display a notification); it's the notification daemon that
resolves icons.
The spec _could_ be interpreted to mean the terminal should lookup
.desktop files, and use the value of the 'Icon' key from the first
matching .desktop files. But foot doesn't read .desktop files, and I
don't intend to implement XDG directory scanning and parsing of
.desktop files just to figure out which icon to use.
Instead, use a simple heuristics; use the *shortest* symbolic
names. The idea is pretty simple: plain icon names are typically
shorter than .desktop file IDs.
2024-08-02 08:07:13 +02:00
|
|
|
|
|
|
|
|
Foot recognizes this as:
|
|
|
|
|
- notification has the daemon assigned ID 17
|
|
|
|
|
- the user triggered the default action
|
|
|
|
|
- the notification send an XDG activation token
|
|
|
|
|
|
|
|
|
|
Example #2:
|
|
|
|
|
17++
|
|
|
|
|
1
|
|
|
|
|
|
|
|
|
|
Foot recognizes this as:
|
|
|
|
|
- notification has the daemon assigned ID 17
|
|
|
|
|
- the user triggered the first custom action, "1"
|
|
|
|
|
|
|
|
|
|
Example #3:
|
|
|
|
|
id=17++
|
|
|
|
|
1
|
|
|
|
|
|
|
|
|
|
Foot recognizes this as:
|
|
|
|
|
- notification has the daemon assigned ID 17
|
|
|
|
|
- the user triggered the first custom action, "1
|
|
|
|
|
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
Default: _notify-send++
|
|
|
|
|
--wait++
|
|
|
|
|
--app-name ${app-id}++
|
|
|
|
|
--icon ${app-id}++
|
|
|
|
|
--category ${category}++
|
|
|
|
|
--urgency ${urgency}++
|
|
|
|
|
--expire-time ${expire-time}++
|
|
|
|
|
--hint STRING:image-path:${icon}++
|
2024-08-04 14:16:56 +02:00
|
|
|
--hint BOOLEAN:suppress-sound:${muted}++
|
2024-08-04 15:21:06 +02:00
|
|
|
--hint STRING:sound-name:${sound-name}++
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
--replace-id ${replace-id}++
|
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If
the notification ID of the 'current' notification doesn't match the
previous, unfinished one, the 'current' notification replaces the
previous one, instead of updating it.
* Update xstrjoin() to take an optional delimiter (for example ','),
and use that when joining categories and 'alive IDs'.
* Rename ${action-arg} to ${action-argument}
* Update handling of the 'n' parameter (symbolic icon name); the spec
allows it to be used multiple times, and the terminal is supposed to
pick the first one it can resolve. Foot can't resolve icons at all,
neither can 'notify-send' or 'fyi' (which is what foot typically
executes to display a notification); it's the notification daemon that
resolves icons.
The spec _could_ be interpreted to mean the terminal should lookup
.desktop files, and use the value of the 'Icon' key from the first
matching .desktop files. But foot doesn't read .desktop files, and I
don't intend to implement XDG directory scanning and parsing of
.desktop files just to figure out which icon to use.
Instead, use a simple heuristics; use the *shortest* symbolic
names. The idea is pretty simple: plain icon names are typically
shorter than .desktop file IDs.
2024-08-02 08:07:13 +02:00
|
|
|
${action-argument}++
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
--print-id++
|
|
|
|
|
-- ${title} ${body}_.
|
|
|
|
|
|
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If
the notification ID of the 'current' notification doesn't match the
previous, unfinished one, the 'current' notification replaces the
previous one, instead of updating it.
* Update xstrjoin() to take an optional delimiter (for example ','),
and use that when joining categories and 'alive IDs'.
* Rename ${action-arg} to ${action-argument}
* Update handling of the 'n' parameter (symbolic icon name); the spec
allows it to be used multiple times, and the terminal is supposed to
pick the first one it can resolve. Foot can't resolve icons at all,
neither can 'notify-send' or 'fyi' (which is what foot typically
executes to display a notification); it's the notification daemon that
resolves icons.
The spec _could_ be interpreted to mean the terminal should lookup
.desktop files, and use the value of the 'Icon' key from the first
matching .desktop files. But foot doesn't read .desktop files, and I
don't intend to implement XDG directory scanning and parsing of
.desktop files just to figure out which icon to use.
Instead, use a simple heuristics; use the *shortest* symbolic
names. The idea is pretty simple: plain icon names are typically
shorter than .desktop file IDs.
2024-08-02 08:07:13 +02:00
|
|
|
*command-action-argument*
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
String to use with *command* to enable passing action/button names
|
|
|
|
|
to the notification helper.
|
|
|
|
|
|
|
|
|
|
Foot will always configure a "default" action that can be used to
|
|
|
|
|
"activate" the notification, which in turn can cause the foot
|
|
|
|
|
window to be focused, or an escape to be sent to the terminal
|
|
|
|
|
application (depending on how the application generated the
|
|
|
|
|
notification).
|
|
|
|
|
|
2024-08-02 08:22:37 +02:00
|
|
|
Furthermore, the OSC-99 notifications protocol allows applications
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
to define their own actions. Foot uses a combination of the
|
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If
the notification ID of the 'current' notification doesn't match the
previous, unfinished one, the 'current' notification replaces the
previous one, instead of updating it.
* Update xstrjoin() to take an optional delimiter (for example ','),
and use that when joining categories and 'alive IDs'.
* Rename ${action-arg} to ${action-argument}
* Update handling of the 'n' parameter (symbolic icon name); the spec
allows it to be used multiple times, and the terminal is supposed to
pick the first one it can resolve. Foot can't resolve icons at all,
neither can 'notify-send' or 'fyi' (which is what foot typically
executes to display a notification); it's the notification daemon that
resolves icons.
The spec _could_ be interpreted to mean the terminal should lookup
.desktop files, and use the value of the 'Icon' key from the first
matching .desktop files. But foot doesn't read .desktop files, and I
don't intend to implement XDG directory scanning and parsing of
.desktop files just to figure out which icon to use.
Instead, use a simple heuristics; use the *shortest* symbolic
names. The idea is pretty simple: plain icon names are typically
shorter than .desktop file IDs.
2024-08-02 08:07:13 +02:00
|
|
|
*command* option, and the *command-action-argument* option to pass
|
|
|
|
|
the names of the actions to the notification helper.
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
|
|
|
|
|
This option has the following template arguments:
|
|
|
|
|
|
|
|
|
|
- _${action-name}_: the name of the action; *default* for the
|
|
|
|
|
default action configured by foot, and _n_, where _n_ is an
|
|
|
|
|
integer >= 1, for application defined actions.
|
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If
the notification ID of the 'current' notification doesn't match the
previous, unfinished one, the 'current' notification replaces the
previous one, instead of updating it.
* Update xstrjoin() to take an optional delimiter (for example ','),
and use that when joining categories and 'alive IDs'.
* Rename ${action-arg} to ${action-argument}
* Update handling of the 'n' parameter (symbolic icon name); the spec
allows it to be used multiple times, and the terminal is supposed to
pick the first one it can resolve. Foot can't resolve icons at all,
neither can 'notify-send' or 'fyi' (which is what foot typically
executes to display a notification); it's the notification daemon that
resolves icons.
The spec _could_ be interpreted to mean the terminal should lookup
.desktop files, and use the value of the 'Icon' key from the first
matching .desktop files. But foot doesn't read .desktop files, and I
don't intend to implement XDG directory scanning and parsing of
.desktop files just to figure out which icon to use.
Instead, use a simple heuristics; use the *shortest* symbolic
names. The idea is pretty simple: plain icon names are typically
shorter than .desktop file IDs.
2024-08-02 08:07:13 +02:00
|
|
|
- _${action-label}_: *Activate* for the default action, and a
|
|
|
|
|
free-form string for application defined actions.
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
|
|
|
|
|
For each notification action (remember, there will always be at
|
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If
the notification ID of the 'current' notification doesn't match the
previous, unfinished one, the 'current' notification replaces the
previous one, instead of updating it.
* Update xstrjoin() to take an optional delimiter (for example ','),
and use that when joining categories and 'alive IDs'.
* Rename ${action-arg} to ${action-argument}
* Update handling of the 'n' parameter (symbolic icon name); the spec
allows it to be used multiple times, and the terminal is supposed to
pick the first one it can resolve. Foot can't resolve icons at all,
neither can 'notify-send' or 'fyi' (which is what foot typically
executes to display a notification); it's the notification daemon that
resolves icons.
The spec _could_ be interpreted to mean the terminal should lookup
.desktop files, and use the value of the 'Icon' key from the first
matching .desktop files. But foot doesn't read .desktop files, and I
don't intend to implement XDG directory scanning and parsing of
.desktop files just to figure out which icon to use.
Instead, use a simple heuristics; use the *shortest* symbolic
names. The idea is pretty simple: plain icon names are typically
shorter than .desktop file IDs.
2024-08-02 08:07:13 +02:00
|
|
|
least one), *command-action-argument* will be expanded with the
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
action's name and label.
|
|
|
|
|
|
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If
the notification ID of the 'current' notification doesn't match the
previous, unfinished one, the 'current' notification replaces the
previous one, instead of updating it.
* Update xstrjoin() to take an optional delimiter (for example ','),
and use that when joining categories and 'alive IDs'.
* Rename ${action-arg} to ${action-argument}
* Update handling of the 'n' parameter (symbolic icon name); the spec
allows it to be used multiple times, and the terminal is supposed to
pick the first one it can resolve. Foot can't resolve icons at all,
neither can 'notify-send' or 'fyi' (which is what foot typically
executes to display a notification); it's the notification daemon that
resolves icons.
The spec _could_ be interpreted to mean the terminal should lookup
.desktop files, and use the value of the 'Icon' key from the first
matching .desktop files. But foot doesn't read .desktop files, and I
don't intend to implement XDG directory scanning and parsing of
.desktop files just to figure out which icon to use.
Instead, use a simple heuristics; use the *shortest* symbolic
names. The idea is pretty simple: plain icon names are typically
shorter than .desktop file IDs.
2024-08-02 08:07:13 +02:00
|
|
|
Then, _${action-argument}_ is expanded *command* to the full list
|
|
|
|
|
of actions.
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
|
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If
the notification ID of the 'current' notification doesn't match the
previous, unfinished one, the 'current' notification replaces the
previous one, instead of updating it.
* Update xstrjoin() to take an optional delimiter (for example ','),
and use that when joining categories and 'alive IDs'.
* Rename ${action-arg} to ${action-argument}
* Update handling of the 'n' parameter (symbolic icon name); the spec
allows it to be used multiple times, and the terminal is supposed to
pick the first one it can resolve. Foot can't resolve icons at all,
neither can 'notify-send' or 'fyi' (which is what foot typically
executes to display a notification); it's the notification daemon that
resolves icons.
The spec _could_ be interpreted to mean the terminal should lookup
.desktop files, and use the value of the 'Icon' key from the first
matching .desktop files. But foot doesn't read .desktop files, and I
don't intend to implement XDG directory scanning and parsing of
.desktop files just to figure out which icon to use.
Instead, use a simple heuristics; use the *shortest* symbolic
names. The idea is pretty simple: plain icon names are typically
shorter than .desktop file IDs.
2024-08-02 08:07:13 +02:00
|
|
|
If *command-action-argument* is set to the empty string, no
|
|
|
|
|
actions will be passed to *command*. That is, _${action-argument}_
|
|
|
|
|
will be replaced with the empty string.
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
osc: kitty notifications: cleanup and update to latest version of spec
* Don't store a list of unfinished notifications. Use a single one. If
the notification ID of the 'current' notification doesn't match the
previous, unfinished one, the 'current' notification replaces the
previous one, instead of updating it.
* Update xstrjoin() to take an optional delimiter (for example ','),
and use that when joining categories and 'alive IDs'.
* Rename ${action-arg} to ${action-argument}
* Update handling of the 'n' parameter (symbolic icon name); the spec
allows it to be used multiple times, and the terminal is supposed to
pick the first one it can resolve. Foot can't resolve icons at all,
neither can 'notify-send' or 'fyi' (which is what foot typically
executes to display a notification); it's the notification daemon that
resolves icons.
The spec _could_ be interpreted to mean the terminal should lookup
.desktop files, and use the value of the 'Icon' key from the first
matching .desktop files. But foot doesn't read .desktop files, and I
don't intend to implement XDG directory scanning and parsing of
.desktop files just to figure out which icon to use.
Instead, use a simple heuristics; use the *shortest* symbolic
names. The idea is pretty simple: plain icon names are typically
shorter than .desktop file IDs.
2024-08-02 08:07:13 +02:00
|
|
|
*command-action-argument=--action ${action-name}=${action-label}*++
|
|
|
|
|
*command=notify-send ${action-argument} ...*
|
osc: kitty notifications: buttons, icons, app-name, categories etc
First, icons have been finalized in the specification. There were only
three things we needed to adjust:
* symbolic names are base64 encoded
* there are a couple of OSC-99 defined symbolic names that need to be
translated to the corresponding XDG icon name.
* allow in-band icons without a cache ID (that is, allow applications
to use p=icon without having to cache the icon first).
Second, add support for the following new additions to the protocol:
* 'f': custom app-name, overrides the terminal's app-id
* 't': categories
* 'p=alive': lets applications poll for currently active notifications
* 'id' is now 'unset' by default, rather than "0"
* 'w': expire time (i.e. notification timeout)
* "buttons": aka actions. This lets applications add additional (to
the terminal defined "default" action) actions. The 'activated' event
has been updated to report which button/action was used to activate
the notification.
To support button/actions, desktop-notifications.command had to be
reworked a bit.
There's now a new config option:
desktop-notifications.command-action-arg. It has two template
arguments ${action-name} and ${action-label}.
command-action-arg gets expanded for *each* action.
${action-name} and ${action-label} has been replaced by ${action-arg}
in command. This is a somewhat special template, in that it gets
replaced by *all* instances of the expanded actions.
2024-07-31 16:22:17 +02:00
|
|
|
|
|
|
|
|
Assume the application defined two custom actions: *OK* and
|
|
|
|
|
*Cancel*.
|
|
|
|
|
|
|
|
|
|
Given the above, foot will execute:
|
|
|
|
|
|
|
|
|
|
notify-send++
|
|
|
|
|
--action default='Click to activate'++
|
|
|
|
|
--action 1=OK++
|
|
|
|
|
--action 2=Cancel++
|
|
|
|
|
...
|
|
|
|
|
|
|
|
|
|
Default: _--action ${action-name}=${action-label}_
|
2024-07-23 19:08:21 +02:00
|
|
|
|
2024-07-25 19:24:28 +02:00
|
|
|
*close*
|
|
|
|
|
Command to execute to close an existing notification.
|
|
|
|
|
|
|
|
|
|
_${id}_ is expanded to the ID of the notification that should be
|
|
|
|
|
closed. For example:
|
|
|
|
|
|
|
|
|
|
fyi --close ${id}
|
|
|
|
|
|
|
|
|
|
Closing a notification is only supported by the Kitty Desktop
|
|
|
|
|
Notification protocol, OSC-99.
|
|
|
|
|
|
2024-07-26 16:23:17 +02:00
|
|
|
If set to the empty string (the default), foot will instead try to
|
|
|
|
|
close the notification by sending SIGINT to the notification
|
|
|
|
|
helper process. For example, *notify-send --wait* (libnotify >=
|
|
|
|
|
0.8.0) responds to SIGINT by closing the notification.
|
|
|
|
|
|
2024-07-25 19:24:28 +02:00
|
|
|
Default: _not set_
|
osc: kitty notifications: implement focus|report
This patch adds support for window focusing, and sending events back
to the client application when a notification is closed.
* Refactor notification related configuration options:
- add desktop-notifications sub-section
- deprecate 'notify' in favor of 'desktop-notifications.command'
- deprecate 'notify-focus-inhibit' in favor of
'desktop-notifications.inhibit-when-focused'
* Refactor: rename 'struct kitty_notification' to 'struct
notification'
* Pass a 'struct notification' to notify_notify(), instead of many
arguments.
* notify_notify() now registers a reaper callback. When the notifier
process has terminated, the notification is considered closed, and we
either try to focus (activate) the window, or send an event to the
client application, depending on the notification setting.
* For the window activation, we need an XDG activation token. For now,
assume *everything* written on stdout is part of the token.
* Refactor: remove much of the warnings from OSC-99; we don't
typically log anything when an OSC/CSI has invalid values.
* Add icon support to OSC-99. This isn't part of the upstream
spec. Foot's implementation:
- uses the 'I' parameter
- the value is expected to be a symbolic icon name
- a quick check for absolute paths is done, and such icon requests
are ignored.
* Added ${icon} to the 'desktop-notifications.command' template. Uses
the icon specified in the notification, or ${app-id} if not set.
2024-07-23 06:59:46 +02:00
|
|
|
|
|
|
|
|
*inhibit-when-focused*
|
|
|
|
|
Boolean. If enabled, foot will not display notifications if the
|
|
|
|
|
terminal window has keyboard focus.
|
|
|
|
|
|
|
|
|
|
Default: _yes_
|
|
|
|
|
|
2020-07-29 17:41:24 +02:00
|
|
|
# SECTION: scrollback
|
|
|
|
|
|
|
|
|
|
*lines*
|
2020-10-08 19:54:06 +02:00
|
|
|
Number of scrollback lines. The maximum number of allocated lines
|
|
|
|
|
will be this value plus the number of visible lines, rounded up to
|
|
|
|
|
the nearest power of 2. Default: _1000_.
|
2019-08-12 20:00:09 +02:00
|
|
|
|
2020-08-03 19:43:06 +02:00
|
|
|
*multiplier*
|
|
|
|
|
Amount to multiply mouse scrolling with. It is a decimal number,
|
2020-09-29 09:50:17 +02:00
|
|
|
i.e. fractions are allowed. Default: _3.0_.
|
2020-08-03 19:43:06 +02:00
|
|
|
|
2020-07-29 17:41:24 +02:00
|
|
|
*indicator-position*
|
2020-07-25 14:31:45 +02:00
|
|
|
Configures the style of the scrollback position indicator. One of
|
2020-07-25 14:40:46 +02:00
|
|
|
*none*, *fixed* or *relative*. *none* disables the indicator
|
2020-10-08 19:53:49 +02:00
|
|
|
completely. *fixed* always renders the indicator near the top of
|
2020-07-25 14:38:36 +02:00
|
|
|
the window, and *relative* renders the indicator at the position
|
2020-07-25 14:31:45 +02:00
|
|
|
corresponding to the current scrollback position. Default:
|
2020-07-25 14:38:36 +02:00
|
|
|
_relative_.
|
2020-07-24 18:20:26 +02:00
|
|
|
|
2020-07-29 17:41:24 +02:00
|
|
|
*indicator-format*
|
2020-07-24 18:34:19 +02:00
|
|
|
Which format to use when displaying the scrollback position
|
2020-07-28 19:56:53 +02:00
|
|
|
indicator. Either _percentage_, _line_, or a custom fixed
|
|
|
|
|
string. This option is ignored if
|
2020-07-29 17:41:24 +02:00
|
|
|
*indicator-position=none*. Default: _empty string_.
|
2019-08-12 20:00:09 +02:00
|
|
|
|
2021-05-20 17:56:56 +02:00
|
|
|
# SECTION: url
|
|
|
|
|
|
2025-02-03 09:15:33 +01:00
|
|
|
Note that you can also add custom regular expressions, see the 'regex'
|
|
|
|
|
section.
|
|
|
|
|
|
2021-05-20 17:56:56 +02:00
|
|
|
*launch*
|
|
|
|
|
Command to execute when opening URLs. _${url}_ will be replaced
|
|
|
|
|
with the actual URL. Default: _xdg-open ${url}_.
|
|
|
|
|
|
|
|
|
|
*osc8-underline*
|
|
|
|
|
When to underline OSC-8 URLs. Possible values are *url-mode* and
|
|
|
|
|
*always*.
|
|
|
|
|
|
|
|
|
|
When set to *url-mode*, OSC-8 URLs are only highlighted in URL
|
|
|
|
|
mode, just like auto-detected URLs.
|
|
|
|
|
|
|
|
|
|
When set to *always*, OSC-8 URLs are always highlighted,
|
|
|
|
|
regardless of their other attributes (bold, italic etc). Note that
|
|
|
|
|
this does _not_ make them clickable.
|
|
|
|
|
|
|
|
|
|
Default: _url-mode_
|
|
|
|
|
|
|
|
|
|
*label-letters*
|
|
|
|
|
String of characters to use when generating key sequences for URL
|
2021-10-20 19:01:03 +02:00
|
|
|
jump labels.
|
|
|
|
|
|
|
|
|
|
If you change this option to include the letter *t*, you should
|
|
|
|
|
also change the default *[url-bindings].toggle-url-visible* key
|
|
|
|
|
binding to avoid a clash.
|
|
|
|
|
|
|
|
|
|
Default: _sadfjklewcmpgh_.
|
2021-05-20 17:56:56 +02:00
|
|
|
|
2025-01-30 12:26:23 +01:00
|
|
|
*regex*
|
2025-02-03 09:15:33 +01:00
|
|
|
Regular expression to use when auto-detecting URLs. The format is
|
2025-02-03 13:56:57 +01:00
|
|
|
"POSIX-Extended Regular Expressions". Note that the first marked
|
|
|
|
|
subexpression is used a the URL. In other words, if you want the
|
|
|
|
|
whole regex matćh to be used as an URL, surround all of it with
|
|
|
|
|
parenthesis: *(regex-pattern)*.
|
2025-01-30 12:26:23 +01:00
|
|
|
|
2025-02-03 13:56:57 +01:00
|
|
|
Default: _(([a-z][[:alnum:]-]+:(/{1,3}|[a-z0-9%])|www[:digit:]{0,3}[.])([^[:space:](){}<>]+|\(([^[:space:](){}<>]+|(\([^[:space:](){}<>]+\)))\*\)|\[([^]\[[:space:](){}<>]+|(\[[^]\[[:space:](){}<>]+\]))\*\])+(\(([^[:space:](){}<>]+|(\([^[:space:](){}<>]+\)))\*\)|\[([^]\[[:space:](){}<>]+|(\[[^]\[[:space:](){}<>]+\]))\*\]|[^]\[[:space:]`!(){};:'".,<>?«»“”‘’]))_
|
2021-08-09 18:25:36 +02:00
|
|
|
|
2025-02-03 09:15:33 +01:00
|
|
|
# SECTION: regex
|
|
|
|
|
|
|
|
|
|
Similar to the 'url' mode, but with custom defined regular expressions
|
|
|
|
|
(and launchers).
|
|
|
|
|
|
|
|
|
|
To use a custom defined regular expression, you also need to add a key
|
|
|
|
|
binding for it. This is done in the *key-binding* section, see below
|
|
|
|
|
for details. In short, you need to:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
[regex:foo]
|
|
|
|
|
regex=foo(bar)?
|
|
|
|
|
launch=path-to-script-or-application {match}
|
|
|
|
|
|
|
|
|
|
[key-bindings]
|
|
|
|
|
regex-launch=[foo] Control+Shift+q
|
|
|
|
|
regex-copy=[foo] Control+Mod1+Shift+q
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
*launch*
|
|
|
|
|
Command to execute when "launching" a regex match. _${match}_ will
|
|
|
|
|
be replaced with the actual URL. Default: _not set_.
|
|
|
|
|
|
|
|
|
|
*regex*
|
|
|
|
|
Regular expression to use when matching text. The format is
|
2025-02-03 13:56:57 +01:00
|
|
|
"POSIX-Extended Regular Expressions". Note that the first marked
|
|
|
|
|
subexpression is used a the URL. In other words, if you want the
|
|
|
|
|
whole regex matćh to be used as an URL, surround all of it with
|
|
|
|
|
parenthesis: *(regex-pattern)*.
|
|
|
|
|
|
|
|
|
|
Default: _not set_.
|
2025-02-03 09:15:33 +01:00
|
|
|
|
|
|
|
|
|
2019-08-12 20:00:09 +02:00
|
|
|
# SECTION: cursor
|
|
|
|
|
|
2020-03-02 18:47:48 +01:00
|
|
|
This section controls the cursor style and color. Note that
|
2020-07-12 20:23:54 +02:00
|
|
|
applications can change these at runtime.
|
2020-03-02 18:47:48 +01:00
|
|
|
|
2019-08-12 20:00:09 +02:00
|
|
|
*style*
|
2021-04-30 20:31:47 +02:00
|
|
|
Configures the default cursor style, and is one of: *block*,
|
|
|
|
|
*beam* or *underline*. Note that this can be overridden by
|
2020-06-30 17:45:34 +02:00
|
|
|
applications. Default: _block_.
|
|
|
|
|
|
2024-04-09 16:28:54 +02:00
|
|
|
*unfocused-style*
|
|
|
|
|
Configures how the cursor is rendered when the terminal window is
|
|
|
|
|
unfocused. Possible values are:
|
|
|
|
|
|
|
|
|
|
- unchanged: render cursor in exactly the same way as when the
|
|
|
|
|
window has focus.
|
|
|
|
|
- hollow: render a block cursor, but hollowed out.
|
|
|
|
|
- none: do not display any cursor at all.
|
|
|
|
|
|
2020-06-30 17:45:34 +02:00
|
|
|
*blink*
|
|
|
|
|
Boolean. Enables blinking cursor. Note that this can be overridden
|
2024-05-20 09:03:29 +02:00
|
|
|
by applications. Related option: *blink-rate*. Default: _no_.
|
|
|
|
|
|
|
|
|
|
*blink-rate*
|
|
|
|
|
The rate at which the cursor blink, when cursor blinking has been
|
|
|
|
|
enabled. Expressed in milliseconds between each blink. Default:
|
|
|
|
|
_500_.
|
2019-08-12 20:00:09 +02:00
|
|
|
|
|
|
|
|
*color*
|
2022-10-17 20:16:53 +02:00
|
|
|
Two space separated RRGGBB values (i.e. plain old 6-digit hex
|
|
|
|
|
values, without prefix) specifying the foreground (text) and
|
|
|
|
|
background (cursor) colors for the cursor.
|
2021-11-13 17:22:07 +01:00
|
|
|
|
2022-10-17 20:16:53 +02:00
|
|
|
Example: *ff0000 00ff00* (green cursor, red text)
|
|
|
|
|
|
|
|
|
|
Default: the regular foreground and background colors, reversed.
|
2019-08-12 20:00:09 +02:00
|
|
|
|
2021-04-30 20:31:47 +02:00
|
|
|
*beam-thickness*
|
|
|
|
|
Thickness (width) of the beam styled cursor. The value is in
|
2021-05-18 18:52:10 +02:00
|
|
|
points, and its exact value thus depends on the monitor's DPI. To
|
|
|
|
|
instead specify a thickness in pixels, use the *px* suffix:
|
|
|
|
|
e.g. *beam-thickness=2px*. Default: _1.5_
|
|
|
|
|
|
|
|
|
|
*underline-thickness*
|
|
|
|
|
Thickness (height) of the underline styled cursor. The value is in
|
|
|
|
|
points, and its exact value thus depends on the monitor's DPI.
|
|
|
|
|
|
|
|
|
|
To instead specify a thickness in pixels, use the *px* suffix:
|
|
|
|
|
e.g. *underline-thickness=2px*.
|
|
|
|
|
|
|
|
|
|
Note that if left unset, the cursor's thickness will scale with
|
|
|
|
|
the font size, while if set, the size is fixed.
|
|
|
|
|
|
|
|
|
|
Default: _font underline thickness_.
|
2020-08-04 07:33:15 +02:00
|
|
|
|
|
|
|
|
# SECTION: mouse
|
|
|
|
|
|
|
|
|
|
*hide-when-typing*
|
2020-11-26 18:22:45 +01:00
|
|
|
Boolean. When enabled, the mouse cursor is hidden while
|
|
|
|
|
typing. Default: _no_.
|
2020-08-04 07:33:15 +02:00
|
|
|
|
2020-09-15 19:09:00 +02:00
|
|
|
*alternate-scroll-mode*
|
|
|
|
|
Boolean. This option controls the initial value for the _alternate
|
|
|
|
|
scroll mode_. When this mode is enabled, mouse scroll events are
|
|
|
|
|
translated to _up_/_down_ key events when displaying the alternate
|
|
|
|
|
screen.
|
|
|
|
|
|
|
|
|
|
This lets you scroll with the mouse in e.g. pagers (like _less_)
|
|
|
|
|
without enabling native mouse support in them.
|
|
|
|
|
|
|
|
|
|
Alternate scrolling is *not* used if the application enables
|
|
|
|
|
native mouse support.
|
|
|
|
|
|
|
|
|
|
This option can be modified by applications at run-time using the
|
2020-09-16 08:05:38 +02:00
|
|
|
escape sequences *CSI ? 1007 h* (enable) and *CSI ? 1007 l*
|
2020-09-15 19:09:00 +02:00
|
|
|
(disable).
|
|
|
|
|
|
|
|
|
|
Default: _yes_.
|
|
|
|
|
|
2023-07-05 00:19:21 +08:00
|
|
|
# SECTION: touch
|
|
|
|
|
|
|
|
|
|
*long-press-delay*
|
|
|
|
|
Number of milliseconds to distinguish between a short press and
|
|
|
|
|
a long press on the touchscreen.
|
|
|
|
|
|
|
|
|
|
Default: _400_.
|
|
|
|
|
|
2019-08-12 20:00:09 +02:00
|
|
|
# SECTION: colors
|
|
|
|
|
|
2021-11-13 17:22:07 +01:00
|
|
|
This section controls the 16 ANSI colors, the default foreground and
|
|
|
|
|
background colors, and the extended 256 color palette. Note that
|
2021-05-08 02:18:45 -05:00
|
|
|
applications can change these at runtime.
|
2020-03-02 18:47:48 +01:00
|
|
|
|
2021-11-13 17:22:07 +01:00
|
|
|
The colors are in RRGGBB format (i.e. plain old 6-digit hex values,
|
|
|
|
|
without prefix). That is, they do *not* have an alpha component. You
|
|
|
|
|
can configure the background transparency with the _alpha_ option.
|
2020-03-02 20:29:28 +01:00
|
|
|
|
2019-08-12 20:00:09 +02:00
|
|
|
*foreground*
|
2021-11-13 17:22:07 +01:00
|
|
|
Default foreground color. This is the color used when no ANSI
|
2022-08-17 18:12:51 +02:00
|
|
|
color is being used. Default: _839496_.
|
2019-08-12 20:00:09 +02:00
|
|
|
|
|
|
|
|
*background*
|
2021-11-13 17:22:07 +01:00
|
|
|
Default background color. This is the color used when no ANSI
|
2022-08-17 18:12:51 +02:00
|
|
|
color is being used. Default: _002b36_.
|
2019-08-12 20:00:09 +02:00
|
|
|
|
|
|
|
|
*regular0*, *regular1* *..* *regular7*
|
2022-01-15 14:36:45 -05:00
|
|
|
The eight basic ANSI colors (Black, Red, Green, Yellow, Blue,
|
2023-07-18 16:18:53 +02:00
|
|
|
Magenta, Cyan, White). Default: _242424_, _f62b5a_, _47b413_,
|
|
|
|
|
_e3c401_, _24acd4_, _f2affd_, _13c299_, _e6e6e6_ (starlight
|
|
|
|
|
theme, V4).
|
2019-08-12 20:00:09 +02:00
|
|
|
|
|
|
|
|
*bright0*, *bright1* *..* *bright7*
|
2022-01-15 14:36:45 -05:00
|
|
|
The eight bright ANSI colors (Black, Red, Green, Yellow, Blue,
|
2023-07-18 16:18:53 +02:00
|
|
|
Magenta, Cyan, White). Default: _616161_, _ff4d51_, _35d450_,
|
|
|
|
|
_e9e836_, _5dc5f8_, _feabf2_, _24dfc4_, _ffffff_ (starlight
|
|
|
|
|
theme, V4).
|
2019-08-12 20:00:09 +02:00
|
|
|
|
2021-11-03 14:25:38 +01:00
|
|
|
*dim0*, *dim1* *..* *dim7*
|
|
|
|
|
Custom colors to use with dimmed colors. Dimmed colors do not have
|
|
|
|
|
an entry in the color palette. Applications emit them by combining
|
|
|
|
|
a color value, and a "dim" attribute.
|
|
|
|
|
|
|
|
|
|
By default, foot implements this by reducing the luminance of the
|
|
|
|
|
current color. This is a generic approach that applies to both
|
|
|
|
|
colors from the 256-color palette, as well as 24-bit RGB colors.
|
|
|
|
|
|
|
|
|
|
You can change this behavior by setting the *dimN* options. When
|
|
|
|
|
set, foot will match the current color against the color palette,
|
|
|
|
|
and if it matches one of the *regularN* colors, the corresponding
|
|
|
|
|
*dimN* color will be used.
|
|
|
|
|
|
|
|
|
|
If instead the current color matches one of the *brightN* colors,
|
2022-04-04 01:28:03 +02:00
|
|
|
the corresponding *regularN* color will be used.
|
2021-11-03 14:25:38 +01:00
|
|
|
|
2022-04-04 01:28:03 +02:00
|
|
|
If the current color does not match any known color, it is dimmed
|
2021-11-03 14:25:38 +01:00
|
|
|
by reducing the luminance (i.e. the same behavior as if the *dimN*
|
|
|
|
|
options are unconfigured). 24-bit RGB colors will typically fall
|
|
|
|
|
into this category.
|
|
|
|
|
|
2023-01-08 00:55:01 +03:00
|
|
|
Note that applications can change the *regularN* and *brightN*
|
2021-11-03 14:25:38 +01:00
|
|
|
colors at runtime. However, they have no way of changing the
|
|
|
|
|
*dimN* colors. If an application has changed the *regularN*
|
|
|
|
|
colors, foot will still use the corresponding *dimN* color, as
|
|
|
|
|
configured in foot.ini.
|
|
|
|
|
|
|
|
|
|
Default: _not set_.
|
|
|
|
|
|
2021-05-08 02:18:45 -05:00
|
|
|
*0* *..* *255*
|
|
|
|
|
Arbitrary colors in the 256-color palette. Default: for *0* *..*
|
|
|
|
|
*15*, see regular and bright defaults above; see
|
|
|
|
|
https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit for an
|
|
|
|
|
explanation of the remainder.
|
|
|
|
|
|
2024-10-23 08:35:30 +02:00
|
|
|
*sixel0* *..* *sixel15*
|
|
|
|
|
The default sixel color palette. Default: _000000_, _3333cc_,
|
|
|
|
|
_cc2121_, _33cc33_, _cc33cc_, _33cccc_, _cccc33_, _878787_,
|
|
|
|
|
_424242_, _545499_, _994242_, _549954_, _995499_, _549999_,
|
|
|
|
|
_999954_, _cccccc_.
|
|
|
|
|
|
2019-08-15 18:15:43 +02:00
|
|
|
*alpha*
|
|
|
|
|
Background translucency. A value in the range 0.0-1.0, where 0.0
|
|
|
|
|
means completely transparent, and 1.0 is opaque. Default: _1.0_.
|
|
|
|
|
|
2020-08-12 18:53:32 +02:00
|
|
|
*selection-foreground*, *selection-background*
|
|
|
|
|
Foreground (text) and background color to use in selected
|
|
|
|
|
text. Note that *both* options must be set, or the default will be
|
|
|
|
|
used. Default: _inverse foreground/background_.
|
|
|
|
|
|
2021-02-06 11:10:40 +01:00
|
|
|
*jump-labels*
|
2022-01-20 10:41:27 -08:00
|
|
|
Two color values specifying the foreground (text) and background
|
2021-02-06 11:10:40 +01:00
|
|
|
colors to use when rendering jump labels in URL mode. Default:
|
|
|
|
|
_regular0 regular3_.
|
|
|
|
|
|
2021-09-27 19:39:29 +00:00
|
|
|
*scrollback-indicator*
|
2021-11-13 17:22:07 +01:00
|
|
|
Two color values specifying the foreground (text) and background
|
2022-04-06 01:56:17 +02:00
|
|
|
(indicator itself) colors for the scrollback indicator. Default:
|
|
|
|
|
_regular0 bright4_.
|
2021-09-27 19:39:29 +00:00
|
|
|
|
2022-07-27 19:14:27 +02:00
|
|
|
*search-box-no-match*
|
|
|
|
|
Two color values specifying the foreground (text) and background
|
|
|
|
|
colors for the scrollback search box, when there are no
|
|
|
|
|
matches. Default: _regular0 regular1_.
|
|
|
|
|
|
|
|
|
|
*search-box-match*
|
|
|
|
|
Two color values specifying the foreground (text) and background
|
|
|
|
|
colors for the scrollback search box, when the search box is
|
|
|
|
|
either empty, or there are matches. Default: _regular0 regular3_.
|
|
|
|
|
|
2021-02-06 11:10:40 +01:00
|
|
|
*urls*
|
|
|
|
|
Color to use for the underline used to highlight URLs in URL
|
|
|
|
|
mode. Default: _regular3_.
|
|
|
|
|
|
2023-10-10 08:12:04 +02:00
|
|
|
*flash*
|
|
|
|
|
Color to use for the terminal window flash. Default: _7f7f00_.
|
|
|
|
|
|
|
|
|
|
*flash-alpha*
|
|
|
|
|
Flash translucency. A value in the range 0.0-1.0, where 0.0 means
|
|
|
|
|
completely transparent, and 1.0 is opaque. Default: _0.5_.
|
|
|
|
|
|
2020-03-02 18:42:49 +01:00
|
|
|
# SECTION: csd
|
|
|
|
|
|
|
|
|
|
This section controls the look of the _CSDs_ (Client Side
|
|
|
|
|
Decorations). Note that the default is to *not* use CSDs, but instead
|
|
|
|
|
to use _SSDs_ (Server Side Decorations) when the compositor supports
|
|
|
|
|
it.
|
|
|
|
|
|
2020-03-02 20:29:28 +01:00
|
|
|
Note that unlike the colors defined in the _colors_ section, the color
|
2021-11-13 17:22:07 +01:00
|
|
|
values here are in AARRGGBB (i.e. plain old 8-digit hex values)
|
|
|
|
|
format. I.e. they contain an alpha component - 00 means completely
|
|
|
|
|
transparent, and ff fully opaque.
|
|
|
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
|
|
- ffffffff: white, fully opaque
|
|
|
|
|
- ff000000: black, fully opaque
|
|
|
|
|
- 7fffffff: white, semi-transparent
|
|
|
|
|
- ff00ff00: green, fully opaque
|
2020-03-02 20:29:28 +01:00
|
|
|
|
2020-03-02 18:42:49 +01:00
|
|
|
*preferred*
|
2020-10-10 11:04:17 +02:00
|
|
|
Which type of window decorations to prefer: *client* (CSD),
|
|
|
|
|
*server* (SSD) or *none*.
|
|
|
|
|
|
|
|
|
|
Note that this is only a hint to the compositor. Depending on
|
|
|
|
|
compositor support, and how it has been configured, it may
|
|
|
|
|
instruct foot to use CSDs even though this option has been set to
|
2020-10-10 11:12:48 +02:00
|
|
|
*server*, or render SSDs despite *client* or *none* being set.
|
2020-10-10 11:14:01 +02:00
|
|
|
|
|
|
|
|
Default: _server_.
|
2020-03-02 18:42:49 +01:00
|
|
|
|
2020-03-03 18:18:59 +01:00
|
|
|
*size*
|
|
|
|
|
Height, in pixels (subject to output scaling), of the
|
2022-04-15 20:12:34 +02:00
|
|
|
titlebar. Setting it to 0 will hide the titlebar, while still
|
|
|
|
|
showing the border (if *border-width* is set to a non-zero
|
|
|
|
|
value). Default: _26_.
|
2020-03-02 18:42:49 +01:00
|
|
|
|
2020-03-03 18:18:59 +01:00
|
|
|
*color*
|
2021-11-13 17:22:07 +01:00
|
|
|
Titlebar color. Default: use the default _foreground_ color.
|
2020-03-02 18:42:49 +01:00
|
|
|
|
2021-07-22 23:21:31 +02:00
|
|
|
*font*
|
|
|
|
|
Font to use for the title bar. This is a list of fonts, similar to
|
2021-07-22 23:40:40 +02:00
|
|
|
the main *font* option. Note that the font will be sized using the
|
|
|
|
|
title bar size. That is, all *:size* and *:pixelsize* attributes
|
|
|
|
|
will be ignored. Default: _primary font_.
|
2021-07-22 23:21:31 +02:00
|
|
|
|
2022-04-15 20:12:34 +02:00
|
|
|
*hide-when-maximized*
|
|
|
|
|
Boolean. When enabled, the CSD titlebar is hidden when the window
|
|
|
|
|
is maximized. The completely disable the titlebar, set *size* to 0
|
|
|
|
|
instead. Default: _no_.
|
|
|
|
|
|
2023-07-14 12:03:35 +02:00
|
|
|
*double-click-to-maximize*
|
|
|
|
|
Boolean. When enabled, double-clicking the CSD titlebar will
|
|
|
|
|
(un)maximize the window. Default: _yes_.
|
|
|
|
|
|
2021-10-27 18:27:08 +02:00
|
|
|
*border-width*
|
|
|
|
|
Width of the border, in pixels (subject to output scaling). Note
|
|
|
|
|
that the border encompasses the entire window, including the title
|
|
|
|
|
bar. Default: _0_.
|
|
|
|
|
|
|
|
|
|
*border-color*
|
2021-11-13 17:22:07 +01:00
|
|
|
Color of border. By default, the title bar color is used. If the
|
|
|
|
|
title bar color has not been set, the default foreground color
|
|
|
|
|
(from the color scheme) is used. Default: _titlebar color_.
|
2021-10-27 18:27:08 +02:00
|
|
|
|
2020-03-02 20:29:28 +01:00
|
|
|
*button-width*
|
2020-03-03 18:18:59 +01:00
|
|
|
Width, in pixels (subject to output scaling), of the
|
2020-03-06 19:11:31 +01:00
|
|
|
minimize/maximize/close buttons. Default: _26_.
|
2020-03-02 20:29:28 +01:00
|
|
|
|
2021-06-20 10:44:50 +02:00
|
|
|
*button-color*
|
|
|
|
|
Foreground color on the minimize/maximize/close buttons. Default:
|
|
|
|
|
use the default _background_ color.
|
|
|
|
|
|
2020-03-02 20:29:28 +01:00
|
|
|
*button-minimize-color*
|
2021-11-13 17:22:07 +01:00
|
|
|
Minimize button's background color. Default: use the default
|
|
|
|
|
_regular4_ color (blue).
|
2020-03-02 20:29:28 +01:00
|
|
|
|
|
|
|
|
*button-maximize-color*
|
2021-11-13 17:22:07 +01:00
|
|
|
Maximize button's background color. Default: use the default
|
|
|
|
|
_regular2_ color (green).
|
2020-03-02 20:29:28 +01:00
|
|
|
|
|
|
|
|
*button-close-color*
|
2021-11-13 17:22:07 +01:00
|
|
|
Close button's background color. Default: use the default
|
|
|
|
|
_regular1_ color (red).
|
2020-03-02 18:42:49 +01:00
|
|
|
|
2020-03-09 20:22:04 +01:00
|
|
|
# SECTION: key-bindings
|
|
|
|
|
|
|
|
|
|
This section lets you override the default key bindings.
|
|
|
|
|
|
2020-03-12 17:42:27 +01:00
|
|
|
The general format is _action=combo1...comboN_. That is, each action
|
|
|
|
|
may have one or more key combinations, space separated. Each
|
2022-04-04 01:28:03 +02:00
|
|
|
combination is in the form _mod1+mod2+key_. The names of the modifiers
|
2020-07-27 16:45:34 +02:00
|
|
|
and the key *must* be valid XKB key names.
|
2020-03-09 20:22:04 +01:00
|
|
|
|
2021-02-27 20:55:28 +01:00
|
|
|
Note that if *Shift* is one of the modifiers, the _key_ *must not* be
|
|
|
|
|
in upper case. For example, *Control+Shift+V* will never trigger, but
|
|
|
|
|
*Control+Shift+v* will.
|
2020-03-09 20:22:04 +01:00
|
|
|
|
2020-03-12 10:46:27 +01:00
|
|
|
Note that *Alt* is usually called *Mod1*.
|
2020-03-09 20:22:04 +01:00
|
|
|
|
2021-11-07 15:51:53 +01:00
|
|
|
*xkbcli interactive-wayland* can be useful for finding keysym names.
|
|
|
|
|
|
2025-01-27 12:31:50 +01:00
|
|
|
When matching key presses to key bindings, foot uses a couple of
|
|
|
|
|
different approaches.
|
|
|
|
|
|
|
|
|
|
As an example, let's say you press ctrl+shift+c (assume plain us ASCII
|
|
|
|
|
layout). XKB will tell foot *Control+C* was pressed. Note the lack of
|
|
|
|
|
the shift modifier, and the upper case 'C'. Internally, this is called
|
|
|
|
|
the "translated" form, and is what foot tries to match first.
|
|
|
|
|
|
|
|
|
|
If no "translated" key bindings can be found, foot proceeds to
|
|
|
|
|
checking the "untranslated" variant. Using the same example as above,
|
|
|
|
|
this will match *Control+Shift+c* (shift modifier present, lower case
|
|
|
|
|
'c').
|
|
|
|
|
|
|
|
|
|
This means you can use either form in your foot configuration, and
|
|
|
|
|
that *Control+C* (and similar) has higher priority than
|
|
|
|
|
*Control+Shift+c*. Also note that while foot normally detects when the
|
|
|
|
|
same combination is assigned to multiple actions, it will not detect
|
|
|
|
|
*Control+C* vs. *Control+Shift+c* collisions. Call it a known bug...
|
|
|
|
|
|
|
|
|
|
Finally, foot tries to match the raw key code. Here, the primary
|
|
|
|
|
layout is queried for all key codes that generate a particular XKB
|
|
|
|
|
symbol, and the pressed key's code is matched against this. For
|
|
|
|
|
example, if you use the layouts *"us,de(neo)"*, the 'r' key generates
|
|
|
|
|
the symbol 'c' in the neo layout. I.e. to get a 'c', you press
|
|
|
|
|
'r'. The match logic described above will only match 'c' key bindings
|
|
|
|
|
(e.g. *Control+Shift+c*). The raw mode however, will match 'r' key
|
|
|
|
|
bindings (e.g. *Control+Shift+r*). This is useful for non-latin
|
|
|
|
|
layouts, where you would otherwise have to customize all key bindings.
|
|
|
|
|
|
|
|
|
|
A key combination can only be mapped to *one* action. Let's say you
|
2020-03-12 17:42:27 +01:00
|
|
|
want to bind *Control+Shift+R* to *fullscreen*. Since this is the
|
2020-03-12 17:16:35 +01:00
|
|
|
default shortcut for *search-start*, you first need to unmap the
|
2020-03-18 14:52:04 +01:00
|
|
|
default binding. This can be done by setting _action=none_;
|
|
|
|
|
e.g. *search-start=none*.
|
2020-03-12 17:16:35 +01:00
|
|
|
|
2021-10-24 11:49:37 +02:00
|
|
|
*noop*
|
|
|
|
|
All key combinations listed here will not be sent to the
|
2023-09-20 13:20:48 +00:00
|
|
|
application. Default: _none_.
|
2021-10-24 11:49:37 +02:00
|
|
|
|
2020-09-10 18:17:47 +02:00
|
|
|
*scrollback-up-page*
|
2025-01-31 07:29:16 +01:00
|
|
|
Scrolls up/back one page in history. Default: _Shift+Page\_Up
|
|
|
|
|
Shift+KP\_Page\_Up_.
|
2020-09-09 19:40:48 +02:00
|
|
|
|
2020-09-10 18:17:47 +02:00
|
|
|
*scrollback-up-half-page*
|
2023-09-20 13:20:48 +00:00
|
|
|
Scrolls up/back half of a page in history. Default: _none_.
|
2020-03-09 20:22:04 +01:00
|
|
|
|
2020-09-10 18:17:47 +02:00
|
|
|
*scrollback-up-line*
|
2023-09-20 13:20:48 +00:00
|
|
|
Scrolls up/back a single line in history. Default: _none_.
|
2020-09-10 18:17:47 +02:00
|
|
|
|
|
|
|
|
*scrollback-down-page*
|
2020-09-09 19:40:48 +02:00
|
|
|
Scroll down/forward one page in history. Default:
|
2025-01-31 07:29:16 +01:00
|
|
|
_Shift+Page\_Down Shift+KP\_Page\_Down_.
|
2020-09-09 19:40:48 +02:00
|
|
|
|
2020-09-10 18:17:47 +02:00
|
|
|
*scrollback-down-half-page*
|
2023-09-20 13:20:48 +00:00
|
|
|
Scroll down/forward half of a page in history. Default: _none_.
|
2020-09-10 18:17:47 +02:00
|
|
|
|
|
|
|
|
*scrollback-down-line*
|
2023-09-20 13:20:48 +00:00
|
|
|
Scroll down/forward a single line in history. Default: _none_.
|
2020-03-09 20:22:04 +01:00
|
|
|
|
2022-02-23 19:03:54 +01:00
|
|
|
*scrollback-home*
|
2023-09-20 13:20:48 +00:00
|
|
|
Scroll to the beginning of the scrollback. Default: _none_.
|
2022-02-23 19:03:54 +01:00
|
|
|
|
|
|
|
|
*scrollback-end*
|
2023-09-20 13:20:48 +00:00
|
|
|
Scroll to the end (bottom) of the scrollback. Default: _none_.
|
2022-02-23 19:03:54 +01:00
|
|
|
|
2020-03-09 20:22:04 +01:00
|
|
|
*clipboard-copy*
|
2022-01-17 13:57:24 -05:00
|
|
|
Copies the current selection into the _clipboard_. Default: _Control+Shift+c_
|
|
|
|
|
_XF86Copy_.
|
2020-03-09 20:22:04 +01:00
|
|
|
|
|
|
|
|
*clipboard-paste*
|
2022-01-17 13:57:24 -05:00
|
|
|
Pastes from the _clipboard_. Default: _Control+Shift+v_ _XF86Paste_.
|
2020-03-09 20:22:04 +01:00
|
|
|
|
|
|
|
|
*primary-paste*
|
2020-10-10 10:27:42 +02:00
|
|
|
Pastes from the _primary selection_. Default: _Shift+Insert_ (also
|
|
|
|
|
defined in *mouse-bindings*).
|
2020-03-09 20:22:04 +01:00
|
|
|
|
|
|
|
|
*search-start*
|
2021-02-27 21:34:37 +01:00
|
|
|
Starts a scrollback/history search. Default: _Control+Shift+r_.
|
2020-03-09 20:22:04 +01:00
|
|
|
|
|
|
|
|
*font-increase*
|
|
|
|
|
Increases the font size by 0.5pt. Default: _Control+plus
|
2024-02-15 16:41:16 +01:00
|
|
|
Control+equal Control+KP\_Add_ (also defined in *mouse-bindings*).
|
2020-03-09 20:22:04 +01:00
|
|
|
|
|
|
|
|
*font-decrease*
|
|
|
|
|
Decreases the font size by 0.5pt. Default: _Control+minus
|
2024-02-15 16:41:16 +01:00
|
|
|
Control+KP\_Subtract_ (also defined in *mouse-bindings*).
|
2020-03-09 20:22:04 +01:00
|
|
|
|
|
|
|
|
*font-reset*
|
|
|
|
|
Resets the font size to the default. Default: _Control+0 Control+KP\_0_.
|
|
|
|
|
|
|
|
|
|
*spawn-terminal*
|
2020-03-17 21:53:26 +01:00
|
|
|
Spawns a new terminal. If the shell has been configured to emit
|
|
|
|
|
the OSC 7 escape sequence, the new terminal will start in the
|
2021-02-27 21:34:37 +01:00
|
|
|
current working directory. Default: _Control+Shift+n_.
|
2020-03-09 20:22:04 +01:00
|
|
|
|
2020-03-12 09:34:09 +01:00
|
|
|
*minimize*
|
2023-09-20 13:20:48 +00:00
|
|
|
Minimizes the window. Default: _none_.
|
2020-03-12 09:34:09 +01:00
|
|
|
|
|
|
|
|
*maximize*
|
2023-09-20 13:20:48 +00:00
|
|
|
Toggle the maximized state. Default: _none_.
|
2020-03-12 09:34:09 +01:00
|
|
|
|
|
|
|
|
*fullscreen*
|
2023-09-20 13:20:48 +00:00
|
|
|
Toggles the fullscreen state. Default: _none_.
|
2020-03-12 09:34:09 +01:00
|
|
|
|
2022-12-08 11:50:43 +01:00
|
|
|
*pipe-visible*, *pipe-scrollback*, *pipe-selected*, *pipe-command-output*
|
|
|
|
|
Pipes the currently visible text, the entire scrollback, the
|
|
|
|
|
currently selected text, or the last command's output to an
|
|
|
|
|
external tool. The syntax for this option is a bit special; the
|
|
|
|
|
first part of the value is the command to execute enclosed in
|
|
|
|
|
"[]", followed by the binding(s).
|
2020-07-15 17:48:37 +02:00
|
|
|
|
|
|
|
|
You can configure multiple pipes as long as the command strings
|
|
|
|
|
are different and the key bindings are unique.
|
|
|
|
|
|
|
|
|
|
Note that the command is *not* automatically run inside a shell;
|
|
|
|
|
use *sh -c "command line"* if you need that.
|
|
|
|
|
|
2022-12-08 11:50:43 +01:00
|
|
|
Example #1:
|
|
|
|
|
# Extract currently visible URLs, let user choose one (via
|
|
|
|
|
fuzzel), then launch firefox with the selected URL++
|
2024-02-07 17:09:01 +01:00
|
|
|
*pipe-visible=[sh -c "xurls | uniq | tac | fuzzel | xargs -r firefox"] Control+Print*
|
2020-07-15 17:48:37 +02:00
|
|
|
|
2022-12-08 11:50:43 +01:00
|
|
|
Example #2:
|
2024-02-07 17:09:01 +01:00
|
|
|
# Open scrollback contents in Emacs running in a new foot instance++
|
|
|
|
|
*pipe-scrollback=[sh -c "f=$(mktemp) && cat - > $f && foot emacsclient -t $f; rm $f"] Control+Shift+Print*
|
|
|
|
|
|
2023-09-20 13:20:48 +00:00
|
|
|
Default: _none_
|
2020-07-15 17:48:37 +02:00
|
|
|
|
2021-02-04 20:39:13 +01:00
|
|
|
*show-urls-launch*
|
2021-02-06 11:18:35 +01:00
|
|
|
Enter URL mode, where all currently visible URLs are tagged with a
|
2022-03-22 19:07:06 +01:00
|
|
|
jump label with a key sequence that will open the URL (and exit
|
bind control-shift-u to unicode-input, move urls to o
Having a keybinding to invoke arbitrary unicode characters is very
useful. It's often used as a method of last resort to communicate with
people outside of your main language. For example, if you want to type
the last letter of my real name, you can invoke the latin-1 character
0xe9 or unicode 0x00e9.
You can also use this to type special characters, for example, unicode
U+1F4A9 is of course, the infamous PILE OF POO, which is sure to
produce million laughs everywhere you go.
In foot, there's no keybinding by default to invoke the very useful
unicode-input command. There is no "standard" (as in "ISO") keybinding
this either. But there *is* a de-facto standard currently deployed
by *both* GTK and Qt (a rare feat) *and* Chrome OS (an even rarer
feat) and it's control-shift-u.
Alternatives include Control-x 8 (emacs), Control V u (vim),
Alt (Windows, LibreOffice), or Option (Mac). I doubt we want to adopt
any of those.
So let's use control-shift-u for this. Unfortunately, it's currently
assigned to show-urls-launch, which is unfortunate, but
insurmountable. We can reassign this keybinding elsewhere. I have
picked control-shift-o in my configuration, because "o" is a good
mnemonic for "open URLs". Others have suggested "m" instead.
Closes: #1183
2022-12-15 11:49:51 -05:00
|
|
|
URL mode). Default: _Control+Shift+o_.
|
2022-03-22 19:07:06 +01:00
|
|
|
|
|
|
|
|
*show-urls-persistent*
|
|
|
|
|
Similar to *show-urls-launch*, but does not automatically exit URL
|
|
|
|
|
mode after activating an URL. Default: _none_.
|
2021-01-30 12:43:59 +01:00
|
|
|
|
2021-02-04 20:55:08 +01:00
|
|
|
*show-urls-copy*
|
2021-02-06 11:18:35 +01:00
|
|
|
Enter URL mode, where all currently visible URLs are tagged with a
|
|
|
|
|
jump label with a key sequence that will place the URL in the
|
2021-02-04 20:55:08 +01:00
|
|
|
clipboard. Default: _none_.
|
|
|
|
|
|
2025-02-03 09:15:33 +01:00
|
|
|
*regex-launch*
|
|
|
|
|
Enter regex mode. This works exactly the same as URL mode; all
|
|
|
|
|
regex matches are tagged with a jump label with a key sequence
|
|
|
|
|
that will "launch" to match (and exit regex mode).
|
|
|
|
|
|
|
|
|
|
The name of the regex section must be specified in the key
|
|
|
|
|
binding:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
[regex:foo]
|
|
|
|
|
regex=foo(bar)?
|
|
|
|
|
launch=path-to-script-or-application {match}
|
|
|
|
|
|
|
|
|
|
[key-bindings]
|
|
|
|
|
regex-launch=[foo] Control+Shift+q
|
|
|
|
|
regex-copy=[foo] Control+Mod1+Shift+q
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Default: _none_.
|
|
|
|
|
|
|
|
|
|
*regex-copy*
|
|
|
|
|
Same as *regex-copy*, but the match is placed in the clipboard,
|
|
|
|
|
instead of "launched", upon activation. Default: _none_.
|
|
|
|
|
|
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
|
|
|
*prompt-prev*
|
|
|
|
|
Jump to the previous, currently not visible, prompt (requires
|
|
|
|
|
shell integration, see *foot*(1)). Default: _Control+Shift+z_.
|
|
|
|
|
|
|
|
|
|
*prompt-next*
|
|
|
|
|
Jump the next prompt (requires shell integration, see
|
|
|
|
|
*foot*(1)). Default: _Control+Shift+x_.
|
|
|
|
|
|
2022-07-28 18:09:16 +02:00
|
|
|
*unicode-input*
|
|
|
|
|
Input a Unicode character by typing its codepoint in hexadecimal,
|
|
|
|
|
followed by *Enter* or *Space*.
|
|
|
|
|
|
|
|
|
|
For example, to input the character _ö_ (LATIN SMALL LETTER O WITH
|
|
|
|
|
DIAERESIS, Unicode codepoint 0xf6), you would first activate this
|
|
|
|
|
key binding, then type: *f*, *6*, *Enter*.
|
|
|
|
|
|
|
|
|
|
Another example: to input 😍 (SMILING FACE WITH HEART-SHAPED EYES,
|
|
|
|
|
Unicode codepoint 0x1f60d), activate this key binding, then type:
|
|
|
|
|
*1*, *f*, *6*, *0*, *d*, *Enter*.
|
|
|
|
|
|
|
|
|
|
Recognized key bindings in Unicode input mode:
|
|
|
|
|
|
|
|
|
|
- Enter, Space: commit the Unicode character, then exit this mode.
|
2022-07-29 11:56:41 +02:00
|
|
|
- Escape, q, Ctrl+c, Ctrl+d, Ctrl+g: abort input, then exit this mode.
|
2022-07-28 18:09:16 +02:00
|
|
|
- 0-9, a-f: append next digit to the Unicode's codepoint.
|
|
|
|
|
- Backspace: undo the last digit.
|
|
|
|
|
|
|
|
|
|
Note that there is no visual feedback while in this mode. This is
|
|
|
|
|
by design; foot's Unicode input mode is considered to be a
|
|
|
|
|
fallback. The preferred way of entering Unicode characters, emojis
|
|
|
|
|
etc is by using an IME.
|
|
|
|
|
|
bind control-shift-u to unicode-input, move urls to o
Having a keybinding to invoke arbitrary unicode characters is very
useful. It's often used as a method of last resort to communicate with
people outside of your main language. For example, if you want to type
the last letter of my real name, you can invoke the latin-1 character
0xe9 or unicode 0x00e9.
You can also use this to type special characters, for example, unicode
U+1F4A9 is of course, the infamous PILE OF POO, which is sure to
produce million laughs everywhere you go.
In foot, there's no keybinding by default to invoke the very useful
unicode-input command. There is no "standard" (as in "ISO") keybinding
this either. But there *is* a de-facto standard currently deployed
by *both* GTK and Qt (a rare feat) *and* Chrome OS (an even rarer
feat) and it's control-shift-u.
Alternatives include Control-x 8 (emacs), Control V u (vim),
Alt (Windows, LibreOffice), or Option (Mac). I doubt we want to adopt
any of those.
So let's use control-shift-u for this. Unfortunately, it's currently
assigned to show-urls-launch, which is unfortunate, but
insurmountable. We can reassign this keybinding elsewhere. I have
picked control-shift-o in my configuration, because "o" is a good
mnemonic for "open URLs". Others have suggested "m" instead.
Closes: #1183
2022-12-15 11:49:51 -05:00
|
|
|
Default: _Control+Shift+u_.
|
2022-07-28 18:09:16 +02:00
|
|
|
|
2024-04-10 19:26:23 +02:00
|
|
|
*quit*
|
|
|
|
|
Quit foot. Default: _none_.
|
|
|
|
|
|
2020-07-29 17:27:01 +02:00
|
|
|
# SECTION: search-bindings
|
|
|
|
|
|
|
|
|
|
This section lets you override the default key bindings used in
|
|
|
|
|
scrollback search mode. The syntax is exactly the same as the regular
|
|
|
|
|
**key-bindings**.
|
|
|
|
|
|
|
|
|
|
*cancel*
|
|
|
|
|
Aborts the search. The viewport is restored and the _primary
|
2021-05-25 16:51:07 +01:00
|
|
|
selection_ is **not** updated. Default: _Control+g Control+c
|
|
|
|
|
Escape_.
|
2020-07-29 17:27:01 +02:00
|
|
|
|
|
|
|
|
*commit*
|
|
|
|
|
Exit search mode and copy current selection into the _primary
|
|
|
|
|
selection_. Viewport is **not** restored. To copy the selection to
|
2025-01-31 07:29:16 +01:00
|
|
|
the regular _clipboard_, use *Control+Shift+c*. Default: _Return
|
|
|
|
|
KP_Enter_.
|
2020-07-29 17:27:01 +02:00
|
|
|
|
|
|
|
|
*find-prev*
|
|
|
|
|
Search **backwards** in the scrollback history for the next
|
|
|
|
|
match. Default: _Control+r_.
|
|
|
|
|
|
|
|
|
|
*find-next*
|
2020-08-15 17:44:11 +02:00
|
|
|
Searches **forwards** in the scrollback history for the next
|
2020-07-29 17:27:01 +02:00
|
|
|
match. Default: _Control+s_.
|
|
|
|
|
|
|
|
|
|
*cursor-left*
|
|
|
|
|
Moves the cursor in the search box one **character** to the
|
|
|
|
|
left. Default: _Left Control+b_.
|
|
|
|
|
|
|
|
|
|
*cursor-left-word*
|
|
|
|
|
Moves the cursor in the search box one **word** to the
|
|
|
|
|
left. Default: _Control+Left Mod1+b_.
|
|
|
|
|
|
|
|
|
|
*cursor-right*
|
|
|
|
|
Moves the cursor in the search box one **character** to the
|
|
|
|
|
right. Default: _Right Control+f_.
|
|
|
|
|
|
|
|
|
|
*cursor-right-word*
|
|
|
|
|
Moves the cursor in the search box one **word** to the
|
2021-05-24 21:34:51 +01:00
|
|
|
right. Default: _Control+Right Mod1+f_.
|
2020-07-29 17:27:01 +02:00
|
|
|
|
|
|
|
|
*cursor-home*
|
|
|
|
|
Moves the cursor in the search box to the beginning of the
|
|
|
|
|
input. Default: _Home Control+a_.
|
|
|
|
|
|
|
|
|
|
*cursor-end*
|
|
|
|
|
Moves the cursor in the search box to the end of the
|
|
|
|
|
input. Default: _End Control+e_.
|
|
|
|
|
|
|
|
|
|
*delete-prev*
|
|
|
|
|
Deletes the **character before** the cursor. Default: _BackSpace_.
|
|
|
|
|
|
|
|
|
|
*delete-prev-word*
|
|
|
|
|
Deletes the **word before** the cursor. Default: _Mod1+BackSpace
|
|
|
|
|
Control+BackSpace_.
|
|
|
|
|
|
|
|
|
|
*delete-next*
|
|
|
|
|
Deletes the **character after** the cursor. Default: _Delete_.
|
|
|
|
|
|
|
|
|
|
*delete-next-word*
|
2021-04-05 14:37:42 +02:00
|
|
|
Deletes the **word after** the cursor. Default: _Mod1+d
|
2020-07-29 17:27:01 +02:00
|
|
|
Control+Delete_.
|
|
|
|
|
|
2023-10-08 10:16:48 +02:00
|
|
|
*extend-char*
|
|
|
|
|
Extend current selection to the right, by one character. Default:
|
|
|
|
|
_Shift+Right_.
|
|
|
|
|
|
2020-07-29 17:27:01 +02:00
|
|
|
*extend-to-word-boundary*
|
2023-10-08 10:16:48 +02:00
|
|
|
Extend current selection to the right, to the next word
|
|
|
|
|
boundary. Default: _Control+w Control+Shift+Right_.
|
2020-07-29 17:27:01 +02:00
|
|
|
|
|
|
|
|
*extend-to-next-whitespace*
|
2023-10-08 10:16:48 +02:00
|
|
|
Extend the current selection to the right, to the next
|
|
|
|
|
whitespace. Default: _Control+Shift+w_.
|
|
|
|
|
|
|
|
|
|
*extend-line-down*
|
|
|
|
|
Extend current selection down one line. Default: _Shift+Down_.
|
|
|
|
|
|
|
|
|
|
*extend-backward-char*
|
|
|
|
|
Extend current selection to the left, by one character. Default:
|
|
|
|
|
_Shift+Left_.
|
|
|
|
|
|
|
|
|
|
*extend-backward-to-word-boundary*
|
|
|
|
|
Extend current selection to the left, to the next word
|
|
|
|
|
boundary. Default: _Control+Shift+Left_.
|
|
|
|
|
|
|
|
|
|
*extend-backward-to-next-whitespace*
|
|
|
|
|
Extend the current selection to the left, to the next
|
|
|
|
|
whitespace. Default: _none_.
|
|
|
|
|
|
|
|
|
|
*extend-line-up*
|
|
|
|
|
Extend current selection up one line. Default: _Shift+Up_.
|
2020-07-29 17:27:01 +02:00
|
|
|
|
2020-11-01 12:39:57 +01:00
|
|
|
*clipboard-paste*
|
|
|
|
|
Paste from the _clipboard_ into the search buffer. Default:
|
2024-10-25 08:58:40 -04:00
|
|
|
_Control+v Control+y Control+Shift+v XF86Paste_.
|
2020-11-01 12:39:57 +01:00
|
|
|
|
|
|
|
|
*primary-paste*
|
|
|
|
|
Paste from the _primary selection_ into the search
|
|
|
|
|
buffer. Default: _Shift+Insert_.
|
2020-07-29 17:27:01 +02:00
|
|
|
|
2022-07-28 18:09:16 +02:00
|
|
|
*unicode-input*
|
|
|
|
|
Unicode input mode. See _key-bindings.unicode-input_ for
|
|
|
|
|
details. Default: _none_.
|
|
|
|
|
|
2023-10-08 10:37:16 +02:00
|
|
|
*scrollback-up-page*
|
2025-01-31 07:29:16 +01:00
|
|
|
Scrolls up/back one page in history. Default: _Shift+Page\_Up
|
|
|
|
|
Shift+KP\_Page\_Up_.
|
2023-10-08 10:37:16 +02:00
|
|
|
|
|
|
|
|
*scrollback-up-half-page*
|
|
|
|
|
Scrolls up/back half of a page in history. Default: _none_.
|
|
|
|
|
|
|
|
|
|
*scrollback-up-line*
|
|
|
|
|
Scrolls up/back a single line in history. Default: _none_.
|
|
|
|
|
|
|
|
|
|
*scrollback-down-page*
|
|
|
|
|
Scroll down/forward one page in history. Default:
|
2025-01-31 07:29:16 +01:00
|
|
|
_Shift+Page\_Down Shift+KP\_Page\_Down_.
|
2023-10-08 10:37:16 +02:00
|
|
|
|
|
|
|
|
*scrollback-down-half-page*
|
|
|
|
|
Scroll down/forward half of a page in history. Default: _none_.
|
|
|
|
|
|
|
|
|
|
*scrollback-down-line*
|
|
|
|
|
Scroll down/forward a single line in history. Default: _none_.
|
|
|
|
|
|
|
|
|
|
*scrollback-home*
|
|
|
|
|
Scroll to the beginning of the scrollback. Default: _none_.
|
|
|
|
|
|
|
|
|
|
*scrollback-end*
|
|
|
|
|
Scroll to the end (bottom) of the scrollback. Default: _none_.
|
|
|
|
|
|
2021-01-30 12:43:59 +01:00
|
|
|
# SECTION: url-bindings
|
|
|
|
|
|
|
|
|
|
This section lets you override the default key bindings used in URL
|
|
|
|
|
mode. The syntax is exactly the same as the regular **key-bindings**.
|
|
|
|
|
|
2021-10-20 19:01:03 +02:00
|
|
|
Be careful; do not use single-letter keys that are also used in
|
|
|
|
|
*[url].label-letters*, as doing so will make some URLs inaccessible.
|
|
|
|
|
|
2021-01-30 12:43:59 +01:00
|
|
|
*cancel*
|
2022-04-04 01:28:03 +02:00
|
|
|
Exits URL mode without opening a URL. Default: _Control+g
|
2021-05-25 16:51:07 +01:00
|
|
|
Control+c Control+d Escape_.
|
2021-01-30 12:43:59 +01:00
|
|
|
|
2021-02-14 14:18:11 +01:00
|
|
|
*toggle-url-visible*
|
|
|
|
|
By default, the jump label only shows the key sequence required to
|
|
|
|
|
activate it. This is fine as long as the URL is visible in the
|
|
|
|
|
original text.
|
|
|
|
|
|
|
|
|
|
But with e.g. OSC-8 URLs (the terminal version of HTML anchors,
|
2023-03-29 00:31:49 +03:00
|
|
|
i.e. "links"), the text on the screen can be something completely
|
2021-02-14 14:18:11 +01:00
|
|
|
different than the URL.
|
|
|
|
|
|
|
|
|
|
This action toggles between showing and hiding the URL on the jump
|
|
|
|
|
label.
|
|
|
|
|
|
2021-02-14 16:58:34 +01:00
|
|
|
Default: _t_.
|
2021-02-14 14:18:11 +01:00
|
|
|
|
2022-02-09 18:11:14 +01:00
|
|
|
# SECTION: text-bindings
|
|
|
|
|
|
|
|
|
|
This section lets you remap key combinations to custom escape
|
|
|
|
|
sequences.
|
|
|
|
|
|
|
|
|
|
The format is _text=combo1...comboN_. That is, the string to emit may
|
|
|
|
|
have one or more key combinations, space separated. Each combination
|
2022-04-04 01:28:03 +02:00
|
|
|
is in the form _mod1+mod2+key_. The names of the modifiers and the key
|
2022-02-09 18:11:14 +01:00
|
|
|
*must* be valid XKB key names.
|
|
|
|
|
|
|
|
|
|
The text string specifies the characters, or bytes, to emit when the
|
|
|
|
|
associated key combination(s) are pressed. There are two ways to
|
|
|
|
|
specify a character:
|
|
|
|
|
|
|
|
|
|
- Normal, printable characters are written as-is: *abcdef*.
|
|
|
|
|
- Bytes (e.g. ESC) are written as two-digit hexadecimal numbers, with
|
|
|
|
|
a *\\x* prefix: *\\x1b*.
|
|
|
|
|
|
|
|
|
|
Example: you would like to remap _Super+k_ to the _Up_ key.
|
|
|
|
|
|
|
|
|
|
The escape sequence for the Up key is _ESC [ A_ (without the
|
|
|
|
|
spaces). Thus, we need to specify this in foot.ini (*Mod4* is the XKB
|
|
|
|
|
name for the Super/logo key):
|
|
|
|
|
|
|
|
|
|
*\\x1b[A = Mod4+k*
|
|
|
|
|
|
|
|
|
|
Another example: to remap _Super+c_ to _Control+c_:
|
|
|
|
|
|
|
|
|
|
*\\x03 = Mod4+c*
|
|
|
|
|
|
2020-03-12 10:20:05 +01:00
|
|
|
# SECTION: mouse-bindings
|
|
|
|
|
|
|
|
|
|
This section lets you override the default mouse bindings.
|
|
|
|
|
|
2020-08-10 19:41:27 +02:00
|
|
|
The general format is _action=combo1...comboN_. That is, each action
|
|
|
|
|
may have one or more key combinations, space separated. Each
|
2022-04-04 01:28:03 +02:00
|
|
|
combination is in the form _mod1+mod2+BTN\_<name>[-COUNT]_. The names
|
2020-08-11 10:30:27 +02:00
|
|
|
of the modifiers *must* be valid XKB key names, and the button name
|
|
|
|
|
*must* be a valid libinput name. You can find the button names using
|
|
|
|
|
*libinput debug-events*.
|
2020-08-10 19:44:01 +02:00
|
|
|
|
2023-09-18 16:36:39 +02:00
|
|
|
The trailing *COUNT* (number of times the button has to be clicked) is
|
|
|
|
|
optional and specifies the click count required to trigger the
|
|
|
|
|
binding. The default if *COUNT* is omitted is _1_.
|
|
|
|
|
|
input: don't map wheel events to BTN_{BACK,FORWARD}
BTN_BACK and BTN_FORWARD are separate buttons. The scroll wheel don't
have any button mappings in libinput/wayland, so make up our own
defines.
This allows us to map them in mouse bindings.
Also expose BTN_WHEEL_{LEFT,RIGHT}. These were already defined, and
used, internally, to handle wheel tilt events. With this, they can
also be used in mouse bindings.
Finally, fix encoding used for BTN_{BACK,FORWARD} when sending mouse
button events to the client application. Before this, they were mapped
to buttons 4/5. But, button 4/5 are for the scroll wheel, and as
mentioned above, BTN_{BACK,FORWARD} are not the same as scroll wheel
"buttons".
Closes #1763
2024-07-13 10:24:11 +02:00
|
|
|
To map wheel events (i.e. scrolling), use the button names
|
|
|
|
|
*BTN_WHEEL_BACK* (up) and *BTN_WHEEL_FORWARD* (down). Note that these
|
|
|
|
|
events never generate a *COUNT* larger than 1. That is,
|
|
|
|
|
*BTN_WHEEL_BACK+2*, for example, will never trigger.
|
|
|
|
|
|
|
|
|
|
Foot also recognizes tiltable wheels; to map these, use
|
|
|
|
|
*BTN_WHEEL_LEFT* and *BTN_WHEEL_RIGHT*.
|
2020-08-10 19:44:01 +02:00
|
|
|
|
2025-01-27 12:31:50 +01:00
|
|
|
A modifier+button combination can only be mapped to *one* action. Let's
|
2020-08-11 10:30:27 +02:00
|
|
|
say you want to bind *BTN\_MIDDLE* to *fullscreen*. Since
|
|
|
|
|
*BTN\_MIDDLE* is the default binding for *primary-paste*, you first
|
|
|
|
|
need to unmap the default binding. This can be done by setting
|
|
|
|
|
_action=none_; e.g. *primary-paste=none*.
|
2020-03-12 10:46:27 +01:00
|
|
|
|
2021-12-04 16:22:33 +00:00
|
|
|
*selection-override-modifiers*
|
|
|
|
|
The modifiers set in this set (which may be set to any combination
|
|
|
|
|
of modifiers, e.g. _mod1+mod2+mod3_, as well as _none_) are used
|
|
|
|
|
to enable selecting text with the mouse irrespective of whether a
|
|
|
|
|
client application currently has the mouse grabbed.
|
|
|
|
|
These modifiers cannot be used as modifiers in mouse bindings.
|
|
|
|
|
Because the order of bindings is significant, it is best to set
|
|
|
|
|
this prior to any other mouse bindings that might use modifiers in
|
|
|
|
|
the default set.
|
|
|
|
|
Default: _Shift_
|
|
|
|
|
|
|
|
|
|
The actions to which mouse combos can be bound are listed below. All
|
|
|
|
|
actions listed under *key-bindings* can be used here as well.
|
2020-03-12 17:24:54 +01:00
|
|
|
|
2023-09-18 16:36:39 +02:00
|
|
|
*scrollback-up-mouse*
|
|
|
|
|
Normal screen: scrolls up the contents.
|
|
|
|
|
|
|
|
|
|
Alt screen: send fake _KeyUP_ events to the client application, if
|
|
|
|
|
alternate scroll mode is enabled.
|
|
|
|
|
|
input: don't map wheel events to BTN_{BACK,FORWARD}
BTN_BACK and BTN_FORWARD are separate buttons. The scroll wheel don't
have any button mappings in libinput/wayland, so make up our own
defines.
This allows us to map them in mouse bindings.
Also expose BTN_WHEEL_{LEFT,RIGHT}. These were already defined, and
used, internally, to handle wheel tilt events. With this, they can
also be used in mouse bindings.
Finally, fix encoding used for BTN_{BACK,FORWARD} when sending mouse
button events to the client application. Before this, they were mapped
to buttons 4/5. But, button 4/5 are for the scroll wheel, and as
mentioned above, BTN_{BACK,FORWARD} are not the same as scroll wheel
"buttons".
Closes #1763
2024-07-13 10:24:11 +02:00
|
|
|
Default: _BTN\_WHEEL\_BACK_
|
2023-09-18 16:36:39 +02:00
|
|
|
|
|
|
|
|
*scrollback-down-mouse*
|
|
|
|
|
Normal screen: scrolls down the contents.
|
|
|
|
|
|
|
|
|
|
Alt screen: send fake _KeyDOWN_ events to the client application, if
|
|
|
|
|
alternate scroll mode is enabled.
|
|
|
|
|
|
input: don't map wheel events to BTN_{BACK,FORWARD}
BTN_BACK and BTN_FORWARD are separate buttons. The scroll wheel don't
have any button mappings in libinput/wayland, so make up our own
defines.
This allows us to map them in mouse bindings.
Also expose BTN_WHEEL_{LEFT,RIGHT}. These were already defined, and
used, internally, to handle wheel tilt events. With this, they can
also be used in mouse bindings.
Finally, fix encoding used for BTN_{BACK,FORWARD} when sending mouse
button events to the client application. Before this, they were mapped
to buttons 4/5. But, button 4/5 are for the scroll wheel, and as
mentioned above, BTN_{BACK,FORWARD} are not the same as scroll wheel
"buttons".
Closes #1763
2024-07-13 10:24:11 +02:00
|
|
|
Default: _BTN\_WHEEL\_FORWARD_
|
2023-09-18 16:36:39 +02:00
|
|
|
|
2020-08-11 10:03:14 +02:00
|
|
|
*select-begin*
|
|
|
|
|
Begin an interactive selection. The selection is finalized, and
|
|
|
|
|
copied to the _primary selection_, when the button is
|
2020-08-11 10:17:19 +02:00
|
|
|
released. Default: _BTN\_LEFT_.
|
|
|
|
|
|
|
|
|
|
*select-begin-block*
|
|
|
|
|
Begin an interactive block selection. The selection is finalized,
|
|
|
|
|
and copied to the _primary selection_, when the button is
|
|
|
|
|
released. Default: _Control+BTN\_LEFT_.
|
2020-08-11 10:03:14 +02:00
|
|
|
|
|
|
|
|
*select-word*
|
2021-01-06 11:11:46 +01:00
|
|
|
Begin an interactive word-wise selection, where words are
|
|
|
|
|
separated by whitespace and all characters defined by the
|
|
|
|
|
*word-delimiters* option. The selection is finalized, and copied
|
|
|
|
|
to the _primary selection_, when the button is released. Default:
|
|
|
|
|
_BTN\_LEFT-2_.
|
2020-08-11 10:03:14 +02:00
|
|
|
|
|
|
|
|
*select-word-whitespace*
|
2021-01-06 11:11:46 +01:00
|
|
|
Same as *select-word*, but the characters in the *word-delimiters*
|
|
|
|
|
option are ignored. I.e only whitespace characters act as
|
|
|
|
|
delimiters. The selection is finalized, and copied to the _primary
|
|
|
|
|
selection_, when the button is released. Default:
|
2022-04-04 01:28:03 +02:00
|
|
|
_Control+BTN\_LEFT-2_.
|
2020-08-11 10:03:14 +02:00
|
|
|
|
selection: add support for selecting the contents of a quote
This patch changes the default of triple clicking, from selecting the
current logical row, to first trying to select the contents of the
quote under the cursor, and if failing to find a quote, selecting the
current row (like before).
This is implemented by adding a new key binding, 'select-quote'.
It will search for surrounding quote characters, and if one is found
on each side of the cursor, the quote is selected. If not, the entire
row is selected instead.
Subsequent selection operations will behave as if the selection is
either a word selection (a quote was found), or a row selection (no
quote found).
Escaped quote characters are not supported: "foo \" bar" will match
'foo \', and not 'foo " bar'.
Mismatched quotes are not custom handled. They will simply not match.
Nested quotes ("123 'abc def' 456") are supported.
Closes #1364
2023-09-19 16:23:34 +02:00
|
|
|
*select-quote*
|
|
|
|
|
Begin an interactive "quote" selection. This is similar to
|
|
|
|
|
*select-word*, except an entire quote is selected (that is,
|
|
|
|
|
everything inside the quote, excluding the quote
|
|
|
|
|
characters). Recognized quote characters are: *"* and *'*.
|
|
|
|
|
|
|
|
|
|
If a complete quote cannot be found on the current logical row
|
|
|
|
|
(only one quote character, or none are found), the entire row is
|
|
|
|
|
selected.
|
|
|
|
|
|
|
|
|
|
The selection is finalized, and copied to the _primary selection_,
|
|
|
|
|
when the button is released.
|
|
|
|
|
|
|
|
|
|
After the initial selection has been made, it behaves like a
|
|
|
|
|
normal word, or row selection, depending on whether a quote was
|
|
|
|
|
found or not. This affects what happens when, for example,
|
|
|
|
|
extending the selection.
|
|
|
|
|
|
|
|
|
|
Notes:
|
|
|
|
|
- Escaped quote characters are not supported (*"foo \\"bar"* will
|
|
|
|
|
match *'foo \\'*, not *'foo "bar'*).
|
|
|
|
|
- Foot does not try to handle mismatched quote characters; they
|
|
|
|
|
will simply not match.
|
|
|
|
|
- Nested quotes (using different quote characters) are supported.
|
|
|
|
|
|
|
|
|
|
Default: _BTN\_LEFT-3_.
|
|
|
|
|
|
2020-08-11 10:17:19 +02:00
|
|
|
*select-row*
|
2021-01-06 11:11:46 +01:00
|
|
|
Begin an interactive row-wise selection. The selection is
|
|
|
|
|
finalized, and copied to the _primary selection_, when the button
|
selection: add support for selecting the contents of a quote
This patch changes the default of triple clicking, from selecting the
current logical row, to first trying to select the contents of the
quote under the cursor, and if failing to find a quote, selecting the
current row (like before).
This is implemented by adding a new key binding, 'select-quote'.
It will search for surrounding quote characters, and if one is found
on each side of the cursor, the quote is selected. If not, the entire
row is selected instead.
Subsequent selection operations will behave as if the selection is
either a word selection (a quote was found), or a row selection (no
quote found).
Escaped quote characters are not supported: "foo \" bar" will match
'foo \', and not 'foo " bar'.
Mismatched quotes are not custom handled. They will simply not match.
Nested quotes ("123 'abc def' 456") are supported.
Closes #1364
2023-09-19 16:23:34 +02:00
|
|
|
is released. Default: _BTN\_LEFT-4_.
|
2021-01-06 11:11:46 +01:00
|
|
|
|
|
|
|
|
*select-extend*
|
|
|
|
|
Interactively extend an existing selection, using the original
|
|
|
|
|
selection mode (normal, block, word-wise or row-wise). The
|
|
|
|
|
selection is finalized, and copied to the _primary selection_,
|
|
|
|
|
when the button is released. Default: _BTN\_RIGHT_.
|
|
|
|
|
|
|
|
|
|
*select-extend-character-wise*
|
|
|
|
|
Same as *select-extend*, but forces the selection mode to _normal_
|
|
|
|
|
(i.e. character wise). Note that this causes subsequent
|
|
|
|
|
*select-extend* operations to be character wise. This action is
|
|
|
|
|
ignored for block selections. Default: _Control+BTN\_RIGHT_.
|
|
|
|
|
|
2020-03-12 10:20:05 +01:00
|
|
|
*primary-paste*
|
2020-03-12 17:42:27 +01:00
|
|
|
Pastes from the _primary selection_. Default: _BTN\_MIDDLE_.
|
2020-03-12 10:20:05 +01:00
|
|
|
|
2024-02-15 16:41:16 +01:00
|
|
|
*font-increase*
|
input: don't map wheel events to BTN_{BACK,FORWARD}
BTN_BACK and BTN_FORWARD are separate buttons. The scroll wheel don't
have any button mappings in libinput/wayland, so make up our own
defines.
This allows us to map them in mouse bindings.
Also expose BTN_WHEEL_{LEFT,RIGHT}. These were already defined, and
used, internally, to handle wheel tilt events. With this, they can
also be used in mouse bindings.
Finally, fix encoding used for BTN_{BACK,FORWARD} when sending mouse
button events to the client application. Before this, they were mapped
to buttons 4/5. But, button 4/5 are for the scroll wheel, and as
mentioned above, BTN_{BACK,FORWARD} are not the same as scroll wheel
"buttons".
Closes #1763
2024-07-13 10:24:11 +02:00
|
|
|
Increases the font size by 0.5pt. Default:
|
|
|
|
|
_Control+BTN\_WHEEL\_BACK_ (also defined in *key-bindings*).
|
2024-02-15 16:41:16 +01:00
|
|
|
|
|
|
|
|
*font-decrease*
|
input: don't map wheel events to BTN_{BACK,FORWARD}
BTN_BACK and BTN_FORWARD are separate buttons. The scroll wheel don't
have any button mappings in libinput/wayland, so make up our own
defines.
This allows us to map them in mouse bindings.
Also expose BTN_WHEEL_{LEFT,RIGHT}. These were already defined, and
used, internally, to handle wheel tilt events. With this, they can
also be used in mouse bindings.
Finally, fix encoding used for BTN_{BACK,FORWARD} when sending mouse
button events to the client application. Before this, they were mapped
to buttons 4/5. But, button 4/5 are for the scroll wheel, and as
mentioned above, BTN_{BACK,FORWARD} are not the same as scroll wheel
"buttons".
Closes #1763
2024-07-13 10:24:11 +02:00
|
|
|
Decreases the font size by 0.5pt. Default:
|
|
|
|
|
_Control+BTN\_WHEEL\_FORWARD_ (also defined in *key-bindings*).
|
2024-02-15 16:41:16 +01:00
|
|
|
|
|
|
|
|
|
2020-10-07 18:38:54 +02:00
|
|
|
# TWEAK
|
2020-03-30 17:31:31 +02:00
|
|
|
|
2020-04-25 22:40:19 +02:00
|
|
|
This section is for advanced users and describes configuration options
|
2020-03-30 17:31:31 +02:00
|
|
|
that can be used to tweak foot's low-level behavior.
|
|
|
|
|
|
|
|
|
|
These options are *not* included in the example configuration. You
|
2021-11-06 13:44:50 +01:00
|
|
|
should not change these unless you understand what they do.
|
2020-03-30 17:31:31 +02:00
|
|
|
|
2020-09-13 17:59:56 +02:00
|
|
|
Note that these options may change, or be removed at any time, without
|
|
|
|
|
prior notice.
|
|
|
|
|
|
2020-03-30 17:31:31 +02:00
|
|
|
When reporting bugs, please mention if, and to what, you have changed
|
|
|
|
|
any of these options.
|
|
|
|
|
|
2020-09-13 17:59:56 +02:00
|
|
|
*scaling-filter*
|
|
|
|
|
Overrides the default scaling filter used when down-scaling bitmap
|
|
|
|
|
fonts (e.g. emoji fonts). Possible values are *none*, *nearest*,
|
|
|
|
|
*bilinear*, *cubic* or *lanczos3*. *cubic* and *lanczos3* produce
|
|
|
|
|
the best results, but are slower (with *lanczos3* being the best
|
|
|
|
|
_and_ slowest).
|
|
|
|
|
|
|
|
|
|
Default: _lanczos3_.
|
|
|
|
|
|
2021-06-15 11:45:27 +02:00
|
|
|
*overflowing-glyphs*
|
|
|
|
|
Boolean. When enabled, glyphs wider than their cell(s) are allowed
|
|
|
|
|
to render into one additional neighbouring cell.
|
2020-09-03 17:37:44 +02:00
|
|
|
|
2021-06-15 11:45:27 +02:00
|
|
|
One use case for this are fonts with wide italic characters that
|
|
|
|
|
"bend" into the next cell. Without this option, such glyphs will
|
|
|
|
|
appear "cut off".
|
2020-09-05 09:38:48 +02:00
|
|
|
|
2021-06-15 11:45:27 +02:00
|
|
|
Another use case are fonts with "icon" characters in the Unicode
|
|
|
|
|
private usage area, e.g. Nerd Fonts, or Powerline Fonts and legacy
|
|
|
|
|
emoji characters like *WHITE FROWNING FACE*.
|
2020-09-03 17:37:44 +02:00
|
|
|
|
2021-06-15 11:45:27 +02:00
|
|
|
Note: might impact performance depending on the font used.
|
|
|
|
|
Especially small font sizes can cause many overflowing glyphs
|
|
|
|
|
because of subpixel rendering.
|
2021-05-31 17:10:05 +02:00
|
|
|
|
2020-11-13 17:49:23 +01:00
|
|
|
Default: _yes_.
|
2020-09-03 17:37:44 +02:00
|
|
|
|
2020-08-13 18:35:17 +02:00
|
|
|
*render-timer*
|
|
|
|
|
Enables a frame rendering timer, that prints the time it takes to
|
|
|
|
|
render each frame, in microseconds, either on-screen, to stderr,
|
|
|
|
|
or both. Valid values are *none*, *osd*, *log* and
|
|
|
|
|
*both*. Default: _none_.
|
|
|
|
|
|
2021-01-12 17:36:20 +01:00
|
|
|
*box-drawing-base-thickness*
|
|
|
|
|
Line thickness to use for *LIGHT* box drawing line characters, in
|
|
|
|
|
points. This value is converted to pixels using the monitor's DPI,
|
|
|
|
|
and then multiplied with the cell size. The end result is that a
|
|
|
|
|
larger font (and thus larger cells) result in thicker
|
|
|
|
|
lines. Default: _0.04_.
|
|
|
|
|
|
2021-05-05 22:24:25 +02:00
|
|
|
*box-drawing-solid-shades*
|
|
|
|
|
Boolean. When enabled, box drawing "shades" (e.g. LIGHT SHADE,
|
|
|
|
|
MEDIUM SHADE and DARK SHADE) are rendered as solid blocks using a
|
|
|
|
|
darker variant of the current foreground color.
|
|
|
|
|
|
|
|
|
|
When disabled, they are instead rendered as checker box pattern,
|
|
|
|
|
using the current foreground color as is.
|
|
|
|
|
|
|
|
|
|
Default: _yes_.
|
|
|
|
|
|
2020-03-30 17:31:31 +02:00
|
|
|
*delayed-render-lower*, *delayed-render-upper*
|
|
|
|
|
These two values control the timeouts (in nanoseconds) that are
|
|
|
|
|
used to mitigate screen flicker caused by clients writing large,
|
|
|
|
|
non-atomic screen updates.
|
2020-03-30 20:21:23 +02:00
|
|
|
|
2020-04-25 22:40:29 +02:00
|
|
|
If a client splits up a screen update over multiple *write*(3)
|
|
|
|
|
calls, we may end up rendering an intermediate frame, quickly
|
2020-03-30 17:31:31 +02:00
|
|
|
followed by another frame with the final screen content. For
|
|
|
|
|
example, the client may erase part of the screen (or scroll) in
|
|
|
|
|
one write, and then write new content in one or more subsequent
|
|
|
|
|
writes. Rendering the frame when the screen has been erased, but
|
|
|
|
|
not yet filled with new content will be perceived as screen
|
|
|
|
|
flicker.
|
|
|
|
|
|
|
|
|
|
The *real* solution to this is _Application Synchronized Updates_
|
|
|
|
|
(https://gitlab.freedesktop.org/terminal-wg/specifications/-/merge_requests/2).
|
|
|
|
|
|
|
|
|
|
The problem with this is twofold - first, it has not yet been
|
|
|
|
|
standardized, and thus there are not many terminal emulators that
|
|
|
|
|
implement it (foot *does* implement it), and second, applications
|
|
|
|
|
must be patched to use it.
|
|
|
|
|
|
|
|
|
|
Until this has happened, foot offers an interim workaround; an
|
|
|
|
|
attempt to mitigate the screen flicker *without* affecting neither
|
|
|
|
|
performance nor latency.
|
|
|
|
|
|
|
|
|
|
It is based on the fact that the screen is updated at a fixed
|
|
|
|
|
interval (typically 60Hz). For us, this means it does not matter
|
|
|
|
|
if we render a new frame at the *beginning* of a frame interval,
|
|
|
|
|
or at the *end*. Thus, the goal is to introduce a delay between
|
|
|
|
|
receiving client data and rendering the resulting state, but
|
|
|
|
|
without causing a frame skip.
|
|
|
|
|
|
|
|
|
|
While it should be possible to estimate the amount of time left
|
|
|
|
|
until the next frame, foot's algorithm is currently not that
|
|
|
|
|
advanced, but is based on statistics I guess you could say - the
|
2020-03-30 20:21:23 +02:00
|
|
|
delay we introduce is so small that the risk of pushing the frame
|
|
|
|
|
over to the next frame interval is also very small.
|
2020-03-30 17:31:31 +02:00
|
|
|
|
2020-08-15 23:29:38 +02:00
|
|
|
Now, that was a lot of text. But what is it foot actually does?
|
2020-03-30 17:31:31 +02:00
|
|
|
|
|
|
|
|
When receiving client data, it schedules a timer, the
|
2020-07-25 09:41:50 +02:00
|
|
|
*delayed-render-lower*. If we do not receive any more client data
|
2020-03-30 17:31:31 +02:00
|
|
|
before the timer has run out, we render the frame. If however, we
|
|
|
|
|
do receive more data, the timer is re-scheduled. That is, each
|
|
|
|
|
time we receive client data, frame rendering is delayed another
|
|
|
|
|
*delayed-render-lower* nanoseconds.
|
|
|
|
|
|
|
|
|
|
Now, while this works very well with most clients, it would be
|
|
|
|
|
possible to construct a malicious client that keeps writing data
|
|
|
|
|
at a slow pace. To the user, this would look like foot has frozen
|
|
|
|
|
as we never get to render a new frame. To prevent this, an upper
|
|
|
|
|
limit is set - *delayed-render-upper*. If this timer runs out, we
|
|
|
|
|
render the frame regardless of what the client is doing.
|
|
|
|
|
|
|
|
|
|
If changing these values, note that the lower timeout *must* be
|
|
|
|
|
set lower than the upper timeout, but that this is not verified by
|
|
|
|
|
foot. Furthermore, both values must be less than 16ms (that is,
|
|
|
|
|
16000000 nanoseconds).
|
|
|
|
|
|
2020-08-15 23:29:38 +02:00
|
|
|
You can disable the feature altogether by setting either value to
|
2020-03-30 17:31:31 +02:00
|
|
|
0. In this case, frames are rendered "as soon as possible".
|
|
|
|
|
|
|
|
|
|
Default: lower=_500000_ (0.5ms), upper=_8333333_ (8.3ms - half a
|
|
|
|
|
frame interval).
|
|
|
|
|
|
2020-09-06 17:52:07 +02:00
|
|
|
*damage-whole-window*
|
|
|
|
|
Boolean. When enabled, foot will 'damage' the entire window each
|
|
|
|
|
time a frame has been rendered. This forces the compositor to
|
|
|
|
|
redraw the entire window. If disabled, foot will only 'damage'
|
|
|
|
|
updated rows.
|
|
|
|
|
|
|
|
|
|
There is normally *no* reason to enable this. However, it has been
|
|
|
|
|
seen to workaround an issue with _fractional scaling_ in _Gnome_.
|
|
|
|
|
|
|
|
|
|
Note that enabling this option is likely to increase CPU and/or
|
|
|
|
|
GPU usage (by the compositor, not by foot), and may have a
|
|
|
|
|
negative impact on battery life.
|
|
|
|
|
|
2020-11-13 17:49:23 +01:00
|
|
|
Default: _no_.
|
2020-09-06 17:52:07 +02:00
|
|
|
|
2020-08-20 19:25:35 +02:00
|
|
|
*grapheme-shaping*
|
|
|
|
|
Boolean. When enabled, foot will use _utf8proc_ to do grapheme
|
|
|
|
|
cluster segmentation while parsing "printed" text. Then, when
|
|
|
|
|
rendering, it will use _fcft_ (if compiled with _HarfBuzz_
|
|
|
|
|
support) to shape the grapheme clusters.
|
|
|
|
|
|
|
|
|
|
This is required to render e.g. flag (emoji) sequences, keycap
|
|
|
|
|
sequences, modifier sequences, zero-width-joiner (ZWJ) sequences
|
2021-10-13 17:42:40 +02:00
|
|
|
and emoji tag sequences. It might also improve rendering of
|
2021-06-24 10:10:38 +02:00
|
|
|
composed characters, depending on font.
|
2020-08-20 19:25:35 +02:00
|
|
|
|
2021-07-30 14:56:55 +02:00
|
|
|
- foot must have been compiled with utf8proc support
|
|
|
|
|
- fcft must have been compiled with HarfBuzz support
|
2020-08-20 19:25:35 +02:00
|
|
|
|
2023-09-20 13:45:06 +02:00
|
|
|
This option can also be set runtime with DECSET/DECRST 2027.
|
|
|
|
|
|
2021-06-30 18:00:33 +02:00
|
|
|
See also: *grapheme-width-method*.
|
|
|
|
|
|
2021-10-13 17:42:40 +02:00
|
|
|
Default: _yes_
|
2020-08-20 19:25:35 +02:00
|
|
|
|
2021-06-30 18:00:33 +02:00
|
|
|
*grapheme-width-method*
|
|
|
|
|
Selects which method to use when calculating the width
|
2021-07-01 08:00:23 +02:00
|
|
|
(i.e. number of columns) of a grapheme cluster. One of
|
2021-11-22 23:02:25 +01:00
|
|
|
*wcswidth*, *double-width* and *max*.
|
2021-06-30 18:00:33 +02:00
|
|
|
|
|
|
|
|
*wcswidth* simply adds together the individual width of all
|
|
|
|
|
codepoints making up the cluster.
|
|
|
|
|
|
2021-07-01 08:00:23 +02:00
|
|
|
*double-width* does the same, but limits the maximum number of
|
2021-10-13 17:42:40 +02:00
|
|
|
columns to 2. This is more correct, but may break some
|
2021-06-30 18:00:33 +02:00
|
|
|
applications since applications typically use *wcswidth*(3)
|
|
|
|
|
internally to calculate the width. This results in cursor
|
|
|
|
|
de-synchronization issues.
|
|
|
|
|
|
2021-11-22 23:02:25 +01:00
|
|
|
*max* uses the width of the largest codepoint in the cluster.
|
|
|
|
|
|
2022-12-16 16:56:43 +01:00
|
|
|
Default: _double-width_
|
2021-06-30 18:00:33 +02:00
|
|
|
|
2021-08-31 19:42:22 +02:00
|
|
|
*font-monospace-warn*
|
|
|
|
|
Boolean. When enabled, foot will use heuristics to try to verify
|
|
|
|
|
the primary font is a monospace font, and warn if it is not.
|
|
|
|
|
|
|
|
|
|
Disable this if you still want to use the font, even if foot
|
|
|
|
|
thinks it is not monospaced.
|
|
|
|
|
|
|
|
|
|
You may also want to disable it to get slightly faster startup times.
|
|
|
|
|
|
|
|
|
|
Default: _yes_
|
|
|
|
|
|
2020-03-30 17:31:31 +02:00
|
|
|
*max-shm-pool-size-mb*
|
2021-05-05 09:12:43 +02:00
|
|
|
This option controls the amount of virtual address space used by
|
|
|
|
|
the pixmap memory to which the terminal screen content is
|
|
|
|
|
rendered.
|
2020-03-30 17:31:31 +02:00
|
|
|
|
2021-05-05 09:12:43 +02:00
|
|
|
It does not change how much physical memory foot uses.
|
2020-03-30 17:31:31 +02:00
|
|
|
|
|
|
|
|
Foot uses a memory mapping trick to implement fast rendering of
|
2020-03-30 20:21:23 +02:00
|
|
|
interactive scrolling (typically, but applies to "slow" scrolling
|
|
|
|
|
in general). Example: holding down the 'up' or 'down' arrow key to
|
2020-03-30 17:31:31 +02:00
|
|
|
scroll in a text editor.
|
|
|
|
|
|
|
|
|
|
For this to work, it needs a large amount of virtual address
|
2021-05-05 09:12:43 +02:00
|
|
|
space. Again, note that this is not physical memory.
|
2020-03-30 17:31:31 +02:00
|
|
|
|
|
|
|
|
On a normal x64 based computer, each process has 128TB of virtual
|
|
|
|
|
address space, and newer ones have 64PB. This is an insane amount
|
|
|
|
|
and most applications do not use anywhere near that amount.
|
|
|
|
|
|
|
|
|
|
Each foot terminal window can allocate up to 2GB of virtual
|
|
|
|
|
address space. With 128TB of address space, that means a maximum
|
|
|
|
|
of 65536 windows in server/daemon mode (for 2GB). That should be
|
|
|
|
|
enough, yes?
|
2020-03-30 20:21:23 +02:00
|
|
|
|
2021-05-05 09:12:43 +02:00
|
|
|
However, the Wayland compositor also needs to allocate the same
|
2020-03-30 17:31:31 +02:00
|
|
|
amount of virtual address space. Thus, it has a slightly higher
|
|
|
|
|
chance of running out of address space since it needs to host
|
2021-05-05 09:12:43 +02:00
|
|
|
all running Wayland clients in the same way, at the same time.
|
2020-03-30 17:31:31 +02:00
|
|
|
|
|
|
|
|
In the off chance that this becomes a problem for you, you can
|
|
|
|
|
reduce the amount used with this option.
|
|
|
|
|
|
|
|
|
|
Or, for optimal performance, you can increase it to the maximum
|
|
|
|
|
allowed value, 2GB (but note that you most likely will not notice
|
|
|
|
|
any difference compared to the default value).
|
|
|
|
|
|
2020-09-06 09:34:58 +02:00
|
|
|
Setting it to 0 disables the feature.
|
|
|
|
|
|
2021-05-05 09:12:43 +02:00
|
|
|
Limitations:
|
|
|
|
|
- only supported on 64-bit architectures
|
|
|
|
|
- only supported on Linux
|
2020-03-30 20:21:23 +02:00
|
|
|
|
2020-03-30 17:31:31 +02:00
|
|
|
Default: _512_. Maximum allowed: _2048_ (2GB).
|
2020-07-27 20:06:54 +02:00
|
|
|
|
2022-02-27 16:29:35 +01:00
|
|
|
*sixel*
|
2023-07-26 16:12:36 +02:00
|
|
|
Boolean. When enabled, foot will process sixel images. Default:
|
|
|
|
|
_yes_
|
|
|
|
|
|
|
|
|
|
*bold-text-in-bright-amount*
|
|
|
|
|
Amount by which bold fonts are brightened when
|
|
|
|
|
*bold-text-in-bright* is set to *yes* (the *palette-based* variant
|
|
|
|
|
is not affected by this option). Default: _1.3_.
|
2022-02-27 16:29:35 +01:00
|
|
|
|
2020-07-27 20:06:54 +02:00
|
|
|
# SEE ALSO
|
|
|
|
|
|
|
|
|
|
*foot*(1), *footclient*(1)
|