tabs and tab overview

This commit is contained in:
entailz 2026-05-12 23:33:02 -07:00
commit d07c2a5cc9
244 changed files with 72046 additions and 0 deletions

81
doc/benchmark.md Normal file
View file

@ -0,0 +1,81 @@
# Benchmarks
## vtebench
All benchmarks are done using [vtebench](https://github.com/alacritty/vtebench):
```sh
./target/release/vtebench -b ./benchmarks --dat /tmp/<terminal>
```
## 2022-05-12
### System
CPU: i9-9900
RAM: 64GB
Graphics: Radeon RX 5500XT
### Terminal configuration
Geometry: 2040x1884
Font: Fantasque Sans Mono 10.00pt/23px
Scrollback: 10000 lines
### Results
| Benchmark (times in ms) | Foot (GCC+PGO) 1.12.1 | Foot 1.12.1 | Alacritty 0.10.1 | URxvt 9.26 | XTerm 372 |
|-------------------------------|----------------------:|------------:|-----------------:|-----------:|----------:|
| cursor motion | 10.40 | 14.07 | 24.97 | 23.38 | 1622.86 |
| dense cells | 29.58 | 45.46 | 97.45 | 10828.00 | 2323.00 |
| light cells | 4.34 | 4.40 | 12.84 | 12.17 | 49.81 |
| scrollling | 135.31 | 116.35 | 121.69 | 108.30 | 4041.33 |
| scrolling bottom region | 118.19 | 109.70 | 105.26 | 118.80 | 3875.00 |
| scrolling bottom small region | 132.41 | 122.11 | 122.83 | 151.30 | 3839.67 |
| scrolling fullscreen | 5.70 | 5.66 | 10.92 | 12.09 | 124.25 |
| scrolling top region | 144.19 | 121.78 | 135.81 | 159.24 | 3858.33 |
| scrolling top small region | 135.95 | 119.01 | 115.46 | 216.55 | 3872.67 |
| unicode | 11.56 | 10.92 | 15.94 | 1012.27 | 4779.33 |
## 2022-05-12
### System
CPU: i5-8250U
RAM: 8GB
Graphics: Intel UHD Graphics 620
### Terminal configuration
Geometry: 945x1020
Font: Dina:pixelsize=12
Scrollback=10000 lines
### Results
| Benchmark (times in ms) | Foot (GCC+PGO) 1.12.1 | Foot 1.12.1 | Alacritty 0.10.1 | URxvt 9.26 | XTerm 372 |
|-------------------------------|----------------------:|------------:|-----------------:|-----------:|----------:|
| cursor motion | 15.03 | 16.74 | 23.22 | 24.14 | 1381.63 |
| dense cells | 43.56 | 54.10 | 89.43 | 1807.17 | 1945.50 |
| light cells | 7.96 | 9.66 | 20.19 | 21.31 | 122.44 |
| scrollling | 146.02 | 150.47 | 129.22 | 129.84 | 10140.00 |
| scrolling bottom region | 138.36 | 137.42 | 117.06 | 141.87 | 10136.00 |
| scrolling bottom small region | 137.40 | 134.66 | 128.97 | 208.77 | 9930.00 |
| scrolling fullscreen | 11.66 | 12.02 | 19.69 | 21.96 | 315.80 |
| scrolling top region | 143.81 | 133.47 | 132.51 | 475.81 | 10267.00 |
| scrolling top small region | 133.72 | 135.32 | 145.10 | 314.13 | 10074.00 |
| unicode | 20.89 | 21.78 | 26.11 | 5687.00 | 15740.00 |

813
doc/foot-ctlseqs.7.scd Normal file
View file

@ -0,0 +1,813 @@
foot-ctlseqs(7)
# NAME
foot-ctlseqs - terminal control sequences supported by foot
# DESCRIPTION
This document describes all the control sequences supported by foot.
- Control characters
- Sequences beginning with ESC
- CSI - Control Sequence Introducer
- SGR
- Indexed and RGB colors (256-color palette and 24-bit colors)
- Private modes
- Window manipulation
- Other
- OSC - Operating System Command
- DCS - Device Control String
# Control characters
[[ *Sequence*
:[ *Name*
:< *Description*
| \\a
: BEL
: Depends on what *bell* in *foot.ini*(5) is set to.
| \\b
: BS
: Backspace; move the cursor left one step. Wrap if _bw_ is enabled.
| \\t
: HT
: Horizontal tab; move the cursor to the next tab stop.
| \\n
: LF
: Line feed; move the cursor down one step, or scroll content up if
at the bottom line.
| \\v
: VT
: Vertical tab; identical to _LF_.
| \\f
: FF
: Form feed; identical to _LF_.
| \\r
: CR
: Carriage ret; move the cursor to the leftmost column.
| \\x0E
: SO
: Shift out; select the _G1_ character set.
| \\x0F
: SI
: Shift in; select the _G0_ character set.
# Sequences beginning with ESC
Note: this table excludes sequences where ESC is part of a 7-bit
equivalent to 8-bit C1 controls.
[[ *Sequence*
:[ *Name*
:[ *Origin*
:< *Description*
| \\E 7
: DECSC
: VT100
: Save cursor position.
| \\E 8
: DECRC
: VT100
: Restore cursor position.
| \\E c
: RIS
: VT100
: Reset terminal to initial state.
| \\E D
: IND
: VT100
: Line feed; move the cursor down one step, or scroll content up if
at the bottom margin.
| \\E E
: NEL
: VT100
: Next line; move the cursor down one step, and to the first
column. Content is scrolled up if at the bottom line.
| \\E H
: HTS
: VT100
: Set one horizontal tab stop at the current position.
| \\E M
: RI
: VT100
: Reverse index; move the cursor up one step, or scroll content down
if at the top margin.
| \\E N
: SS2
: VT220
: Single shift select of G2 character set (affects next character only).
| \\E O
: SS3
: VT220
: Single shift select of G3 character set (affects next character only).
| \\E =
: DECKPAM
: VT100
: Switch keypad to _application_ mode.
| \\E >
: DECKPNM
: VT100
: Switch keypad to _numeric_ mode.
| \\E ( _C_
: SCS
: VT100
: Designate G0 character set. Supported values for _C_ are: *0* (DEC
Special Character and Line Drawing Set), and *B* (USASCII).
| \\E ) _C_
: SCS
: VT100
: Designate G1 character set. Same supported values for _C_ as in _G0_.
| \\E \* _C_
: SCS
: VT220
: Designate G2 character set. Same supported values for _C_ as in _G0_.
| \\E + _C_
: SCS
: VT220
: Designate G3 character set. Same supported values for _C_ as in _G0_.
# CSI
All sequences begin with *\\E[*, sometimes abbreviated "CSI". Spaces
are used in the sequence strings to make them easier to read, but are
not actually part of the string (i.e. *\\E[ 1 m* is really *\\E[1m*).
## SGR
All SGR sequences are in the form *\\E[* _N_ *m*, where _N_ is a decimal
number - the _parameter_. Multiple parameters can be combined in a
single CSI sequence by separating them with semicolons: *\\E[ 1;2;3
m*.
[[ *Parameter*
:< *Description*
| 0
: Reset all attributes
| 1
: Bold
| 2
: Dim
| 3
: Italic
| 4
: Underline, including styled underlines
| 5
: Blink
| 7
: Reverse video; swap foreground and background colors
| 8
: Conceal; text is not visible, but is copiable
| 9
: Crossed-out/strike
| 21
: Double underline
| 22
: Disable *bold* and *dim*
| 23
: Disable italic
| 24
: Disable underline
| 25
: Disable blink
| 27
: Disable reverse video
| 28
: Disable conceal
| 29
: Disable crossed-out
| 30-37
: Select foreground color (using *regularN* in *foot.ini*(5))
| 38
: Select foreground color, see "indexed and RGB colors" below
| 39
: Use the default foreground color (*foreground* in *foot.ini*(5))
| 40-47
: Select background color (using *regularN* in *foot.ini*(5))
| 48
: Select background color, see "indexed and RGB colors" below
| 49
: Use the default background color (*background* in *foot.ini*(5))
| 58
: Select underline color, see "indexed and RGB colors" below
| 59
: Use the default underline color
| 90-97
: Select foreground color (using *brightN* in *foot.ini*(5))
| 100-107
: Select background color (using *brightN* in *foot.ini*(5))
## Indexed and RGB colors (256-color palette and 24-bit colors)
Foot supports both the new sub-parameter based variants, and the older
parameter based variants for setting foreground and background colors.
Indexed colors:
- *\\E[ 38 : 5 :* _idx_ *m*
- *\\E[ 38 ; 5 ;* _idx_ *m*
RGB colors:
- *\\E[ 38 : 2 :* _cs_ *:* _r_ *:* _g_ *:* _b_ *m*
- *\\E[ 38 : 2 :* _r_ *:* _g_ *:* _b_ *m*
- *\\E[ 38 ; 2 ;* _r_ *;* _g_ *;* _b_ *m*
The first variant is the "correct" one (and foot also recognizes, but
ignores, the optional _tolerance_ parameters).
The second one is allowed since many programs "forget" the color space
ID, _cs_.
The sub-parameter based variants are preferred, and are what foot's
*terminfo*(5) entry uses.
## Private Modes
There are several Boolean-like "modes" that affect certain aspects
of the terminal's behavior. These modes can be manipulated with the
following 4 escape sequences:
[[ *Sequence*
:[ *Name*
:< *Description*
| \\E[ ? _Pm_ h
: DECSET
: Enable private mode
| \\E[ ? _Pm_ l
: DECRST
: Disable private mode
| \\E[ ? _Pm_ s
: XTSAVE
: Save private mode
| \\E[ ? _Pm_ r
: XTRESTORE
: Restore private mode
The _Pm_ parameter in the above sequences denotes a numerical ID
that corresponds to one of the following modes:
[[ *Parameter*
:[ *Origin*
:< *Description*
| 1
: VT100
: Cursor keys mode (DECCKM)
| 5
: VT100
: Reverse video (DECSCNM)
| 6
: VT100
: Origin mode (DECOM)
| 7
: VT100
: Auto-wrap mode (DECAWM)
| 12
: AT&T 610
: Cursor blink
| 25
: VT220
: Cursor visibility (DECTCEM)
| 45
: xterm
: Reverse-wraparound mode
| 47
: xterm
: Same as 1047 (see below)
| 66
: VT320
: Numeric keypad mode (DECNKM); same as DECKPAM/DECKPNM when enabled/disabled
| 1000
: xterm
: Send mouse x/y on button press/release
| 1001
: xterm
: Use hilite mouse tracking
| 1002
: xterm
: Use cell motion mouse tracking
| 1003
: xterm
: Use all motion mouse tracking
| 1004
: xterm
: Send FocusIn/FocusOut events
| 1006
: xterm
: SGR mouse mode
| 1007
: xterm
: Alternate scroll mode
| 1015
: urxvt
: urxvt mouse mode
| 1016
: xterm
: SGR-Pixels mouse mode
| 1034
: xterm
: 8-bit Meta mode
| 1035
: xterm
: Num Lock modifier (see xterm numLock option)
| 1036
: xterm
: Send ESC when Meta modifies a key (see xterm metaSendsEscape option)
| 1042
: xterm
: Perform action for BEL character (see *bell* in *foot.ini*(5))
| 1047
: xterm
: Use alternate screen buffer
| 1048
: xterm
: Save/restore cursor (DECSET=save, DECRST=restore)
| 1049
: xterm
: Equivalent to 1048 and 1047 combined
| 1070
: xterm
: Use private color registers for each sixel
| 2004
: xterm
: Wrap pasted text with start/end delimiters (bracketed paste mode)
| 2026
: terminal-wg
: Application synchronized updates mode
| 2027
: contour
: Grapheme cluster processing
| 2031
: contour
: Request color theme updates
| 2048
: TODO
: In-band window resize notifications
| 8452
: xterm
: Position cursor to the right of sixels, instead of on the next line
| 737769
: foot
: Input Method Editor (IME) mode
## Window manipulation
Foot implements a sub-set of XTerm's (originally dtterm's) window
manipulation sequences. The generic format is:
*\\E[ *_Ps_* ; *_Ps_* ; *_Ps_* t*
[[ *Parameter 1*
:[ *Parameter 2*
:< *Description*
| 11
: -
: Report if window is iconified. Foot always reports *1* - not iconified.
| 13
: -
: Report window position. Foot always reports (0,0), due to Wayland
limitations.
| 13
: 2
: Report text area position. Foot always reports (0,0) due to Wayland
limitations.
| 14
: -
: Report text area size, in pixels. Foot reports the grid size,
excluding the margins.
| 14
: 2
: Report window size, in pixels. Foot reports the grid size plus the
margins.
| 15
: -
: Report the screen size, in pixels.
| 16
: -
: Report the cell size, in pixels.
| 18
: -
: Report text area size, in characters.
| 19
: -
: Report screen size, in characters.
| 20
: -
: Report icon label.
| 22
: -
: Push window title+icon.
| 22
: 1
: Push window icon.
| 22
: 2
: Push window title.
| 23
: -
: Pop window title+icon.
| 23
: 1
: Pop window icon.
| 23
: 2
: Pop window title.
## Other
[[ *Parameter*
:[ *Name*
:[ *Origin*
:< *Description*
| \\E[ _Ps_ c
: DA
: VT100
: Send primary device attributes. Foot responds with "I'm a VT220 with
sixel and ANSI color support".
| \\E[ _Ps_ A
: CUU
: VT100
: Cursor up - move cursor up _Ps_ times.
| \\E[ _Ps_ B
: CUD
: VT100
: Cursor down - move cursor down _Ps_ times.
| \\E[ _Ps_ C
: CUF
: VT100
: Cursor forward - move cursor to the right _Ps_ times.
| \\E[ _Ps_ D
: CUB
: VT100
: Cursor backward - move cursor to the left _Ps_ times.
| \\E[ _Ps_ g
: TBC
: VT100
: Tab clear. _Ps_=0 -> clear current column. _Ps_=3 -> clear all.
| \\E[ _Ps_ ; _Ps_ f
: HVP
: VT100
: Horizontal and vertical position - move cursor to _row_ ; _column_.
| \\E[ _Ps_ ; _Ps_ H
: CUP
: VT100
: Cursor position - move cursor to _row_ ; _column_.
| \\E[ _Ps_ J
: ED
: VT100
: Erase in display. _Ps_=0 -> below cursor. _Ps_=1 -> above
| \\E[ _Ps_ K
: EL
: VT100
: Erase in line. _Ps_=0 -> right of cursor. _Ps_=1 -> left of
cursor. _Ps_=2 -> all.
| \\E[ _Pm_ h
: SM
: VT100
: Set mode. _Pm_=4 -> enable IRM (Insertion Replacement Mode). All
other values of _Pm_ are unsupported.
| \\E[ _Pm_ l
: RM
: VT100
: Reset mode. _Pm_=4 -> disable IRM (Insertion Replacement Mode). All
other values of _Pm_ are unsupported.
| \\E[ _Ps_ n
: DSR
: VT100
: Device status report. _Ps_=5 -> device status. _Ps_=6 -> cursor
position.
| \\E[ _Ps_ L
: IL
: VT220
: Insert _Ps_ lines.
| \\E[ _Ps_ M
: DL
: VT220
: Delete _Ps_ lines.
| \\E[ _Ps_ P
: DCH
: VT220
: Delete _Ps_ characters.
| \\E[ _Ps_ @
: ICH
: VT220
: Insert _Ps_ blank characters.
| \\E[ _Ps_ X
: ECH
: VT220
: Erase _Ps_ characters.
| \\E[ > c
: DA2
: VT220
: Send secondary device attributes. Foot responds with "I'm a VT220
and here's my version number".
| \\E[ ! p
: DECSTR
: VT220
: Soft terminal reset.
| \\E[ ? _Ps_ $ p
: DECRQM
: VT320
: Request status of DEC private mode. The _Ps_ parameter corresponds
to one of the values mentioned in the "Private Modes" section above
(as set with DECSET/DECRST).
| \\E[ _Ps_ $ p
: DECRQM
: VT320
: Request status of ECMA-48/ANSI mode. See the descriptions for SM/RM
above for recognized _Ps_ values.
| \\E[ _Pt_ ; _Pl_ ; _Pb_ ; _Pr_ ; _Pm_ $ r
: DECCARA
: VT400
: Change attributes in rectangular area. _Pt_, _Pl_, _Pb_ and _Pr_
denotes the rectangle, _Pm_ denotes the SGR attributes.
| \\E[ _Pt_ ; _Pl_ ; _Pb_ ; _Pr_ ; _Pm_ $ t
: DECRARA
: VT400
: Invert attributes in rectangular area. _Pt_, _Pl_, _Pb_ and _Pr_
denotes the rectangle, _Pm_ denotes the SGR attributes.
| \\E[ _Pt_ ; _Pl_ ; _Pb_ ; _Pr_ ; _Pp_ ; _Pt_ ; _Pl_ ; _Pp_ $ v
: DECCRA
: VT400
: Copy rectangular area. _Pt_, _Pl_, _Pb_ and _Pr_ denotes the
rectangle, _Pt_ and _Pl_ denotes the target location.
| \\E[ _Pc_ ; _Pt_ ; _Pl_ ; _Pb_ ; _Pr_ $ x
: DECFRA
: VT420
: Fill rectangular area. _Pc_ is the character to use, _Pt_, _Pl_,
_Pb_ and _Pr_ denotes the rectangle.
| \\E[ _Pt_ ; _Pl_ ; _Pb_ ; _Pr_ $ z
: DECERA
: VT400
: Erase rectangular area. _Pt_, _Pl_, _Pb_ and _Pr_ denotes the
rectangle.
| \\E[ _Ps_ T
: SD
: VT420
: Scroll down _Ps_ lines.
| \\E[ s
: SCOSC
: SCO, VT510
: Save cursor position.
| \\E[ u
: SCORC
: SCO, VT510
: Restore cursor position.
| \\E[ _Ps_ SP q
: DECSCUSR
: VT510
: Set cursor style. In foot, _Ps_=0 means "use style from foot.ini".
| \\E[ = _Ps_ c
: DA3
: VT510
: Send tertiary device attributes. Foot responds with "FOOT", in
hexadecimal.
| \\E[ _Pm_ d
: VPA
: ECMA-48
: Line position absolute - move cursor to line _Pm_.
| \\E[ _Pm_ e
: VPR
: ECMA-48
: Line position relative - move cursor down _Pm_ lines.
| \\E[ _Pm_ a
: HPR
: ECMA-48
: Character position relative - move cursor to the right _Pm_ times.
| \\E[ _Ps_ E
: CNL
: ECMA-48
: Cursor next line - move the cursor down _Ps_ times.
| \\E[ _Ps_ F
: CPL
: ECMA-48
: Cursor preceding line - move the cursor up _Ps_ times.
| \\E[ _Pm_ `
: HPA
: ECMA-48
: Character position absolute - move cursor to column _Pm_.
| \\E[ _Ps_ G
: CHA
: ECMA-48
: Cursor character absolute - move cursor to column _Ps_.
cursor. _Ps_=2 -> all. _Ps_=3 -> saved lines.
| \\E[ _Ps_ S
: SU
: ECMA-48
: Scroll up _Ps_ lines.
| \\E[ _Ps_ I
: CHT
: ECMA-48
: Cursor forward tabulation _Ps_ tab stops.
| \\E[ _Ps_ Z
: CBT
: ECMA-48
: Cursor backward tabulation _Ps_ tab stops.
| \\E[ _Ps_ b
: REP
: ECMA-48
: Repeat the preceding printable character _Ps_ times.
| \\E[ ? _Pi_ ; _Pa_ ; _Pv_ S
: XTSMGRAPHICS
: xterm
: Set or request sixel attributes.
| \\E[ > _Ps_ q
: XTVERSION
: xterm
: _Ps_=0 -> report terminal name and version, in the form
*\\EP>|foot(version)\\E\\*.
| \\E[ > 4 ; _Pv_ m
: XTMODKEYS
: xterm
: Set level of the _modifyOtherKeys_ property to _Pv_. Note that foot
only supports level 1 and 2, where level 1 is the default setting.
| \\E[ ? _Pp_ m
: XTQMODKEYS
: xterm
: Query key modifier options
| \\E[ > 4 n
: <unnamed>
: xterm
: Resets the _modifyOtherKeys_ property to level 1. Note that in foot,
this sequence does not completely disable _modifyOtherKeys_, since
foot only supports level 1 and level 2 (and not level 0).
| \\E[ ? u
: <unnamed>
: kitty
: Query current values of the Kitty keyboard flags.
| \\E[ > _flags_ u
: <unnamed>
: kitty
: Push a new entry, _flags_, to the Kitty keyboard stack.
| \\E[ < _number_ u
: <unnamed>
: kitty
: Pop _number_ of entries from the Kitty keyboard stack.
| \\E[ = _flags_ ; _mode_ u
: <unnamed>
: kitty
: Update current Kitty keyboard flags, according to _mode_.
| \\E[ # P
: XTPUSHCOLORS
: xterm
: Push current color palette onto stack
| \\E[ # Q
: XTPOPCOLORS
: xterm
: Pop color palette from stack
| \\E[ # R
: XTREPORTCOLORS
: xterm
: Report the current entry on the palette stack, and the number of
palettes stored on the stack.
| \\E[ ? 996 n
: Query the current (color) theme mode
: contour
: The current color theme mode (light or dark) is reported as *CSI ?
997 ; 1|2 n*, where *1* means dark and *2* light. By convention, the
primary theme in foot is considered dark, and the alternative theme
light.
# OSC
All _OSC_ sequences begin with *\\E]*, sometimes abbreviated _OSC_.
[[ *Sequence*
:[ *Origin*
:< *Description*
| \\E] 0 ; _Pt_ \\E\\
: xterm
: Set window icon and title to _Pt_.
| \\E] 1 ; _Pt_ \\E\\
: xterm
: Set window icon to _Pt_.
| \\E] 2 ; _Pt_ \\E\\
: xterm
: Set window title to _Pt_
| \\E] 4 ; _c_ ; _spec_ \\E\\
: xterm
: Change color number _c_ to _spec_, where _spec_ is a color in
XParseColor format. foot only supports RGB colors; either
*rgb:<red>/<green>/<blue>*, or the legacy format (*#rgb*).
| \\E] 7 ; _Uri_ \\E\\
: iTerm2
: Update the terminal's current working directory. Newly spawned
terminals will launch in this directory. _Uri_ must be in the format
*file://<hostname>/<path>*. *hostname* must refer to your local host.
| \\E] 8 ; id=_ID_ ; _Uri_ \\E\\
: VTE+iTerm2
: Hyperlink (a.k.a HTML-like anchors). id=_ID_ is optional; if assigned,
all URIs with the same _ID_ will be treated as a single
hyperlink. An empty URI closes the hyperlink.
| \\E] 9 ; _msg_ \\E\\
: iTerm2
: Desktop notification, uses *notify* in *foot.ini*(5).
| \\E] 10 ; _spec_ \\E\\
: xterm
: Change the default foreground color to _spec_, a color in
XParseColor format.
| \\E] 11 ; _spec_ \\E\\
: xterm
: Change the default background color to _spec_, a color in
XParseColor format. Foot implements URxvt's transparency extension;
e.g. _spec_=*[75]#ff00ff* or _spec_=*rgba:ff/00/ff/bf* (pink with
75% alpha).
| \\E] 12 ; _spec_ \\E\\
: xterm
: Change cursor color to _spec_, a color in XParseColor format.
| \\E] 17 ; _spec_ \\E\\
: xterm
: Change selection background color to _spec_, a color in
XParseColor format.
| \\E] 19 ; _spec_ \\E\\
: xterm
: Change selection foreground color to _spec_, a color in XParseColor
format.
| \\E] 22 ; _xcursor-pointer-name_ \\E\\
: xterm
: Sets the xcursor pointer. An empty name, or an invalid name resets
it.
| \\E] 52 ; _Pc_ ; ? \\E\\
: xterm
: Send clipboard data. _Pc_ can be either *c*, *s* or *p*. *c* uses
the clipboard as source, and *s* and *p* uses the primary
selection. The response is *\\E] 52 ; Pc ; <base64-encoded data>
\E\\*, where _Pc_ denotes the source used.
| \\E] 52 ; _Pc_ ; _Pd_ \\E\\
: xterm
: Copy _Pd_ (base64 encoded text) to the clipboard. _Pc_ denotes the
target: *c* targets the clipboard and *s* and *p* the primary
selection.
| \\E] 66 ; _params_ ; text \\E\\
: kitty
: Text sizing protocol (only 'w', width, supported)
| \\E] 99 ; _params_ ; _payload_ \\E\\
: kitty
: Desktop notification; uses *desktop-notifications.command* in
*foot.ini*(5).
| \\E] 104 ; _c_ \\E\\
: xterm
: Reset color number _c_ (multiple semicolon separated _c_ values may
be provided), or all colors (excluding the default
foreground/background colors) if _c_ is omitted.
| \\E] 110 \\E\\
: xterm
: Reset default foreground color
| \\E] 111 \\E\\
: xterm
: Reset default background color
| \\E] 112 \\E\\
: xterm
: Reset cursor color
| \\E] 117 \\E\\
: xterm
: Reset selection background color
| \\E] 119 \\E\\
: xterm
: Reset selection foreground color
| \\E] 133 ; A \\E\\
: FinalTerm
: Mark start of shell prompt
| \\E] 133 ; C \\E\\
: FinalTerm
: Mark start of command output
| \\E] 133 ; D \\E\\
: FinalTerm
: Mark end of command output
| \\E] 176 ; _app-id_ \\E\\
: foot
: Set app ID. _app-id_ is optional; if assigned,
the terminal window App ID will be set to the value.
An empty App ID resets the value to the default.
| \\E] 555 \\E\\
: foot
: Flash the entire terminal (foot extension)
| \\E] 777;notify;_title_;_msg_ \\E\\
: urxvt
: Desktop notification, uses *desktop-notifications.command* in
*foot.ini*(5).
# DCS
All _DCS_ sequences begin with *\\EP* (sometimes abbreviated _DCS_),
and are terminated by *\\E\\* (ST).
[[ *Sequence*
:< *Description*
| \\EP q <sixel data> \\E\\
: Emit a sixel image at the current cursor position
| \\EP $ q <query> \\E\\
: Request selection or setting (DECRQSS). Implemented queries:
DECSTBM, SGR and DECSCUSR.
| \\EP = _C_ s \\E\\
: Begin (_C_=*1*) or end (_C_=*2*) application synchronized updates.
This sequence is supported for compatibility reasons, but it's
recommended to use private mode 2026 (see above) instead.
| \\EP + q <hex encoded capability name> \\E\\
: Query builtin terminfo database (XTGETTCAP)
# FOOTNOTE
Foot does not support 8-bit control characters ("C1").

735
doc/foot.1.scd Normal file
View file

@ -0,0 +1,735 @@
foot(1)
# NAME
foot - Wayland terminal emulator
# SYNOPSIS
*foot* [_OPTIONS_]++
*foot* [_OPTIONS_] <_command_> [_COMMAND OPTIONS_]
All trailing (non-option) arguments are treated as a command, and its
arguments, to execute (instead of the default shell).
# DESCRIPTION
*foot* is a Wayland terminal emulator. Running it without arguments
will start a new terminal window with your default shell.
You can override the default shell by appending a custom command to
the foot command line
*foot htop*
# OPTIONS
*-c*,*--config*=_PATH_
Path to configuration file, see *foot.ini*(5) for details.
The configuration file is automatically passed to new terminals
spawned via *spawn-terminal* (see *foot.ini*(5)).
*-C*,*--check-config*
Verify configuration and then exit with 0 if ok, otherwise exit
with 230 (see *EXIT STATUS*).
*-o*,*--override*=[_SECTION_.]_KEY_=_VALUE_
Override an option set in the configuration file. If _SECTION_ is not
given, defaults to _main_.
*-f*,*--font*=_FONT_
Comma separated list of fonts to use, in fontconfig format (see
*FONT FORMAT*).
The first font is the primary font. The remaining fonts are
fallback fonts that will be used whenever a glyph cannot be found
in the primary font.
The fallback fonts are searched in the order they appear. If a
glyph cannot be found in any of the fallback fonts, the dynamic
fallback list from fontconfig (for the primary font) is
searched.
Default: _monospace_.
*-w*,*--window-size-pixels*=_WIDTHxHEIGHT_
Set initial window width and height, in pixels. Default: _700x500_.
*-W*,*--window-size-chars*=_WIDTHxHEIGHT_
Set initial window width and height, in characters. Default: _not set_.
*-t*,*--term*=_TERM_
Value to set the environment variable *TERM* to (see *TERMINFO*
and *ENVIRONMENT*). Default: _@default_terminfo@_.
*-T*,*--title*=_TITLE_
Initial window title. Default: _foot_.
*-a*,*--app-id*=_ID_
Value to set the *app-id* property on the Wayland window
to. Default: _foot_ (normal mode), or _footclient_ (server mode).
*toplevel-tag*=_TAG_
Value to set the *toplevel-tag* property on the Wayland window
to. The compositor can use this value for session management,
window rules etc. Default: _not set_
*-m*,*--maximized*
Start in maximized mode. If both *--maximized* and *--fullscreen*
are specified, the _last_ one takes precedence.
*-F*,*--fullscreen*
Start in fullscreen mode. If both *--maximized* and *--fullscreen*
are specified, the _last_ one takes precedence.
*-L*,*--login-shell*
Start a login shell, by prepending a '-' to argv[0].
*--pty*
Display an existing pty instead of creating one. This is useful
for interacting with VM consoles.
This option is not currently supported in combination with
*-s*,*--server*.
*-D*,*--working-directory*=_DIR_
Initial working directory for the client application. Default:
_CWD of foot_.
*-s*,*--server*[=_PATH_|_FD_]
Run as a server. In this mode, a single foot instance hosts
multiple terminals (windows). Use *footclient*(1) to launch new
terminals.
This saves some memory since for example fonts and glyph caches
can be shared between the terminals.
It also saves upstart time since the config has already been
loaded and parsed, and most importantly, fonts have already been
loaded (and their glyph caches are likely to already have been
populated).
Each terminal will have its own rendering threads, but all Wayland
communication, as well as input/output to the shell, is
multiplexed in the main thread. Thus, this mode might result in
slightly worse performance when multiple terminals are under heavy
load.
Also be aware that should one terminal crash, it will take all the
others with it.
The default path is
*$XDG\_RUNTIME\_DIR/foot-$WAYLAND\_DISPLAY.sock*.
If *$XDG\_RUNTIME\_DIR* is not set, the default path is instead
*/tmp/foot.sock*.
If *$XDG\_RUNTIME\_DIR* is set, but *$WAYLAND\_DISPLAY* is not,
the default path is *$XDG\_RUNTIME\_DIR/foot.sock*.
Note that if you change the default, you will also need to use the
*--server-socket* option in *footclient*(1) and point it to your
custom socket path.
If the argument is a number, foot will interpret it as the file descriptor
of a socket provided by a supervision daemon (such as systemd or s6), and
use that socket as it's own.
Two systemd units (foot-server.{service,socket}) are provided to use that
feature with systemd. To use socket activation, only enable the
socket unit.
Note that starting *foot --server* as a systemd service will use
the environment of the systemd user instance; thus, you'll need
to import *$WAYLAND_DISPLAY* in it using *systemctl --user
import-environment WAYLAND_DISPLAY*.
*-H*,*--hold*
Remain open after child process exits.
*-p*,*--print-pid*=_FILE_|_FD_
Print PID to this file, or FD, when successfully started. The file
(or FD) is closed immediately after writing the PID. When a _FILE_
as been specified, the file is unlinked at exit.
This option can only be used in combination with *-s*,*--server*.
*-d*,*--log-level*={*info*,*warning*,*error*,*none*}
Log level, used both for log output on stderr as well as
syslog. Default: _warning_.
*-l*,*--log-colorize*=[{*never*,*always*,*auto*}]
Enables or disables colorization of log output on stderr. Default:
_auto_.
*-S*,*--log-no-syslog*
Disables syslog logging. Logging is only done on stderr. This
option can only be used in combination with *-s*,*--server*.
*-v*,*--version*
Show the version number and quit.
*-e*
Ignored; for compatibility with *xterm -e*.
This option was added in response to several program launchers
passing *-e* to arbitrary terminals, under the assumption that
they all implement the same semantics for it as *xterm*(1).
Ignoring it allows foot to be invoked as e.g. *foot -e man foot*
with the same results as with xterm, instead of producing an
"invalid option" error.
# KEYBOARD SHORTCUTS
The following keyboard shortcuts are available by default. They can be
changed in *foot.ini*(5). There are also more actions (disabled by
default) available; see *foot.ini*(5).
## NORMAL MODE
*shift*+*page up*/*page down*
Scroll up/down in history
*ctrl*+*shift*+*c*, *XF86Copy*
Copy selected text to the _clipboard_
*ctrl*+*shift*+*v*, *XF86Paste*
Paste from _clipboard_
*shift*+*insert*
Paste from the _primary selection_
*ctrl*+*shift*+*r*
Start a scrollback search
*ctrl*+*+*, *ctrl*+*=*
Increase font size
*ctrl*+*-*
Decrease font size
*ctrl*+*0*
Reset font size
*ctrl*+*shift*+*n*
Spawn a new terminal. If the shell has been configured to emit the
_OSC 7_ escape sequence, the new terminal will start in the
current working directory.
*ctrl*+*shift*+*o*
Activate URL mode, allowing you to "launch" URLs.
*ctrl*+*shift*+*u*
Activate Unicode input.
*ctrl*+*shift*+*z*
Jump to the previous, currently not visible, prompt. Requires
shell integration.
*ctrl*+*shift*+*x*
Jump to the next prompt. Requires shell integration.
## SCROLLBACK SEARCH
These keyboard shortcuts affect the search selection:
*ctrl*+*r*
Search _backward_ for the next match. If the search string is
empty, the last searched-for string is used.
*ctrl*+*s*
Search _forward_ for the next match. If the search string is
empty, the last searched-for string is used.
*shift*+*right*
Extend current selection to the right by one character.
*shift*+*left*
Extend current selection to the left by one character.
*ctrl*+*w*, *ctrl*+*shift*+*right*
Extend current selection (and thus the search criteria) to the end
of the word, or the next word if currently at a word separating
character.
*ctrl*+*shift*+*w*
Same as *ctrl*+*w*, except that the only word separating
characters are whitespace characters.
*ctrl*+*shift*+*left*
Extend current selection to the left to the last word boundary.
*shift*+*down*
Extend current selection down one line
*shift*+*up*
Extend current selection up one line.
*ctrl*+*v*, *ctrl*+*shift*+*v*, *ctrl*+*y*, *XF86Paste*
Paste from clipboard into the search buffer.
*shift*+*insert*
Paste from primary selection into the search buffer.
*escape*, *ctrl*+*g*, *ctrl*+*c*
Cancel the search
*return*
Finish the search and copy the current match to the primary
selection. The terminal selection is kept, allowing you to press
*ctrl*+*shift*+*c* to copy it to the clipboard.
These shortcuts affect the search box in scrollback-search mode:
*ctrl*+*b*
Moves the cursor in the search box one **character** to the left.
*ctrl*+*left*, *alt*+*b*
Moves the cursor in the search box one **word** to the left.
*ctrl*+*f*
Moves the cursor in the search box one **character** to the right.
*ctrl*+*right*, *alt*+*f*
Moves the cursor in the search box one **word** to the right.
*Home*, *ctrl*+*a*
Moves the cursor in the search box to the beginning of the input.
*End*, *ctrl*+*e*
Moves the cursor in the search box to the end of the input.
*alt*+*backspace*, *ctrl*+*backspace*
Deletes the **word before** the cursor.
*alt*+*delete*, *ctrl*+*delete*
Deletes the **word after** the cursor.
*ctrl*+*u*
Deletes from the cursor to the start of the input
*ctrl*+*k*
Deletes from the cursor to the end of the input
These shortcuts affect scrolling in scrollback-search mode:
*shift*+*page-up*
Scrolls up/back one page in history.
*shift*+*page-down*
Scroll down/forward one page in history.
## URL MODE
*t*
Toggle URL visibility in jump label.
*escape*, *ctrl*+*g*, *ctrl*+*c*, *ctrl*+*d*
Exit URL mode without launching a URL.
## MOUSE SHORTCUTS
*left*, single-click
Drag to select; when released, the selected text is copied to the
_primary_ selection. This feature is normally *disabled* whenever
the client has enabled _mouse tracking_, but can be forced by
holding *shift*.
Holding *ctrl* will create a block selection.
*left*, double-click
Selects the _word_ (separated by spaces, period, comma,
parenthesis etc) under the pointer. Hold *ctrl* to select
everything under the pointer up to, and until, the next space
characters.
*left*, triple-click
Selects the everything between enclosing quotes, or the entire row
if not inside a quote.
*left*, quad-click
Selects the entire row
*middle*
Paste from the _primary_ selection
*right*
Extend current selection. Clicking immediately extends the
selection, while hold-and-drag allows you to interactively resize
the selection.
*ctrl*+*right*
Extend the current selection, but force it to be character wise,
rather than depending on the original selection mode.
*wheel*
Scroll up/down in history
*ctrl*+*wheel*
Increase/decrease font size
## TOUCHSCREEN
*tap*
Emulates mouse left button click.
*drag*
Scrolls up/down in history.
Holding for a while before dragging (time delay can be configured)
emulates mouse dragging with left button held.
# FONT FORMAT
The font is specified in FontConfig syntax. That is, a colon-separated
list of font name and font options.
_Examples_:
- Dina:weight=bold:slant=italic
- Courier New:size=12
# URLs
Foot supports URL detection. But, unlike many other terminal
emulators, where URLs are highlighted when they are hovered and opened
by clicking on them, foot uses a keyboard driven approach.
Pressing *ctrl*+*shift*+*o* enters _"Open URL mode"_, where all currently
visible URLs are underlined, and is associated with a
_"jump-label"_. The jump-label indicates the _key sequence_
(e.g. *"AF"*) to use to activate the URL.
The key binding can, of course, be customized, like all other key
bindings in foot. See *show-urls-launch* and *show-urls-copy* in
*foot.ini*(5).
*show-urls-launch* by default opens the URL with *xdg-open*. This can
be changed with the *url-launch* option.
*show-urls-copy* is an alternative to *show-urls-launch*, that changes
what activating a URL _does_; instead of opening it, it copies it to
the clipboard. It is unbound by default.
Jump label colors, the URL underline color, and the letters used in
the jump label key sequences can be configured.
# ALT/META CHARACTERS
By default, foot prefixes meta characters with *ESC*. This corresponds
to XTerm's *metaSendsEscape* option set to *true*.
This can be disabled programmatically with *\E[?1036l* (and enabled
again with *\E[?1036h*).
When disabled, foot will instead set the 8:th bit of meta character
and then UTF-8 encode it. This corresponds to XTerm's *eightBitMeta*
option set to *true*.
This can also be disabled programmatically with *rmm* (Reset Meta Mode,
*\E[?1034l*), and enabled again with *smm* (Set Meta Mode,
*\E[?1034h*).
# BACKSPACE
Foot transmits DEL (*^?*) on backspace. This corresponds to XTerm's
*backarrowKey* option set to *false*, and to DECBKM being _reset_.
To instead transmit BS (*^H*), press *ctrl*+*backspace*.
Note that foot does *not* implement DECBKM, and that the behavior
described above *cannot* be changed.
Finally, pressing *alt* will prefix the transmitted byte with ESC.
# KEYPAD
By default, *Num Lock* overrides the run-time configuration keypad
mode; when active, the keypad is always considered to be in
_numerical_ mode. This corresponds to XTerm's *numLock* option set to
*true*.
In this mode, the keypad keys always sends either numbers (Num Lock is
active) or cursor movement keys (up, down, left, right, page up, page
down etc).
This can be disabled programmatically with *\E[?1035l* (and enabled
again with *\E[?1035h*).
When disabled, the keypad sends custom escape sequences instead of
numbers, when in _application_ mode.
# CONFIGURATION
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*.
For more information, see *foot.ini*(5).
# SHELL INTEGRATION
## Current working directory
New foot terminal instances (bound to *ctrl*+*shift*+*n* by default)
will open in the current working directory, if the shell in the
"parent" terminal reports directory changes.
This is done with the OSC-7 escape sequence. Most shells can be
scripted to do this, if they do not support it natively. See the wiki
(https://codeberg.org/dnkl/foot/wiki#user-content-spawning-new-terminal-instances-in-the-current-working-directory)
for details.
## Jumping between prompts
Foot can move the current viewport to focus prompts of already
executed commands (bound to *ctrl*+*shift*+*z*/*x* by default).
For this to work, the shell needs to emit an OSC-133;A
(*\\E]133;A\\E\\\\*) sequence before each prompt.
In zsh, one way to do this is to add a _precmd_ hook:
*precmd() {
print -Pn "\\e]133;A\\e\\\\"
}*
See the wiki
(https://codeberg.org/dnkl/foot/wiki#user-content-jumping-between-prompts)
for details, and examples for other shells.
## Piping last command's output
The key binding *pipe-command-output* can pipe the last command's
output to an application of your choice (similar to the other
*pipe-\** key bindings):
*\[key-bindings\]++
pipe-command-output=[sh -c "f=$(mktemp); cat - > $f; footclient emacsclient -nw $f; rm $f"] Control+Shift+g*
When pressing *ctrl*+*shift*+*g*, the last command's output is written
to a temporary file, then an emacsclient is started in a new
footclient instance. The temporary file is removed after the
footclient instance has closed.
For this to work, the shell must emit an OSC-133;C (*\\E]133;C\\E\\\\*)
sequence before command output starts, and an OSC-133;D
(*\\E]133;D\\E\\\\*) when the command output ends.
In fish, one way to do this is to add _preexec_ and _postexec_ hooks:
*function foot_cmd_start --on-event fish_preexec
echo -en "\\e]133;C\\e\\\\"
end*
*function foot_cmd_end --on-event fish_postexec
echo -en "\\e]133;D\\e\\\\"
end*
See the wiki
(https://codeberg.org/dnkl/foot/wiki#user-content-piping-last-commands-output)
for details, and examples for other shells
# TERMINFO
Client applications use the terminfo identifier specified by the
environment variable *TERM* (set by foot) to determine terminal
capabilities.
Foot has two terminfo definitions: *foot* and *foot-direct*, with
*foot* being the default.
The difference between the two is in the number of colors they
describe; *foot* describes 256 colors and *foot-direct* 16.7 million
colors (24-bit truecolor).
Note that using the *foot* terminfo does not limit the number of
usable colors to 256; applications can still use 24-bit RGB colors. In
fact, most applications work best with *foot* (including 24-bit
colors). Using *\*-direct* terminfo entries has been known to crash
some ncurses applications even.
There are however applications that need a *\*-direct* terminfo entry
for 24-bit support. Emacs is one such example.
While using either *foot* or *foot-direct* is strongly recommended, it
is possible to use e.g. *xterm-256color* as well. This can be useful
when remoting to a system where foot's terminfo entries cannot easily
be installed.
Note that terminfo entries can be installed in the user's home
directory. I.e. if you do not have root access, or if there is no
distro package for foot's terminfo entries, you can install foot's
terminfo entries manually, by copying *foot* and *foot-direct* to
*~/.terminfo/f/*.
# XTGETTCAP
*XTGETTCAP* is an escape sequence initially introduced by XTerm, and
also implemented (and extended, to some degree) by Kitty.
It allows querying the terminal for terminfo classic, file-based,
terminfo definition. For example, if all applications used this
feature, you would no longer have to install foot's terminfo on remote
hosts you SSH into.
XTerm's implementation (as of XTerm-370) only supports querying key
(as in keyboard keys) capabilities, and three custom capabilities:
- TN - terminal name
- Co - number of colors (alias for the colors capability)
- RGB - number of bits per color channel (different semantics from
the RGB capability in file-based terminfo definitions!).
Kitty has extended this, and also supports querying all integer and
string capabilities.
Foot supports this, and extends it even further, to also include
boolean capabilities. This means foot's entire terminfo can be queried
via *XTGETTCAP*.
Note that both Kitty and foot handles responses to multi-capability
queries slightly differently, compared to XTerm.
XTerm will send a single DCS reply, with ;-separated
capability/value pairs. There are a couple of issues with this:
- The success/fail flag in the beginning of the response is always 1
(success), unless the very first queried capability is invalid.
- XTerm will not respond at all to an invalid capability, unless it's
the first one in the XTGETTCAP query.
- XTerm will end the response at the first invalid capability.
In other words, if you send a large multi-capability query, you will
only get responses up to, but not including, the first invalid
capability. All subsequent capabilities will be dropped.
Kitty and foot on the other hand, send one DCS response for each
capability in the multi query. This allows us to send a proper
success/fail flag for each queried capability. Responses for all
queried capabilities are always sent. No queries are ever dropped.
# EXIT STATUS
Foot will exit with code 230 if there is a failure in foot itself.
In all other cases, the exit code is that of the client application
(i.e. the shell).
# ENVIRONMENT
## Variables used by foot
*SHELL*
The default child process to run, when no _command_ argument is
specified and the *shell* option in *foot.ini*(5) is not set.
*HOME*
Used to determine the location of the configuration file, see
*foot.ini*(5) for details.
*XDG\_CONFIG\_HOME*
Used to determine the location of the configuration file, see
*foot.ini*(5) for details.
*XDG\_CONFIG\_DIRS*
Used to determine the location of the configuration file, see
*foot.ini*(5) for details.
*XDG\_RUNTIME\_DIR*
Used to construct the default _PATH_ for the *--server*
option, when no explicit argument is given (see above).
*WAYLAND\_DISPLAY*
Used to construct the default _PATH_ for the *--server*
option, when no explicit argument is given (see above).
*XCURSOR\_THEME*
The name of the *Xcursor*(3) theme to use for pointers (typically
set by the Wayland compositor).
*XCURSOR\_SIZE*
The size to use for *Xcursor*(3) pointers (typically set by the
Wayland compositor).
## Variables set in the child process
*TERM*
terminfo/termcap identifier. This is used by client applications
to determine which capabilities a terminal supports. The value is
set according to either the *--term* command-line option or the
*term* config option in *foot.ini*(5).
*COLORTERM*
This variable is set to *truecolor*, to indicate to client
applications that 24-bit RGB colors are supported.
*PWD*
Current working directory (at the time of launching foot)
*SHELL*
Set to the launched shell, if the shell is valid (it is listed in
*/etc/shells*).
In addition to the variables listed above, custom environment
variables may be defined in *foot.ini*(5).
## Variables *unset* in the child process
*TERM_PROGRAM*
*TERM_PROGRAM_VERSION*
These environment variables are set by certain other terminal
emulators. We unset them, to prevent applications from
misdetecting foot.
In addition to the variables listed above, custom environment
variables to unset may be defined in *foot.ini*(5).
# Signals
The following signals have special meaning in foot:
- SIGUSR1: switch to the dark color theme (*[colors-dark]*).
- SIGUSR2: switch to the light color theme (*[colors-light]*).
Note: you can send SIGUSR1/SIGUSR2 to a *foot --server* process too,
in which case all client instances will switch theme. Furthermore, all
future client instances will also use the selected theme.
You can also send SIGUSR1/SIGUSR2 to a footclient instance, see
*footclient*(1) for details.
# BUGS
Please report bugs to https://codeberg.org/dnkl/foot/issues
Before you open a new issue, please search existing bug reports, both
open and closed ones. Chances are someone else has already reported
the same issue.
The report should contain the following:
- Foot version (*foot --version*).
- Log output from foot (run *foot -d info* from another terminal).
- Which Wayland compositor (and version) you are running.
- If reporting a crash, please try to provide a *bt full* backtrace
with symbols.
- Steps to reproduce. The more details the better.
# IRC
\#foot on irc.libera.chat
# SEE ALSO
*foot.ini*(5), *footclient*(1)

2166
doc/foot.ini.5.scd Normal file

File diff suppressed because it is too large Load diff

214
doc/footclient.1.scd Normal file
View file

@ -0,0 +1,214 @@
footclient(1)
# NAME
footclient - start new terminals in a foot server
# SYNOPSIS
*footclient* [_OPTIONS_]++
*footclient* [_OPTIONS_] <_command_> [_COMMAND OPTIONS_]
All trailing (non-option) arguments are treated as a command, and its
arguments, to execute (instead of the default shell).
# DESCRIPTION
*footclient* is used together with *foot*(1) in *--server*
mode.
Running it without arguments will open a new terminal window (hosted
in the foot server), with your default shell. The exit code will be
that of the terminal. I.e *footclient* does not exit until the
terminal has terminated.
# OPTIONS
*-t*,*--term*=_TERM_
Value to set the environment variable *TERM* to (see *TERMINFO*
and *ENVIRONMENT*). Default: _@default_terminfo@_.
*-T*,*--title*=_TITLE_
Initial window title. Default: _foot_.
*-a*,*--app-id*=_ID_
Value to set the *app-id* property on the Wayland window
to. Default: _foot_ (normal mode), or _footclient_ (server mode).
*toplevel-tag*=_TAG_
Value to set the *toplevel-tag* property on the Wayland window
to. The compositor can use this value for session management,
window rules etc. Default: _not set_
*-w*,*--window-size-pixels*=_WIDTHxHEIGHT_
Set initial window width and height, in pixels. Default: _700x500_.
*-W*,*--window-size-chars*=_WIDTHxHEIGHT_
Set initial window width and height, in characters. Default: _not set_.
*-m*,*--maximized*
Start in maximized mode. If both *--maximized* and *--fullscreen*
are specified, the _last_ one takes precedence.
*-F*,*--fullscreen*
Start in fullscreen mode. If both *--maximized* and *--fullscreen*
are specified, the _last_ one takes precedence.
*-L*,*--login-shell*
Start a login shell, by prepending a '-' to argv[0].
*-D*,*--working-directory*=_DIR_
Initial working directory for the client application. Default:
_CWD of footclient_.
*-s*,*--server-socket*=_PATH_
Connect to _PATH_ instead of
*$XDG\_RUNTIME\_DIR/foot-$WAYLAND\_DISPLAY.sock*.
*-H*,*--hold*
Remain open after child process exits.
*-N*,*--no-wait*
Detach the client process from the running terminal, exiting
immediately.
*-o*,*--override*=[_SECTION_.]_KEY_=_VALUE_
Override an option set in the configuration file. If _SECTION_ is not
given, defaults to _main_.
*-E*,*--client-environment*
The child process in the new terminal instance will use
footclient's environment, instead of the server's.
Environment variables listed in the *Variables set in the child
process* section will be overwritten by the foot server. For
example, the new terminal will use *TERM* from the configuration,
not footclient's environment.
*-d*,*--log-level*={*info*,*warning*,*error*,*none*}
Log level, used both for log output on stderr as well as
syslog. Default: _warning_.
*-l*,*--log-colorize*=[{*never*,*always*,*auto*}]
Enables or disables colorization of log output on stderr.
*-v*,*--version*
Show the version number and quit
*-e*
Ignored; for compatibility with *xterm -e*. See *foot*(1) for more
details.
# EXIT STATUS
Footclient will exit with code 220 if there is a failure in footclient
itself (for example, the server socket does not exist).
If *-N*,*--no-wait* is used, footclient exits with code 0 as soon as
the foot server has been instructed to open a new window.
If not, footclient may also exit with code 230. This indicates a
failure in the foot server.
In all other cases the exit code is that of the client application
(i.e. the shell).
# TERMINFO
Client applications use the terminfo identifier specified by the
environment variable *TERM* (set by foot) to determine terminal
capabilities.
Foot has two terminfo definitions: *foot* and *foot-direct*, with
*foot* being the default.
The difference between the two is in the number of colors they
describe; *foot* describes 256 colors and *foot-direct* 16.7 million
colors (24-bit truecolor).
Note that using the *foot* terminfo does not limit the number of
usable colors to 256; applications can still use 24-bit RGB colors. In
fact, most applications work best with *foot* (including 24-bit
colors)). Using *\*-direct* terminfo entries has been known to crash
some ncurses applications even.
There are however applications that need a *\*-direct* terminfo entry
for 24-bit support. Emacs is one such example.
While using either *foot* or *foot-direct* is strongly recommended, it
is possible to use e.g. *xterm-256color* as well. This can be useful
when remoting to a system where foot's terminfo entries cannot easily
be installed.
Note that terminfo entries can be installed in the user's home
directory. I.e. if you do not have root access, or if there is no
distro package for foot's terminfo entries, you can install foot's
terminfo entries manually, by copying *foot* and *foot-direct* to
*~/.terminfo/f/*.
# ENVIRONMENT
## Variables used by footclient
*XDG\_RUNTIME\_DIR*
Used to construct the default _PATH_ for the *--server-socket*
option, when no explicit argument is given (see above).
*WAYLAND\_DISPLAY*
Used to construct the default _PATH_ for the *--server-socket*
option, when no explicit argument is given (see above).
If the socket at default _PATH_ does not exist, *footclient* will
fallback to the less specific path, with the following priority:
*$XDG\_RUNTIME\_DIR/foot-$WAYLAND\_DISPLAY.sock*,
*$XDG\_RUNTIME\_DIR/foot.sock*, */tmp/foot.sock*.
## Variables set in the child process
*TERM*
terminfo/termcap identifier. This is used by client applications
to determine which capabilities a terminal supports. The value is
set according to either the *--term* command-line option or the
*term* config option in *foot.ini*(5).
*COLORTERM*
This variable is set to *truecolor*, to indicate to client
applications that 24-bit RGB colors are supported.
*PWD*
Current working directory (at the time of launching foot)
*SHELL*
Set to the launched shell, if the shell is valid (it is listed in
*/etc/shells*).
In addition to the variables listed above, custom environment
variables may be defined in *foot.ini*(5).
## Variables *unset* in the child process
*TERM_PROGRAM*
*TERM_PROGRAM_VERSION*
These environment variables are set by certain other terminal
emulators. We unset them, to prevent applications from
misdetecting foot.
In addition to the variables listed above, custom environment
variables to unset may be defined in *foot.ini*(5).
# Signals
The following signals have special meaning in footclient:
- SIGUSR1: switch to the dark color theme (*[colors-dark]*).
- SIGUSR2: switch to the light color theme (*[colors-light]*).
When sending SIGUSR1/SIGUSR2 to a footclient instance, the theme is
changed in that instance only. This is different from when you send
SIGUSR1/SIGUSR2 to the server process, where all instances change the
theme.
Note: for obvious reasons, this is not supported when footclient is
started with *--no-wait*.
# SEE ALSO
*foot*(1)

49
doc/meson.build Normal file
View file

@ -0,0 +1,49 @@
scdoc_prog = find_program(scdoc.get_variable('scdoc'), native: true)
if utmp_backend != 'none'
utmp_add_args = '@0@ $WAYLAND_DISPLAY'.format(utmp_add)
utmp_del_args = (utmp_del_have_argument
? '@0@ $WAYLAND_DISPLAY'.format(utmp_del)
: '@0@'.format(utmp_del))
utmp_path = utmp_default_helper_path
else
utmp_add_args = '<no utmp support in foot>'
utmp_del_args = '<no utmp support in foot>'
utmp_path = 'none'
endif
conf_data = configuration_data(
{
'default_terminfo': get_option('default-terminfo'),
'utmp_backend': utmp_backend,
'utmp_add_args': utmp_add_args,
'utmp_del_args': utmp_del_args,
'utmp_helper_path': utmp_path,
}
)
foreach man_src : [{'name': 'foot', 'section' : 1},
{'name': 'foot.ini', 'section': 5},
{'name': 'footclient', 'section': 1},
{'name': 'foot-ctlseqs', 'section': 7}]
name = man_src['name']
section = man_src['section']
out = '@0@.@1@'.format(name, section)
preprocessed = configure_file(
input: '@0@.@1@.scd'.format(name, section),
output: '@0@.preprocessed'.format(out),
configuration: conf_data,
)
custom_target(
out,
output: out,
input: preprocessed,
command: scdoc_prog.full_path(),
capture: true,
feed: true,
install: true,
install_dir: join_paths(get_option('mandir'), 'man@0@'.format(section)))
endforeach

BIN
doc/sixel-tux-foot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 KiB

BIN
doc/tux-foot-ok.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 KiB