Silkie configuration¶
Silkie reads silkie.conf from its own configuration directory, normally
~/.config/silkie/. It does not automatically read kitty’s configuration or
use KITTY_CONFIG_DIRECTORY.
Configuration paths¶
Set SILKIE_CONFIG_DIRECTORY to use a different directory. Otherwise,
Silkie searches for silkie.conf in the following order and uses the first
file whose directory is writable:
$XDG_CONFIG_HOME/silkie/, whenXDG_CONFIG_HOMEis set;~/.config/silkie/;~/Library/Preferences/silkie/on macOS;silkie/under each directory inXDG_CONFIG_DIRS, in order.
If no configuration exists, Silkie creates $XDG_CONFIG_HOME/silkie/ or
~/.config/silkie/. System defaults come from
/etc/xdg/silkie/silkie.conf and are read before the user configuration.
Relative includes, themes, kitten configuration files, and profiles use the
Silkie configuration directory. The Settings window writes settings.conf
there, which is read after silkie.conf.
Use --config /path/to/file.conf to load a file explicitly, or
--config NONE to skip configuration files. To reuse existing kitty settings,
copy them to silkie.conf or add an explicit include, for example:
include ../kitty/kitty.conf
The configuration syntax and inherited settings are described in kitty’s configuration reference. The paths above are specific to Silkie.
Environment variables lists the environment variables that Silkie reads and the ones it sets for the programs running in it.
Quitting on macOS¶
Silkie does not bind Cmd-Q to quit by default. To explicitly enable it,
add this to silkie.conf:
map cmd+q quit
The application menu’s Quit command remains available without a keyboard shortcut unless you configure one.
Function keys on macOS¶
Plain F11 sends ESC [ 23 ~ to a terminal program using legacy key reporting.
Use kitten show-key to see the received event. A shell prompt may have no
visible action bound to it. If macOS reserves F11 for Show Desktop, either
change that shortcut in System Settings → Keyboard → Keyboard Shortcuts →
Mission Control, or start Silkie with --grab-keyboard to request system
shortcuts while it is frontmost. macOS may require Accessibility permission
for the latter. On media-first keyboards, use Fn-F11 for the function key.
Spatial display¶
On macOS, View → Spatial Display switches between ordinary rendering,
stereo content that follows the head, and an anchored terminal wall. Settings
place XREAL 1S support under Experimental and untested, disabled by default.
Enable experimental_xreal_1s yes to use side-by-side output or XREAL tracking.
Red/blue output without tracking does not require that opt-in. Spatial settings
include side-by-side and red/blue output, independent positive and negative
divergence limits, and a 2^X divergence multiplier with X from -6 to 6 in
0.1 steps. Fractional pixel depth scales with the physical eye resolution,
including Retina backing scale. Negative divergence and vertical phase are
disabled by default and require explicit user configuration. Applications
can assign depth to text and graphics while leaving unmarked content flat.
See Spatial display and depth for XREAL setup, configuration, the optional text
attribute, and current tracking support.
Numeric controls enforce the setting’s domain: opacity stays within its documented range, dimensions and durations are nonnegative, and documented negative sentinels and signed scroll multipliers remain available. Cursor HDR brightness and HDR headroom start at 1× and step by 0.1, with no invented upper bound. Composite values retain their complete text rather than losing optional parameters to a numeric widget.
SSH agent forwarding¶
Set ssh_agent_forwarding yes to offer the local SSH agent over the terminal
channel. Odin Seat and Skiff can keep a stable SSH_AUTH_SOCK while the
provider follows the attached terminal. See SSH agent transport for
permissions, connection lifetime, fallback behavior, and protocol details.
The option defaults and descriptions below come from Silkie’s configuration definitions.
E-paper and color switching¶
Silkie knows which monitor each window is on, and treats a window on an
e-paper monitor as such, even when the operating system thinks it is an
ordinary display, as it does for every e-paper monitor seen so far. It knows
some e-paper monitors by the model in their EDID, never by serial number
(among them the ONYX BOOX Mira and Mira Pro, several DASUNG Paperlike models
and the Modos Glider). Declare any other
with monitor_info in silkie.conf, by its model, connector, EDID
manufacturer and product code, or a part of its description:
monitor_info MIRA253 kind=eink color=gray bits=4
monitor_info "OBX:0x0011" kind=eink color=gray
monitor_info DP-7 kind=eink color=rgb
kitten @ ls shows what Silkie knows of the monitor of each OS window, under
display, and silkie --debug-rendering logs it when a window moves to
another monitor. Use monitor-identifiers.py
to list connected monitor IDs on macOS or Linux for a monitor_info entry.
What follows applies to the windows on that monitor only: a window dragged to an ordinary monitor looks and behaves as usual again once it has stayed there for a moment, and comes back when it returns.
E-paper (kind=eink) and gray (color=gray or mono) are independent,
as there is color e-paper:
On e-paper, which ghosts when it changes, the cursor and blinking text do not blink, there is no cursor trail, animated images stay on the frame they show, an indeterminate progress bar stands still, a keyboard scroll jumps rather than glides and the output is not dithered, since dither shows as grain that ghosts. Silkie submits at most ten frames per second for each e-paper window. Programs are told
kind=einkthrough the Display protocol, so that they can avoid animation and frequent redraws themselves.E-paper and grayscale displays use a high-contrast text palette over the colors of themes, profiles,
launch --color, sessions and programs. For grayscale displays without e-paper mode,color_scheme darkselects white on black and other settings use black on white. A grayscale monitor reduces images to its own levels of gray.
To treat every window as on e-paper whatever its monitor, add:
eink_mode yes
With it a display whose colors nothing declares, in Silkie’s table,
monitor_info or display_info, is taken to show gray, so a color
e-paper monitor needs its colors declared, for example
monitor_info "<its model>" kind=eink color=rgb or display_info color=rgb.
In Settings → Appearance → Color scheme → E-ink color scheme, choose light (default),
dark, follow OS, or invert OS. The equivalent configuration option is
eink_color_scheme. Follow and invert both use light when the OS
does not report a preference. This choice applies to color and monochrome
e-paper. Press ctrl+shift+f12 to switch the color scheme for ordinary
displays. Press
ctrl+shift+alt+f12 to toggle eink_mode. These shortcuts use
kitty_mod (by default ctrl+shift). The actions are also available from
the command palette. To choose your own shortcuts:
map f6 set_color_scheme toggle
map f7 set_eink_mode toggle
Use color_scheme light or color_scheme dark for a persistent color
choice on ordinary displays. set_color_scheme auto returns to configured colors
and automatic themes. Explicit light and dark choices take precedence over
automatic themes and OS appearance changes. Reloading the configuration
restores the saved choices.
With color_scheme auto, Silkie follows the OS appearance: it uses
dark-theme.auto.conf, light-theme.auto.conf or
no-preference-theme.auto.conf from the Silkie config directory when
present. With automatic_light_theme yes and no light theme file, a light
OS appearance selects a built-in light theme, as long as silkie.conf
sets no colors of its own; by default the colors stay as configured. To
customize the built-in theme, copy builtin-light-theme.conf from the
Silkie package to light-theme.auto.conf. Colors from profiles, launch --color, the
ssh kitten and programs stay on top of any theme. The black on white of a gray
display shows over all of them.
Programs can read the desktop preference from the appearance field of
the Display protocol. A change asks programs to redraw, even when the
terminal has an explicit theme.
display_info declares properties of every display that only change what
programs are told, for example display_info kind=eink reports e-paper
without changing anything Silkie does.
Minimum contrast¶
minimum_contrast works like iTerm2’s Minimum contrast: it makes text that is
too close to its background readable, such as the dark ANSI blue of ls on a
machine reached over ssh, on a black background. It is a percentage from 0
(off) to 100: the smallest difference in lightness allowed between text and its
background. Closer text keeps its hue and becomes lighter or darker, colors
that already stand out are not changed, and 100 leaves only black and white
text:
minimum_contrast 40
It can differ per terminal: set it in a profile, for a tab in a session file
with minimum_contrast 40, for a window with launch --minimum-contrast 40,
or at runtime with kitten @ set-minimum-contrast 40 (--match-tab for a
whole tab, default to remove the setting). A window’s own setting wins over
its tab’s, then its profile’s, then the option. Block elements, shades and
Powerline separators are left alone, since programs draw pictures with them.
On e-paper and grayscale displays it is what keeps colored text visible.
Display channel precision¶
The Display protocol reports whether output is RGB, grayscale, or black-and-white, and the precision of each active channel. System-reported framebuffer precision does not prove physical panel precision or calibration. For a panel whose capabilities the system cannot report, declare them:
display_info color=rgb red_bits=5 green_bits=6 blue_bits=5
Use display_info color=gray gray_bits=4 for sixteen gray levels, or
display_info color=mono for black and white. The report identifies these
values as configured and uses zero for unknown widths. The display protocol
documents the query, replies, subscriptions, and platform detection limits.
When the user changes the terminal’s color scheme, profile colors, or output
color capabilities, Silkie asks applications to redraw as it does after a
window resize: it sends SIGWINCH to each affected terminal’s foreground
process group. Applications subscribed to in-band resize notifications also
receive the usual resize report, with the current dimensions even if they have
not changed. Existing color-scheme and display subscriptions keep working.
Moving a window between outputs can change the color model, channel precision, gamut, or HDR headroom and trigger the same redraw. Refresh-rate changes alone do not. Application-issued palette changes through OSC escape sequences do not send resize notifications, so an application’s own redraw cannot cause a palette-change redraw loop.
Fonts and CJK text¶
Silkie’s default font_family is Iosevka. Install Iosevka and, for the
serif role, Iosevka Slab. See Font selection protocol for protocol selection,
font installation links and CJK behavior. Font files are not bundled.
font_roleRepeatable role-to-font mappings, using kitty’s font specification syntax. The defaults are
sans Iosevkaandserif Iosevka Slab.defaultis reserved forfont_family. Configured roles can carry features and variable-axis settings, and there is no fixed role count.cjk_fontDefault:
auto. Prefer regional Sarasa Term, Noto Sans CJK or Noto Sans Mono CJK, then regional system fonts and platform glyph fallback. An explicit font specification overrides that preference.cjk_font_localeDefault:
auto. Choosejp,kr,sc,tcorhkfor regional CJK glyph forms. Automatic selection follows the process locale, defaulting toscwhen unspecified.
Input limits¶
These limits apply to data a program writes to the terminal. Each one is a
maximum. 0, the default, means there is no limit. Set one only to contain
a program that tries to exhaust memory or time. Goblin View uses
csi-limit and escape-limit. Goblin Skiff uses --csi-limit,
--escape-limit and --vector-depth-limit. The dash, raster and curve
limits apply when Silkie rasterizes a vector image.
csi_limitThe maximum number of bytes in one CSI sequence, everything after
ESC [up to and including its final byte. A longer sequence is ignored.0means a CSI may be of any length. Cursor motion and editing that name a count are still clamped to the screen.escape_limitThe maximum number of bytes in one OSC, APC, DCS, PM or SOS sequence, not counting its introducer and terminator. A longer sequence is discarded.
0means these sequences may be of any length. Clipboard writes are still bounded byclipboard_max_size.vector_depth_limitThe maximum number of groups a vector element may be nested inside. Deeper elements are not drawn.
0means any depth. A cycle in the parent chain is rejected either way.vector_dash_limitThe maximum number of dash boundaries stroked for one path. A path that would need more is drawn solid.
0means every dash is stroked.vector_raster_limitThe maximum number of pixels in the raster of one vector image. A larger requested size is scaled down to fit.
0means the image is rasterized at the size it is shown.vector_curve_limitThe maximum number of line segments used to flatten one curve or circle.
0means as many segments as the flattening error asks for.
Find in terminal output¶
Choose Edit → Find → Find… to search the visible text and scrollback of
the active pane. On macOS, press Cmd+F. Use Find Next or press
Enter in the search field to move toward older output. Find Previous
or Shift+Enter moves toward newer output. Use Selection for Find
searches for the selected text. Matches may cross soft wraps.
Set find_match_foreground and find_match_background for all matches,
and find_current_foreground and find_current_background for the
selected match.
Compressed scrollback¶
Silkie keeps unlimited scrollback by default, compressed with zstd at level
9: scrollback_lines is unlimited and scrollback_compression
is 9. The two options are independent: a line limit, compression
(none or any zstd level, negative fast levels included) or both.
The newest 2048 lines stay uncompressed. Older lines go, 128 at a time, to a
background thread that encodes them compactly and compresses them, so output
does not wait for compression: benchmark.py measured the same
throughput as uncompressed scrollback. 1.5 million lines of colored log output
take about 49 MB instead of 8.4 GB.
The settings can differ per window and per tab:
a profile can set
scrollback_linesandscrollback_compression;launch --scrollback-lines N --scrollback-compression L(also on alaunchline of a session file) sets them for the new window, and windows opened later in its tab get the same;kitten @ set-scrollback-compression L [--lines N] [--recompress]changes them for the matched windows, or with--match-tabfor tabs, including windows opened in them later.--recompressalso recompresses what is already compressed, in the background.
A new level applies to lines compressed from then on. With unlimited
scrollback the scrollback pager history (scrollback_pager_history_size)
receives nothing, as no line ever leaves the scrollback.
- scrollback_lines¶
Set the line limit for new panes. The default is
unlimited.
- scrollback_compression¶
Set the zstd level for new panes. The default is
9. Usenoneto keep every line uncompressed.
- hdr¶
Default:
detect.Allow colors brighter than SDR white on HDR displays. Normal (SDR) content is rendered exactly as it is with this option off, HDR only adds extra brightness requested by programs via the HDR brightness protocol, by
cursor_brightnessand by HDR images. The default,detect, keeps HDR enabled on displays where it is available without switching display modes: EDR-capable displays on macOS, including built-in MacBook displays, and displays already offering HDR headroom on Wayland. This follows the display as the window moves between screens.nodisables HDR.autoenables the extended range only while something brighter than SDR white is on screen;alwayskeeps it enabled regardless of display detection. Silkie does not switch a display into HDR mode; an external display that requires this must be enabled in the system’s display settings. Restart Silkie after changing this option. Supported on macOS, and on Wayland where the compositor implements color management and the graphics driver has floating point window surfaces, see HDR brightness protocol.
- hdr_max_headroom¶
Default:
4.0.The maximum brightness, as a multiple of SDR white, that Silkie will use for HDR content. The display may offer more headroom than this, particularly at low brightness settings, but very bright text is unpleasant to look at. Requests for more brightness are clamped to this value. The display’s own limit always applies.
- cursor_brightness¶
Default:
1.0.The brightness of the block cursor as a multiple of SDR white, so
2.0makes it twice as bright as normal white text. Values above one only take effect on an HDR display withhdrenabled, otherwise the cursor is rendered as usual. See HDR brightness protocol. The minimum is 1.0. Settings increases or decreases this multiplier in steps of 0.1.
- wayland_colorspace¶
Default:
srgb.The colorspace OS windows are drawn in on Wayland. With the default of
srgba window is what it always was. Withdisplayp3orrec2020the compositor is told the window is in that wider gamut, and colors and images that a program tags with a wide gamut, see Wide gamut colors, are shown in it rather than being clipped to sRGB.autopicks the widest of the three that the display the window is on can show in full. Everything that is not tagged with a gamut is sRGB and keeps its appearance, unlike withmacos_colorspace. This needs a compositor that implements color management, on any other the window stays sRGB. A wide window is drawn with one extra pass over its pixels.
- eink_mode¶
Default:
no.Treat every Silkie window as being on e-paper, whatever monitor it is on. Usually this is not needed: Silkie recognizes the e-paper monitors in its built-in table, and
monitor_infodeclares others, for the windows on that monitor only, so that a window moved to an ordinary monitor looks ordinary again.A window on e-paper reports
kind=einkthrough the display protocol and avoids what makes such a panel ghost: the cursor and text do not blink, there is no cursor trail, animated images stay on the frame they show, an indeterminate progress bar does not move, keyboard scrolling jumps rather than glides, and the output is not dithered. For nowcustom_shaders, the visual bell andpixel_scrollstay as configured. Silkie submits at most ten frames per second on e-paper. Images are reduced to the levels of gray by the monitor. Theeink_color_schemesetting chooses the foreground and background on both color and monochrome e-paper. With this option a display whose colors nothing declares, in the built-in table,monitor_infoordisplay_info, is taken to show gray, as before. For color e-paper declare its colors, for exampledisplay_info color=rgb.Switch at runtime with
set_eink_mode yes,noortoggle; the default shortcut isctrl+shift+alt+f12. Display subscribers receive the change. Reloading the configuration restores the configured setting. This option takes precedence overkind=...indisplay_infoandmonitor_info.
- eink_color_scheme¶
Default:
light.Color scheme for windows on e-paper. Choose
lightfor black on white,darkfor white on black,follow_osto follow the desktop, orinvert_osto use the opposite desktop appearance. When the desktop has no preference, both OS-based choices use light. The setting applies to both monochrome and color e-paper and is available under Color scheme in Settings.
- monitor_info¶
Default: empty (no overrides).
Properties of one monitor that the operating system cannot report, for the windows on that monitor. The first word selects the monitor, quoted when it has spaces, and the rest are
key=valuepairs with the keys ofdisplay_info:monitor_info MIRA253 kind=eink color=gray bits=4 monitor_info "OBX:0x0011" kind=eink color=gray monitor_info DP-7 kind=eink color=rgb
A monitor is selected by its EDID manufacturer ID and product code as
MFG:PRODUCT, with the product code in decimal or in hex with0x, orMFG:*for every product of the manufacturer; or else by its model (the name the system gives, or the EDID name descriptor), the name of its connector, such asDP-7, or its make, each compared whole and without regard to case; or by a part of the description the system gives of it. Serial numbers are not used, as they say whose monitor it is.kitten @ lsshows these for the monitor of each OS window, andsilkie --debug-renderinglogs them when a window moves to another monitor.Unlike
display_info, which only changes what programs are told, this changes what Silkie does: a monitor declaredkind=einkgets the e-paper behavior described foreink_mode, and one declaredcolor=grayormonogets a high-contrast palette. The two are independent, so color e-paper iskind=eink color=rgb. Declarations here override the built-in table of e-paper monitors and what the operating system says. Use this option once per monitor; when several lines select a monitor, each key takes its value from the last of them.display_infostill overrides what programs are told.
- color_scheme¶
Default:
auto.Use
lightfor black text on white ordarkfor white text on black. These built-in high contrast schemes also set cursor, selection and tab colors.autouses your configured colors and automatic theme files. E-paper useseink_color_scheme.Switch at runtime with
set_color_scheme light,dark,autoortoggle. The default shortcut isctrl+shift+f12. Changes apply on ordinary displays until the configuration is reloaded. Applications that subscribe to kitty’s color preference notifications are notified.
- display_info¶
Default: empty (no overrides).
Properties of the display that the operating system cannot report, used to answer programs that ask with the display protocol. A space separated list of
key=valuepairs that override what Silkie detects, for example on an e-ink display:display_info kind=eink color=gray bits=4
The keys are
kind(lcd,oled,einkorunknown),color(rgb,grayormono),bits(a common width for all active color channels),red_bits,green_bits,blue_bits,gray_bits,gamut(srgb,p3,rec2020orunknown),headroom,scale,period(refresh period in microseconds) andppi.Individual channel widths override
bitsregardless of order. For RGB565, usecolor=rgb red_bits=5 green_bits=6 blue_bits=5; the report’s legacybitsis then zero because the channels differ. A grayscale display usescolor=gray gray_bits=4for sixteen levels.color=monoalways means one bit; usegrayfor more than two levels.The report identifies declared precision as
configured, and precision from Silkie’s table of monitors asmodel. Detected framebuffer widths are labeledframebuffer, since they do not establish physical panel precision or color calibration. Unknown channel widths are zero.This option applies to every monitor and only changes what programs are told, not what Silkie does;
monitor_infodeclares the properties of one monitor and acts on them.
- tablet_hardware_ids¶
Default:
no.Whether a program may be told the hardware identifiers of pens and tablets with the Tablet pointer protocol: the serial number of a pen, the identifier of its type, and the vendor and product ids of a tablet. A serial number tells whose pen it is, and the program asking may be running on another machine, so by default a program that asks for them with bit
8of the mode is refused: the bit reads back as off and no identifier is sent. Everything else about a pen, a tablet or a pad is reported as before.
- haptic_feedback¶
Default:
yes.Allow programs to play haptic feedback on the trackpad, see Haptic feedback protocol. Only available on macOS.
- high_contrast¶
Default:
auto.The high contrast hint sent to terminal programs.
autofollows the desktop accessibility setting and requests high contrast on e-paper.offandonexplicitly set the hint to 0 or 1.
- differentiate_without_color¶
Default:
auto.The differentiate without color hint sent to terminal programs.
autofollows the macOS accessibility setting and always enables the hint on grayscale and monochrome displays.offandonexplicitly set the hint to 0 or 1.
- magnify_raster_resolution¶
Default:
yes.During accessibility zoom, round the reported raster scale up to a whole number, capped at three times the base size, once a raster image becomes visible. Applications can use resize notifications to send an image at the reported resolution. Set this to
noto save bandwidth by reporting the base pixel size. Silkie scales the available image to the selected zoom level.
- deep_color¶
Default:
always.Draw into a window surface with more than 8 bits per color channel, so that smooth gradients, in images with 16 bits per channel for example, do not band on displays that show more than 256 levels. This does not make anything brighter, that is
hdr. With the default,always, Silkie asks for a deep surface wherever the system has one, and how finely it dithers into it follows the display the window is on, seeoutput_dither.neverkeeps an 8 bit surface, to save memory and bandwidth.What a deep surface costs differs. On Wayland and X11 it has 10 bits per channel and the same 32 bits per pixel as an 8 bit one, so it costs nothing more. Its alpha has at most 2 bits, so a transparent window gets a floating point surface on Wayland, where the graphics driver has one, and stays 8 bit otherwise. On X11 it needs a visual of depth 30. On macOS it is a floating point surface with 16 bits per channel, twice the memory and bandwidth of an 8 bit one, on every screen; on a screen not known to show more than 8 bits it is dithered to 8 bit steps. Set
neverto save that bandwidth. Withmacos_colorspaceset todefaultthe colors are passed to the display unmanaged, which a floating point surface cannot do, so that window stays 8 bit.HDR needs a floating point surface too: while
hdris in use for a window, which with the defaultdetectis whenever it is on an HDR capable screen, such as a MacBook Pro’s, the window has one even withnever, and on macOS switches to and from it, like a resize, as it is moved between screens. Sethdrtonoas well to keep every window 8 bits deep.The surface Silkie actually got, and how it dithers, is reported by the Display protocol as
output_bits,output_typeandoutput_dither. On Wayland and X11 the choice is made for newly created OS windows.
- output_dither¶
Default:
yes.Instead of rounding the colors Silkie computes with more precision than the display shows, such as gradients in images with 16 bits per channel, scaled images and the edges of text, to the nearest step, which shows as bands, add a faint ordered dither, below half a step. Colors that are exactly a step, solid text and backgrounds among them, are left exactly as they are. The step is that of the window surface when it is 8 bits deep. A deeper surface is dithered to the steps of 8 bits unless the system says the display the window is on shows more, since compositors and the system round a deep surface to an 8 bit display without dithering it. Then a 10 bit surface is dithered to its own steps and a floating point one is not dithered at all. The system says so for HDR outputs on Wayland, for screens that support extended dynamic range or report more than 8 bits on macOS, and for screens 30 bits deep on X11. Dithering draws a window through an intermediate image, which costs one more pass over the window for every frame.
- text_flow¶
Default:
right down.The directions of character advance and line advance, respectively. Use two perpendicular directions from right, left, down and up. For traditional vertical Chinese use
down left. Applications can override this per pane using Silkie’s writing direction protocol.