foot.ini(5) | File Formats Manual | foot.ini(5) |
NAME
foot.ini - configuration file for foot(1)
DESCRIPTION
foot uses the standard unix configuration format, with section based 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.
foot will search for a configuration file in the following locations, in this order:
- XDG_CONFIG_HOME/foot/foot.ini (defaulting to $HOME/.config/foot/foot.ini if unset)
- XDG_CONFIG_DIRS/foot/foot.ini (defaulting to /etc/xdg/foot/foot.ini if unset)
An example configuration file containing all options with their default value commented out will usually be installed to /etc/xdg/foot/foot.ini.
Options are set using KEY=VALUE pairs:
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="")
SECTION: main
shell
login-shell
term
font, font-bold, font-italic, font-bold-italic
Examples:
- Dina:weight=bold:slant=italic
- Courier New:size=12
- Fantasque Sans Mono:fontfeatures=ss01
- Meslo LG S:size=12, Noto Color Emoji:size=12
- Courier New:pixelsize=8
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.
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.
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.
To disable bold and/or italic fonts, set e.g. font-bold to exactly the same value as font.
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.
Default: monospace:size=8 (font), not set (font-bold, font-italic, font-bold-italic).
font-size-adjustment
Examples:
font-size-adjustment=0.5 # Adjust by 0.5 points font-size-adjustment=10px # Adjust by 10 pixels font-size-adjustment=7.5% # Adjust by 7.5 percent
Default: 0.5
include
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.
- 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.
Default: not set.
line-height
You can specify a height in pixels by using the px suffix: e.g. line-height=12px.
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".
See also: vertical-letter-offset.
Default: not set.
letter-spacing
You can specify a letter spacing in pixels by using the px suffix: e.g. letter-spacing=2px.
See also: horizontal-letter-offset.
Default: 0.
horizontal-letter-offset, vertical-letter-offset
To specify an offset in pixels, append px: e.g. horizontal-letter-offset=2px.
Default: 0.
underline-offset
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.
underline-thickness
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
strikeout-thickness
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
box-drawings-uses-font-glyphs
- No antialiasing effects where e.g. line endpoints appear dimmed down, or blurred.
- 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 in out-of-place looking glyphs (for example, badly sized).
When enabled, box/line drawing characters are rendered using font glyphs. This may result in a more uniform look, in some use cases.
When disabled, foot will render the following Unicode codepoints by itself:
- U+02500 - U+0259F
- U+02800 - U+028FF
- U+1Fb00 - U+1FB9B
Default: no.
dpi-aware
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.
In this mode, the monitor's scaling factor is ignored; doubling the scaling factor will not double the font size.
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.
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.
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.
Default: no
pad
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).
Default: 0x0.
resize-delay-ms
In other words, while you are fiddling with the window size, foot 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.
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.
resize-by-cells
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
resize-keep-grid
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
initial-window-size-pixels
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.
Default: 700x500.
initial-window-size-chars
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.
And, just like initial-window-size-pixels, this option may not work as expected if fractional scaling is being used (see initial-window-size-pixels for details).
Default: not set.
initial-window-mode
title
locked-title
app-id
bold-text-in-bright
If set to palette-based, rather than a simple yes|true, colors matching one of the 8 regular palette colors will be brightened using the corresponding bright palette color. Other colors will not be brightened.
Default: no.
word-delimiters
selection-target
workers
utmp-helper
When starting foot, an utmp record is created by launching the helper binary with the following arguments:
add $WAYLAND_DISPLAY
When foot is closed, the utmp record is removed by launching the helper binary with the following arguments:
del $WAYLAND_DISPLAY
Set to none to disable utmp records. Default: /usr/lib/utempter/utempter.
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.
SECTION: bell
urgent
If the compositor does not implement this protocol, the margins will be painted in red instead.
Applications can enable/disable this feature programmatically with the CSI ? 1042 h and CSI ? 1042 l escape sequences.
Default: no
notify
Default: no
visual
command
command-focused
SECTION: desktop-notifications
command
Template arguments
${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 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.
${urgency} is replaced with the notifications urgency; 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.
${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).
${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).
${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.
Applications can also define their own custom notification actions. See the command-action-argument option for details.
Ways to trigger notifications
- 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)
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.
There are two parts to handle this. First, the notification must define an action. For this purpose, foot will add a "default" action to the notification (see the command-action-argument option).
Second, foot needs to know when the notification is activated, 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:
xdgtoken=18179adf579a7a904ce73754964b1ec3
The expected format of stdout may change at any time. Please read the changelog when upgrading foot.
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.
Stdout
- id: integer in base 10, daemon assigned notification ID
- id=id: same as plain nnn.
- default: the 'default' action was triggered
- action=default: same as default
- action=n: application custom action n triggered
- n: integer in base 10, appearing after the ID; application custom action n triggered
- xdgtoken=xyz: XDG activation token.
Example #1:
action=default
xdgtoken=95ebdfe56e4f47ddb5bba9d7dc3a2c35
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:
1
Foot recognizes this as:
- notification has the daemon assigned ID 17
- the user triggered the first custom action, "1"
Example #3:
1
Foot recognizes this as:
- notification has the daemon assigned ID 17
- the user triggered the first custom action, "1
Default: notify-send
--wait
--app-name ${app-id}
--icon ${app-id}
--category ${category}
--urgency ${urgency}
--expire-time ${expire-time}
--hint STRING:image-path:${icon}
--hint BOOLEAN:suppress-sound:${muted}
--hint STRING:sound-name:${sound-name}
--replace-id ${replace-id}
${action-argument}
--print-id
-- ${title} ${body}.
command-action-argument
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).
Furthermore, the OSC-99 notifications protocol allows applications to define their own actions. Foot uses a combination of the command option, and the command-action-argument option to pass the names of the actions to the notification helper.
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.
- ${action-label}: Activate for the default action, and a free-form string for application defined actions.
For each notification action (remember, there will always be at least one), command-action-argument will be expanded with the action's name and label.
Then, ${action-argument} is expanded command to the full list of actions.
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.
Example:
command-action-argument=--action
${action-name}=${action-label}
command=notify-send ${action-argument} ...
Assume the application defined two custom actions: OK and Cancel.
Given the above, foot will execute:
--action default='Click to activate'
--action 1=OK
--action 2=Cancel
...
Default: --action ${action-name}=${action-label}
close
${id} is expanded to the ID of the notification that should be closed. For example:
Closing a notification is only supported by the Kitty Desktop Notification protocol, OSC-99.
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.
Default: not set
inhibit-when-focused
Default: yes
SECTION: scrollback
lines
multiplier
indicator-position
indicator-format
SECTION: url
launch
osc8-underline
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
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.
protocols
uri-characters
Default: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
SECTION: cursor
This section controls the cursor style and color. Note that applications can change these at runtime.
style
unfocused-style
- 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.
blink
blink-rate
color
Example: ff0000 00ff00 (green cursor, red text)
Default: the regular foreground and background colors, reversed.
beam-thickness
underline-thickness
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.
SECTION: mouse
hide-when-typing
alternate-scroll-mode
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 escape sequences CSI ? 1007 h (enable) and CSI ? 1007 l (disable).
Default: yes.
SECTION: touch
long-press-delay
Default: 400.
SECTION: colors
This section controls the 16 ANSI colors, the default foreground and background colors, and the extended 256 color palette. Note that applications can change these at runtime.
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.
foreground
background
regular0, regular1 .. regular7
bright0, bright1 .. bright7
dim0, dim1 .. dim7
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, the corresponding regularN color will be used.
If the current color does not match any known color, it is dimmed 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.
Note that applications can change the regularN and brightN 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.
0 .. 255
sixel0 .. sixel15
alpha
selection-foreground, selection-background
jump-labels
scrollback-indicator
search-box-no-match
search-box-match
urls
flash
flash-alpha
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.
Note that unlike the colors defined in the colors section, the color 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
preferred
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 server, or render SSDs despite client or none being set.
Default: server.
size
color
font
hide-when-maximized
double-click-to-maximize
border-width
border-color
button-width
button-color
button-minimize-color
button-maximize-color
button-close-color
SECTION: key-bindings
This section lets you override the default key bindings.
The general format is action=combo1...comboN. That is, each action may have one or more key combinations, space separated. Each combination is in the form mod1+mod2+key. The names of the modifiers and the key must be valid XKB key names.
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.
Note that Alt is usually called Mod1.
xkbcli interactive-wayland can be useful for finding keysym names.
A key combination can only be mapped to one action. Lets say you want to bind Control+Shift+R to fullscreen. Since this is the default shortcut for search-start, you first need to unmap the default binding. This can be done by setting action=none; e.g. search-start=none.
noop
scrollback-up-page
scrollback-up-half-page
scrollback-up-line
scrollback-down-page
scrollback-down-half-page
scrollback-down-line
scrollback-home
scrollback-end
clipboard-copy
clipboard-paste
primary-paste
search-start
font-increase
font-decrease
font-reset
spawn-terminal
minimize
maximize
fullscreen
pipe-visible, pipe-scrollback, pipe-selected, pipe-command-output
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.
Example #1:
pipe-visible=[sh -c "xurls | uniq | tac | fuzzel | xargs -r firefox"] Control+Print
Example #2:
pipe-scrollback=[sh -c "f=$(mktemp) && cat - > $f && foot emacsclient -t $f; rm $f"] Control+Shift+Print
Default: none
show-urls-launch
show-urls-persistent
show-urls-copy
prompt-prev
prompt-next
unicode-input
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.
- Escape, q, Ctrl+c, Ctrl+d, Ctrl+g: abort input, then exit this mode.
- 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.
Default: Control+Shift+u.
quit
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
commit
find-prev
find-next
cursor-left
cursor-left-word
cursor-right
cursor-right-word
cursor-home
cursor-end
delete-prev
delete-prev-word
delete-next
delete-next-word
extend-char
extend-to-word-boundary
extend-to-next-whitespace
extend-line-down
extend-backward-char
extend-backward-to-word-boundary
extend-backward-to-next-whitespace
extend-line-up
clipboard-paste
primary-paste
unicode-input
scrollback-up-page
scrollback-up-half-page
scrollback-up-line
scrollback-down-page
scrollback-down-half-page
scrollback-down-line
scrollback-home
scrollback-end
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.
Be careful; do not use single-letter keys that are also used in [url].label-letters, as doing so will make some URLs inaccessible.
cancel
toggle-url-visible
But with e.g. OSC-8 URLs (the terminal version of HTML anchors, i.e. "links"), the text on the screen can be something completely different than the URL.
This action toggles between showing and hiding the URL on the jump label.
Default: t.
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 is in the form mod1+mod2+key. The names of the modifiers and the key 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
SECTION: mouse-bindings
This section lets you override the default mouse bindings.
The general format is action=combo1...comboN. That is, each action may have one or more key combinations, space separated. Each combination is in the form mod1+mod2+BTN_<name>[-COUNT]. The names 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.
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.
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.
A modifier+button combination can only be mapped to one action. Lets 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.
selection-override-modifiers
The actions to which mouse combos can be bound are listed below. All actions listed under key-bindings can be used here as well.
scrollback-up-mouse
Alt screen: send fake KeyUP events to the client application, if alternate scroll mode is enabled.
Default: BTN_WHEEL_BACK
scrollback-down-mouse
Alt screen: send fake KeyDOWN events to the client application, if alternate scroll mode is enabled.
Default: BTN_WHEEL_FORWARD
select-begin
select-begin-block
select-word
select-word-whitespace
select-quote
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.
select-row
select-extend
select-extend-character-wise
primary-paste
font-increase
font-decrease
TWEAK
This section is for advanced users and describes configuration options that can be used to tweak foot's low-level behavior.
These options are not included in the example configuration. You should not change these unless you understand what they do.
Note that these options may change, or be removed at any time, without prior notice.
When reporting bugs, please mention if, and to what, you have changed any of these options.
scaling-filter
Default: lanczos3.
overflowing-glyphs
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".
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.
Note: might impact performance depending on the font used. Especially small font sizes can cause many overflowing glyphs because of subpixel rendering.
Default: yes.
render-timer
box-drawing-base-thickness
box-drawing-solid-shades
When disabled, they are instead rendered as checker box pattern, using the current foreground color as is.
Default: yes.
delayed-render-lower, delayed-render-upper
If a client splits up a screen update over multiple write(3) calls, we may end up rendering an intermediate frame, quickly 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 delay we introduce is so small that the risk of pushing the frame over to the next frame interval is also very small.
Now, that was a lot of text. But what is it foot actually does?
When receiving client data, it schedules a timer, the delayed-render-lower. If we do not receive any more client data 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).
You can disable the feature altogether by setting either value to 0. In this case, frames are rendered "as soon as possible".
Default: lower=500000 (0.5ms), upper=8333333 (8.3ms - half a frame interval).
damage-whole-window
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.
Default: no.
grapheme-shaping
This is required to render e.g. flag (emoji) sequences, keycap sequences, modifier sequences, zero-width-joiner (ZWJ) sequences and emoji tag sequences. It might also improve rendering of composed characters, depending on font.
- foot must have been compiled with utf8proc support
- fcft must have been compiled with HarfBuzz support
This option can also be set runtime with DECSET/DECRST 2027.
See also: grapheme-width-method.
Default: yes
grapheme-width-method
wcswidth simply adds together the individual width of all codepoints making up the cluster.
double-width does the same, but limits the maximum number of columns to 2. This is more correct, but may break some applications since applications typically use wcswidth(3) internally to calculate the width. This results in cursor de-synchronization issues.
max uses the width of the largest codepoint in the cluster.
Default: double-width
font-monospace-warn
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
max-shm-pool-size-mb
It does not change how much physical memory foot uses.
Foot uses a memory mapping trick to implement fast rendering of interactive scrolling (typically, but applies to "slow" scrolling in general). Example: holding down the 'up' or 'down' arrow key to scroll in a text editor.
For this to work, it needs a large amount of virtual address space. Again, note that this is not physical memory.
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?
However, the Wayland compositor also needs to allocate the same amount of virtual address space. Thus, it has a slightly higher chance of running out of address space since it needs to host all running Wayland clients in the same way, at the same time.
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).
Setting it to 0 disables the feature.
Limitations:
- only supported on 64-bit architectures
- only supported on Linux
Default: 512. Maximum allowed: 2048 (2GB).
sixel
bold-text-in-bright-amount
SEE ALSO
2024-10-23 |