Created
August 27, 2024 04:04
-
-
Save mitchellh/9f2cd3bd67aea7771a0d7d954cb17542 to your computer and use it in GitHub Desktop.
Snapshot of the Ghostty config docs on Aug 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang=""> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="generator" content="pandoc" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> | |
<title>GHOSTTY(5) Version 0.1.0-HEAD+23c92414 | Ghostty terminal emulator configuration file</title> | |
<style> | |
html { | |
line-height: 1.5; | |
font-family: Georgia, serif; | |
font-size: 20px; | |
color: #1a1a1a; | |
background-color: #fdfdfd; | |
} | |
body { | |
margin: 0 auto; | |
max-width: 36em; | |
padding-left: 50px; | |
padding-right: 50px; | |
padding-top: 50px; | |
padding-bottom: 50px; | |
hyphens: auto; | |
overflow-wrap: break-word; | |
text-rendering: optimizeLegibility; | |
font-kerning: normal; | |
} | |
@media (max-width: 600px) { | |
body { | |
font-size: 0.9em; | |
padding: 1em; | |
} | |
h1 { | |
font-size: 1.8em; | |
} | |
} | |
@media print { | |
body { | |
background-color: transparent; | |
color: black; | |
font-size: 12pt; | |
} | |
p, h2, h3 { | |
orphans: 3; | |
widows: 3; | |
} | |
h2, h3, h4 { | |
page-break-after: avoid; | |
} | |
} | |
p { | |
margin: 1em 0; | |
} | |
a { | |
color: #1a1a1a; | |
} | |
a:visited { | |
color: #1a1a1a; | |
} | |
img { | |
max-width: 100%; | |
} | |
h1, h2, h3, h4, h5, h6 { | |
margin-top: 1.4em; | |
} | |
h5, h6 { | |
font-size: 1em; | |
font-style: italic; | |
} | |
h6 { | |
font-weight: normal; | |
} | |
ol, ul { | |
padding-left: 1.7em; | |
margin-top: 1em; | |
} | |
li > ol, li > ul { | |
margin-top: 0; | |
} | |
blockquote { | |
margin: 1em 0 1em 1.7em; | |
padding-left: 1em; | |
border-left: 2px solid #e6e6e6; | |
color: #606060; | |
} | |
code { | |
font-family: Menlo, Monaco, 'Lucida Console', Consolas, monospace; | |
font-size: 85%; | |
margin: 0; | |
} | |
pre { | |
margin: 1em 0; | |
overflow: auto; | |
} | |
pre code { | |
padding: 0; | |
overflow: visible; | |
overflow-wrap: normal; | |
} | |
.sourceCode { | |
background-color: transparent; | |
overflow: visible; | |
} | |
hr { | |
background-color: #1a1a1a; | |
border: none; | |
height: 1px; | |
margin: 1em 0; | |
} | |
table { | |
margin: 1em 0; | |
border-collapse: collapse; | |
width: 100%; | |
overflow-x: auto; | |
display: block; | |
font-variant-numeric: lining-nums tabular-nums; | |
} | |
table caption { | |
margin-bottom: 0.75em; | |
} | |
tbody { | |
margin-top: 0.5em; | |
border-top: 1px solid #1a1a1a; | |
border-bottom: 1px solid #1a1a1a; | |
} | |
th { | |
border-top: 1px solid #1a1a1a; | |
padding: 0.25em 0.5em 0.25em 0.5em; | |
} | |
td { | |
padding: 0.125em 0.5em 0.25em 0.5em; | |
} | |
header { | |
margin-bottom: 4em; | |
text-align: center; | |
} | |
#TOC li { | |
list-style: none; | |
} | |
#TOC ul { | |
padding-left: 1.3em; | |
} | |
#TOC > ul { | |
padding-left: 0; | |
} | |
#TOC a:not(:hover) { | |
text-decoration: none; | |
} | |
code{white-space: pre-wrap;} | |
span.smallcaps{font-variant: small-caps;} | |
div.columns{display: flex; gap: min(4vw, 1.5em);} | |
div.column{flex: auto; overflow-x: auto;} | |
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} | |
ul.task-list{list-style: none;} | |
ul.task-list li input[type="checkbox"] { | |
width: 0.8em; | |
margin: 0 0.8em 0.2em -1.6em; | |
vertical-align: middle; | |
} | |
.display.math{display: block; text-align: center; margin: 0.5rem auto;} | |
</style> | |
<!--[if lt IE 9]> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> | |
<![endif]--> | |
</head> | |
<body> | |
<header id="title-block-header"> | |
<h1 class="title">GHOSTTY(5) Version 0.1.0-HEAD+23c92414 | Ghostty | |
terminal emulator configuration file</h1> | |
</header> | |
<h1 id="name">NAME</h1> | |
<p><strong>ghostty</strong> - Ghostty terminal emulator configuration | |
file</p> | |
<h1 id="description">DESCRIPTION</h1> | |
<p>To configure Ghostty, you must use a configuration file. GUI-based | |
configuration is on the roadmap but not yet supported. The configuration | |
file must be placed at <code>$XDG_CONFIG_HOME/ghostty/config</code>, | |
which defaults to <code>~/.config/ghostty/config</code> if the <a | |
href="https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG | |
environment is not set</a>.</p> | |
<p>The file format is documented below as an example:</p> | |
<pre><code># The syntax is "key = value". The whitespace around the equals doesn't matter. | |
background = 282c34 | |
foreground= ffffff | |
# Blank lines are ignored! | |
keybind = ctrl+z=close_surface | |
keybind = ctrl+d=new_split:right | |
# Colors can be changed by setting the 16 colors of `palette`, which each color | |
# being defined as regular and bold. | |
# | |
# black | |
palette = 0=#1d2021 | |
palette = 8=#7c6f64 | |
# red | |
palette = 1=#cc241d | |
palette = 9=#fb4934 | |
# green | |
palette = 2=#98971a | |
palette = 10=#b8bb26 | |
# yellow | |
palette = 3=#d79921 | |
palette = 11=#fabd2f | |
# blue | |
palette = 4=#458588 | |
palette = 12=#83a598 | |
# purple | |
palette = 5=#b16286 | |
palette = 13=#d3869b | |
# aqua | |
palette = 6=#689d6a | |
palette = 14=#8ec07c | |
# white | |
palette = 7=#a89984 | |
palette = 15=#fbf1c7</code></pre> | |
<p>You can view all available configuration options and their | |
documentation by executing the command | |
<code>ghostty +show-config --default --docs</code>. Note that this will | |
output the full default configuration with docs to stdout, so you may | |
want to pipe that through a pager, an editor, etc.</p> | |
<p>Note: You’ll see a lot of weird blank configurations like | |
<code>font-family =</code>. This is a valid syntax to specify the | |
default behavior (no value). The <code>+show-config</code> outputs it so | |
it’s clear that key is defaulting and also to have something to attach | |
the doc comment to.</p> | |
<p>You can also see and read all available configuration options in the | |
source Config structure. The available keys are the keys verbatim, and | |
their possible values are typically documented in the comments. You also | |
can search for the public config files of many Ghostty users for | |
examples and inspiration.</p> | |
<h2 id="configuration-errors">Configuration Errors</h2> | |
<p>If your configuration file has any errors, Ghostty does its best to | |
ignore them and move on. Configuration errors currently show up in the | |
log. The log is written directly to stderr, so it is up to you to figure | |
out how to access that for your system (for now). On macOS, you can also | |
use the system <code>log</code> CLI utility. See the Mac App section for | |
more information.</p> | |
<h2 id="debugging-configuration">Debugging Configuration</h2> | |
<p>You can verify that configuration is being properly loaded by looking | |
at the debug output of Ghostty. Documentation for how to view the debug | |
output is in the “building Ghostty” section at the end of the | |
README.</p> | |
<p>In the debug output, you should see in the first 20 lines or so | |
messages about loading (or not loading) a configuration file, as well as | |
any errors it may have encountered. Configuration errors are also shown | |
in a dedicated window on both macOS and Linux (GTK). Ghostty does not | |
treat configuration errors as fatal and will fall back to default values | |
for erroneous keys.</p> | |
<p>You can also view the full configuration Ghostty is loading using | |
<code>ghostty +show-config</code> from the command-line. Use the | |
<code>--help</code> flag to additional options for that command.</p> | |
<h1 id="configuration-options">CONFIGURATION OPTIONS</h1> | |
<dl> | |
<dt><code>font-family</code></dt> | |
<dd> | |
<p>The font families to use.</p> | |
<p>You can generate the list of valid values using the CLI:</p> | |
<pre><code>ghostty +list-fonts</code></pre> | |
<p>This configuration can be repeated multiple times to specify | |
preferred fallback fonts when the requested codepoint is not available | |
in the primary font. This is particularly useful for multiple languages, | |
symbolic fonts, etc.</p> | |
<p>The specific styles (bold, italic, bold italic) do not need to be | |
explicitly set. If a style is not set, then the regular style | |
(font-family) will be searched for stylistic variants. If a stylistic | |
variant is not found, Ghostty will use the regular style. This prevents | |
falling back to a different font family just to get a style such as | |
bold. This also applies if you explicitly specify a font family for a | |
style. For example, if you set <code>font-family-bold = FooBar</code> | |
and “FooBar” cannot be found, Ghostty will use whatever font is set for | |
<code>font-family</code> for the bold style.</p> | |
<p>Finally, some styles may be synthesized if they are not supported. | |
For example, if a font does not have an italic style and no alternative | |
italic font is specified, Ghostty will synthesize an italic style by | |
applying a slant to the regular style. If you want to disable these | |
synthesized styles then you can use the <code>font-style</code> | |
configurations as documented below.</p> | |
<p>You can disable styles completely by using the | |
<code>font-style</code> set of configurations. See the documentation for | |
<code>font-style</code> for more information.</p> | |
<p>If you want to overwrite a previous set value rather than append a | |
fallback, specify the value as <code>""</code> (empty string) to reset | |
the list and then set the new values. For example:</p> | |
<pre><code>font-family = "" | |
font-family = "My Favorite Font"</code></pre> | |
<p>Setting any of these as CLI arguments will automatically clear the | |
values set in configuration files so you don’t need to specify | |
<code>--font-family=""</code> before setting a new value. You only need | |
to specify this within config files if you want to clear previously set | |
values in configuration files or on the CLI if you want to clear values | |
set on the CLI.</p> | |
<p>Changing this configuration at runtime will only affect new | |
terminals, i.e. new windows, tabs, etc.</p> | |
</dd> | |
</dl> | |
<p><code>font-family-bold</code></p> | |
<p><code>font-family-italic</code></p> | |
<p><code>font-family-bold-italic</code></p> | |
<dl> | |
<dt><code>font-style</code></dt> | |
<dd> | |
<p>The named font style to use for each of the requested terminal font | |
styles. This looks up the style based on the font style string | |
advertised by the font itself. For example, “Iosevka Heavy” has a style | |
of “Heavy”.</p> | |
<p>You can also use these fields to completely disable a font style. If | |
you set the value of the configuration below to literal | |
<code>false</code> then that font style will be disabled. If the running | |
program in the terminal requests a disabled font style, the regular font | |
style will be used instead.</p> | |
<p>These are only valid if its corresponding font-family is also | |
specified. If no font-family is specified, then the font-style is | |
ignored unless you’re disabling the font style.</p> | |
</dd> | |
</dl> | |
<p><code>font-style-bold</code></p> | |
<p><code>font-style-italic</code></p> | |
<p><code>font-style-bold-italic</code></p> | |
<dl> | |
<dt><code>font-synthetic-style</code></dt> | |
<dd> | |
<p>Control whether Ghostty should synthesize a style if the requested | |
style is not available in the specified font-family.</p> | |
<p>Ghostty can synthesize bold, italic, and bold italic styles if the | |
font does not have a specific style. For bold, this is done by drawing | |
an outline around the glyph of varying thickness. For italic, this is | |
done by applying a slant to the glyph. For bold italic, both of these | |
are applied.</p> | |
<p>Synthetic styles are not perfect and will generally not look as good | |
as a font that has the style natively. However, they are useful to | |
provide styled text when the font does not have the style.</p> | |
<p>Set this to “false” or “true” to disable or enable synthetic styles | |
completely. You can disable specific styles using “no-bold”, | |
“no-italic”, and “no-bold-italic”. You can disable multiple styles by | |
separating them with a comma. For example, “no-bold,no-italic”.</p> | |
<p>Available style keys are: <code>bold</code>, <code>italic</code>, | |
<code>bold-italic</code>.</p> | |
<p>If synthetic styles are disabled, then the regular style will be used | |
instead if the requested style is not available. If the font has the | |
requested style, then the font will be used as-is since the style is not | |
synthetic.</p> | |
<p>Warning! An easy mistake is to disable <code>bold</code> or | |
<code>italic</code> but not <code>bold-italic</code>. Disabling only | |
<code>bold</code> or <code>italic</code> will NOT disable either in the | |
<code>bold-italic</code> style. If you want to disable | |
<code>bold-italic</code>, you must explicitly disable it. You cannot | |
partially disable <code>bold-italic</code>.</p> | |
<p>By default, synthetic styles are enabled.</p> | |
</dd> | |
<dt><code>font-feature</code></dt> | |
<dd> | |
<p>Apply a font feature. This can be repeated multiple times to enable | |
multiple font features. You can NOT set multiple font features with a | |
single value (yet).</p> | |
<p>The font feature will apply to all fonts rendered by Ghostty. A | |
future enhancement will allow targeting specific faces.</p> | |
<p>A valid value is the name of a feature. Prefix the feature with a | |
<code>-</code> to explicitly disable it. Example: <code>ss20</code> or | |
<code>-ss20</code>.</p> | |
<p>To disable programming ligatures, use <code>-calt</code> since this | |
is the typical feature name for programming ligatures. To look into what | |
font features your font has and what they do, use a font inspection tool | |
such as <a href="https://fontdrop.info">fontdrop.info</a>.</p> | |
<p>To generally disable most ligatures, use <code>-calt</code>, | |
<code>-liga</code>, and <code>-dlig</code> (as separate repetitive | |
entries in your config).</p> | |
</dd> | |
<dt><code>font-size</code></dt> | |
<dd> | |
<p>Font size in points. This value can be a non-integer and the nearest | |
integer pixel size will be selected. If you have a high dpi display | |
where 1pt = 2px then you can get an odd numbered pixel size by | |
specifying a half point.</p> | |
<p>For example, 13.5pt @ 2px/pt = 27px</p> | |
<p>Changing this configuration at runtime will only affect new | |
terminals, i.e. new windows, tabs, etc. Note that you may still not see | |
the change depending on your <code>window-inherit-font-size</code> | |
setting. If that setting is true, only the first window will be affected | |
by this change since all subsequent windows will inherit the font size | |
of the previous window.</p> | |
</dd> | |
<dt><code>font-variation</code></dt> | |
<dd> | |
<p>A repeatable configuration to set one or more font variations values | |
for a variable font. A variable font is a single font, usually with a | |
filename ending in <code>-VF.ttf</code> or <code>-VF.otf</code> that | |
contains one or more configurable axes for things such as weight, slant, | |
etc. Not all fonts support variations; only fonts that explicitly state | |
they are variable fonts will work.</p> | |
<p>The format of this is <code>id=value</code> where <code>id</code> is | |
the axis identifier. An axis identifier is always a 4 character string, | |
such as <code>wght</code>. To get the list of supported axes, look at | |
your font documentation or use a font inspection tool.</p> | |
<p>Invalid ids and values are usually ignored. For example, if a font | |
only supports weights from 100 to 700, setting <code>wght=800</code> | |
will do nothing (it will not be clamped to 700). You must consult your | |
font’s documentation to see what values are supported.</p> | |
<p>Common axes are: <code>wght</code> (weight), <code>slnt</code> | |
(slant), <code>ital</code> (italic), <code>opsz</code> (optical size), | |
<code>wdth</code> (width), <code>GRAD</code> (gradient), etc.</p> | |
</dd> | |
</dl> | |
<p><code>font-variation-bold</code></p> | |
<p><code>font-variation-italic</code></p> | |
<p><code>font-variation-bold-italic</code></p> | |
<dl> | |
<dt><code>font-codepoint-map</code></dt> | |
<dd> | |
<p>Force one or a range of Unicode codepoints to map to a specific named | |
font. This is useful if you want to support special symbols or if you | |
want to use specific glyphs that render better for your specific | |
font.</p> | |
<p>The syntax is <code>codepoint=fontname</code> where | |
<code>codepoint</code> is either a single codepoint or a range. | |
Codepoints must be specified as full Unicode hex values, such as | |
<code>U+ABCD</code>. Codepoints ranges are specified as | |
<code>U+ABCD-U+DEFG</code>. You can specify multiple ranges for the same | |
font separated by commas, such as | |
<code>U+ABCD-U+DEFG,U+1234-U+5678=fontname</code>. The font name is the | |
same value as you would use for <code>font-family</code>.</p> | |
<p>This configuration can be repeated multiple times to specify multiple | |
codepoint mappings.</p> | |
<p>Changing this configuration at runtime will only affect new | |
terminals, i.e. new windows, tabs, etc.</p> | |
</dd> | |
<dt><code>font-thicken</code></dt> | |
<dd> | |
<p>Draw fonts with a thicker stroke, if supported. This is only | |
supported currently on MacOS.</p> | |
</dd> | |
<dt><code>adjust-cell-width</code></dt> | |
<dd> | |
<p>All of the configurations behavior adjust various metrics determined | |
by the font. The values can be integers (1, -1, etc.) or a percentage | |
(20%, -15%, etc.). In each case, the values represent the amount to | |
change the original value.</p> | |
<p>For example, a value of <code>1</code> increases the value by 1; it | |
does not set it to literally 1. A value of <code>20%</code> increases | |
the value by 20%. And so on.</p> | |
<p>There is little to no validation on these values so the wrong values | |
(i.e. <code>-100%</code>) can cause the terminal to be unusable. Use | |
with caution and reason.</p> | |
<p>Some values are clamped to minimum or maximum values. This can make | |
it appear that certain values are ignored. For example, the underline | |
position is clamped to the height of a cell. If you set the underline | |
position so high that it extends beyond the bottom of the cell size, it | |
will be clamped to the bottom of the cell.</p> | |
<p><code>adjust-cell-height</code> has some additional behaviors to | |
describe:</p> | |
<ul> | |
<li><p>The font will be centered vertically in the cell.</p></li> | |
<li><p>The cursor will remain the same size as the font.</p></li> | |
<li><p>Powerline glyphs will be adjusted along with the cell height so | |
that things like status lines continue to look aligned.</p></li> | |
</ul> | |
</dd> | |
</dl> | |
<p><code>adjust-cell-height</code></p> | |
<p><code>adjust-font-baseline</code></p> | |
<p><code>adjust-underline-position</code></p> | |
<p><code>adjust-underline-thickness</code></p> | |
<p><code>adjust-strikethrough-position</code></p> | |
<p><code>adjust-strikethrough-thickness</code></p> | |
<p><code>adjust-cursor-thickness</code></p> | |
<dl> | |
<dt><code>grapheme-width-method</code></dt> | |
<dd> | |
<p>The method to use for calculating the cell width of a grapheme | |
cluster. The default value is <code>unicode</code> which uses the | |
Unicode standard to determine grapheme width. This results in correct | |
grapheme width but may result in cursor-desync issues with some programs | |
(such as shells) that may use a legacy method such as | |
<code>wcswidth</code>.</p> | |
<p>Valid values are:</p> | |
<ul> | |
<li><p><code>legacy</code> - Use a legacy method to determine grapheme | |
width, such as wcswidth This maximizes compatibility with legacy | |
programs but may result in incorrect grapheme width for certain | |
graphemes such as skin-tone emoji, non-English characters, etc.</p> | |
<p>This is called “legacy” and not something more specific because the | |
behavior is undefined and we want to retain the ability to modify it. | |
For example, we may or may not use libc <code>wcswidth</code> now or in | |
the future.</p></li> | |
<li><p><code>unicode</code> - Use the Unicode standard to determine | |
grapheme width.</p></li> | |
</ul> | |
<p>If a running program explicitly enables terminal mode 2027, then | |
<code>unicode</code> width will be forced regardless of this | |
configuration. When mode 2027 is reset, this configuration will be used | |
again.</p> | |
<p>This configuration can be changed at runtime but will not affect | |
existing terminals. Only new terminals will use the new | |
configuration.</p> | |
</dd> | |
<dt><code>theme</code></dt> | |
<dd> | |
<p>A theme to use. If the theme is an absolute pathname, Ghostty will | |
attempt to load that file as a theme. If that file does not exist or is | |
inaccessible, an error will be logged and no other directories will be | |
searched.</p> | |
<p>If the theme is not an absolute pathname, two different directories | |
will be searched for a file name that matches the theme. This is case | |
sensitive on systems with case-sensitive filesystems. It is an error for | |
a theme name to include path separators unless it is an absolute | |
pathname.</p> | |
<p>The first directory is the <code>themes</code> subdirectory of your | |
Ghostty configuration directory. This is | |
<code>$XDG_CONFIG_DIR/ghostty/themes</code> or | |
<code>~/.config/ghostty/themes</code>.</p> | |
<p>The second directory is the <code>themes</code> subdirectory of the | |
Ghostty resources directory. Ghostty ships with a multitude of themes | |
that will be installed into this directory. On macOS, this list is in | |
the <code>Ghostty.app/Contents/ Resources/ghostty/themes</code> | |
directory. On Linux, this list is in the | |
<code>share/ ghostty/themes</code> directory (wherever you installed the | |
Ghostty “share” directory.</p> | |
<p>To see a list of available themes, run | |
<code>ghostty +list-themes</code>.</p> | |
<p>Any additional colors specified via background, foreground, palette, | |
etc. will override the colors specified in the theme.</p> | |
</dd> | |
<dt><code>background</code></dt> | |
<dd> | |
<p>Background color for the window.</p> | |
</dd> | |
<dt><code>foreground</code></dt> | |
<dd> | |
<p>Foreground color for the window.</p> | |
</dd> | |
<dt><code>selection-foreground</code></dt> | |
<dd> | |
<p>The foreground and background color for selection. If this is not | |
set, then the selection color is just the inverted window background and | |
foreground (note: not to be confused with the cell bg/fg).</p> | |
</dd> | |
</dl> | |
<p><code>selection-background</code></p> | |
<dl> | |
<dt><code>selection-invert-fg-bg</code></dt> | |
<dd> | |
<p>Swap the foreground and background colors of cells for selection. | |
This option overrides the <code>selection-foreground</code> and | |
<code>selection-background</code> options.</p> | |
<p>If you select across cells with differing foregrounds and | |
backgrounds, the selection color will vary across the selection.</p> | |
</dd> | |
<dt><code>minimum-contrast</code></dt> | |
<dd> | |
<p>The minimum contrast ratio between the foreground and background | |
colors. The contrast ratio is a value between 1 and 21. A value of 1 | |
allows for no contrast (i.e. black on black). This value is the contrast | |
ratio as defined by the <a href="https://www.w3.org/TR/WCAG20/">WCAG 2.0 | |
specification</a>.</p> | |
<p>If you want to avoid invisible text (same color as background), a | |
value of 1.1 is a good value. If you want to avoid text that is | |
difficult to read, a value of 3 or higher is a good value. The higher | |
the value, the more likely that text will become black or white.</p> | |
<p>This value does not apply to Emoji or images.</p> | |
</dd> | |
<dt><code>palette</code></dt> | |
<dd> | |
<p>Color palette for the 256 color form that many terminal applications | |
use. The syntax of this configuration is <code>N=HEXCODE</code> where | |
<code>N</code> is 0 to 255 (for the 256 colors in the terminal color | |
table) and <code>HEXCODE</code> is a typical RGB color code such as | |
<code>#AABBCC</code>.</p> | |
<p>For definitions on all the codes <a | |
href="https://www.ditig.com/256-colors-cheat-sheet">see this cheat | |
sheet</a>.</p> | |
</dd> | |
<dt><code>cursor-color</code></dt> | |
<dd> | |
<p>The color of the cursor. If this is not set, a default will be | |
chosen.</p> | |
</dd> | |
<dt><code>cursor-invert-fg-bg</code></dt> | |
<dd> | |
<p>Swap the foreground and background colors of the cell under the | |
cursor. This option overrides the <code>cursor-color</code> and | |
<code>cursor-text</code> options.</p> | |
</dd> | |
<dt><code>cursor-opacity</code></dt> | |
<dd> | |
<p>The opacity level (opposite of transparency) of the cursor. A value | |
of 1 is fully opaque and a value of 0 is fully transparent. A value less | |
than 0 or greater than 1 will be clamped to the nearest valid value. | |
Note that a sufficiently small value such as 0.3 may be effectively | |
invisible and may make it difficult to find the cursor.</p> | |
</dd> | |
<dt><code>cursor-style</code></dt> | |
<dd> | |
<p>The style of the cursor. This sets the default style. A running | |
program can still request an explicit cursor style using escape | |
sequences (such as <code>CSI q</code>). Shell configurations will often | |
request specific cursor styles.</p> | |
<p>Note that shell integration will automatically set the cursor to a | |
bar at a prompt, regardless of this configuration. You can disable that | |
behavior by specifying | |
<code>shell-integration-features = no-cursor</code> or disabling shell | |
integration entirely.</p> | |
<p>Valid values are:</p> | |
<ul> | |
<li><code>block</code></li> | |
<li><code>bar</code></li> | |
<li><code>underline</code></li> | |
<li><code>block_hollow</code></li> | |
</ul> | |
</dd> | |
<dt><code>cursor-style-blink</code></dt> | |
<dd> | |
<p>Sets the default blinking state of the cursor. This is just the | |
default state; running programs may override the cursor style using | |
<code>DECSCUSR</code> (<code>CSI q</code>).</p> | |
<p>If this is not set, the cursor blinks by default. Note that this is | |
not the same as a “true” value, as noted below.</p> | |
<p>If this is not set at all (<code>null</code>), then Ghostty will | |
respect DEC Mode 12 (AT&T cursor blink) as an alternate approach to | |
turning blinking on/off. If this is set to any value other than null, | |
DEC mode 12 will be ignored but <code>DECSCUSR</code> will still be | |
respected.</p> | |
<p>Valid values are:</p> | |
<ul> | |
<li>`` (blank)</li> | |
<li><code>true</code></li> | |
<li><code>false</code></li> | |
</ul> | |
</dd> | |
<dt><code>cursor-text</code></dt> | |
<dd> | |
<p>The color of the text under the cursor. If this is not set, a default | |
will be chosen.</p> | |
</dd> | |
<dt><code>cursor-click-to-move</code></dt> | |
<dd> | |
<p>Enables the ability to move the cursor at prompts by using | |
<code>alt+click</code> on Linux and <code>option+click</code> on | |
macOS.</p> | |
<p>This feature requires shell integration (specifically prompt marking | |
via <code>OSC 133</code>) and only works in primary screen mode. | |
Alternate screen applications like vim usually have their own version of | |
this feature but this configuration doesn’t control that.</p> | |
<p>It should be noted that this feature works by translating your | |
desired position into a series of synthetic arrow key movements, so some | |
weird behavior around edge cases are to be expected. This is | |
unfortunately how this feature is implemented across terminals because | |
there isn’t any other way to implement it.</p> | |
</dd> | |
<dt><code>mouse-hide-while-typing</code></dt> | |
<dd> | |
<p>Hide the mouse immediately when typing. The mouse becomes visible | |
again when the mouse is used. The mouse is only hidden if the mouse | |
cursor is over the active terminal surface.</p> | |
</dd> | |
<dt><code>mouse-shift-capture</code></dt> | |
<dd> | |
<p>Determines whether running programs can detect the shift key pressed | |
with a mouse click. Typically, the shift key is used to extend mouse | |
selection.</p> | |
<p>The default value of <code>false</code> means that the shift key is | |
not sent with the mouse protocol and will extend the selection. This | |
value can be conditionally overridden by the running program with the | |
<code>XTSHIFTESCAPE</code> sequence.</p> | |
<p>The value <code>true</code> means that the shift key is sent with the | |
mouse protocol but the running program can override this behavior with | |
<code>XTSHIFTESCAPE</code>.</p> | |
<p>The value <code>never</code> is the same as <code>false</code> but | |
the running program cannot override this behavior with | |
<code>XTSHIFTESCAPE</code>. The value <code>always</code> is the same as | |
<code>true</code> but the running program cannot override this behavior | |
with <code>XTSHIFTESCAPE</code>.</p> | |
<p>If you always want shift to extend mouse selection even if the | |
program requests otherwise, set this to <code>never</code>.</p> | |
<p>Valid values are:</p> | |
<ul> | |
<li><code>true</code></li> | |
<li><code>false</code></li> | |
<li><code>always</code></li> | |
<li><code>never</code></li> | |
</ul> | |
</dd> | |
<dt><code>mouse-scroll-multiplier</code></dt> | |
<dd> | |
<p>Multiplier for scrolling distance with the mouse wheel. Any value | |
less than 0.01 or greater than 10,000 will be clamped to the nearest | |
valid value.</p> | |
<p>A value of “1” (default) scrolls te default amount. A value of “2” | |
scrolls double the default amount. A value of “0.5” scrolls half the | |
default amount. Et cetera.</p> | |
</dd> | |
<dt><code>background-opacity</code></dt> | |
<dd> | |
<p>The opacity level (opposite of transparency) of the background. A | |
value of 1 is fully opaque and a value of 0 is fully transparent. A | |
value less than 0 or greater than 1 will be clamped to the nearest valid | |
value.</p> | |
</dd> | |
<dt><code>background-blur-radius</code></dt> | |
<dd> | |
<p>A positive value enables blurring of the background when | |
background-opacity is less than 1. The value is the blur radius to | |
apply. A value of 20 is reasonable for a good looking blur. Higher | |
values will cause strange rendering issues as well as performance | |
issues.</p> | |
<p>This is only supported on macOS.</p> | |
</dd> | |
<dt><code>unfocused-split-opacity</code></dt> | |
<dd> | |
<p>The opacity level (opposite of transparency) of an unfocused split. | |
Unfocused splits by default are slightly faded out to make it easier to | |
see which split is focused. To disable this feature, set this value to | |
1.</p> | |
<p>A value of 1 is fully opaque and a value of 0 is fully transparent. | |
Because “0” is not useful (it makes the window look very weird), the | |
minimum value is 0.15. This value still looks weird but you can at least | |
see what’s going on. A value outside of the range 0.15 to 1 will be | |
clamped to the nearest valid value.</p> | |
</dd> | |
<dt><code>unfocused-split-fill</code></dt> | |
<dd> | |
<p>The color to dim the unfocused split. Unfocused splits are dimmed by | |
rendering a semi-transparent rectangle over the split. This sets the | |
color of that rectangle and can be used to carefully control the dimming | |
effect.</p> | |
<p>This will default to the background color.</p> | |
</dd> | |
<dt><code>command</code></dt> | |
<dd> | |
<p>The command to run, usually a shell. If this is not an absolute path, | |
it’ll be looked up in the <code>PATH</code>. If this is not set, a | |
default will be looked up from your system. The rules for the default | |
lookup are:</p> | |
<ul> | |
<li><p><code>SHELL</code> environment variable</p></li> | |
<li><p><code>passwd</code> entry (user information)</p></li> | |
</ul> | |
<p>This can contain additional arguments to run the command with. If | |
additional arguments are provided, the command will be executed using | |
<code>/bin/sh -c</code>. Ghostty does not do any shell command | |
parsing.</p> | |
<p>If you’re using the <code>ghostty</code> CLI there is also a shortcut | |
to run a command with arguments directly: you can use the | |
<code>-e</code> flag. For example: | |
<code>ghostty -e fish --with --custom --args</code>. The <code>-e</code> | |
flag also automatically sets <code>gtk-single-instance = false</code> | |
(no matter what) to ensure that a new instance is launched and the CLI | |
args are respected.</p> | |
</dd> | |
<dt><code>wait-after-command</code></dt> | |
<dd> | |
<p>If true, keep the terminal open after the command exits. Normally, | |
the terminal window closes when the running command (such as a shell) | |
exits. With this true, the terminal window will stay open until any | |
keypress is received.</p> | |
<p>This is primarily useful for scripts or debugging.</p> | |
</dd> | |
<dt><code>abnormal-command-exit-runtime</code></dt> | |
<dd> | |
<p>The number of milliseconds of runtime below which we consider a | |
process exit to be abnormal. This is used to show an error message when | |
the process exits too quickly.</p> | |
<p>On Linux, this must be paired with a non-zero exit code. On macOS, we | |
allow any exit code because of the way shell processes are launched via | |
the login command.</p> | |
</dd> | |
<dt><code>scrollback-limit</code></dt> | |
<dd> | |
<p>The size of the scrollback buffer in bytes. This also includes the | |
active screen. No matter what this is set to, enough memory will always | |
be allocated for the visible screen and anything leftover is the limit | |
for the scrollback.</p> | |
<p>When this limit is reached, the oldest lines are removed from the | |
scrollback.</p> | |
<p>Scrollback currently exists completely in memory. This means that the | |
larger this value, the larger potential memory usage. Scrollback is | |
allocated lazily up to this limit, so if you set this to a very large | |
value, it will not immediately consume a lot of memory.</p> | |
<p>This size is per terminal surface, not for the entire | |
application.</p> | |
<p>It is not currently possible to set an unlimited scrollback buffer. | |
This is a future planned feature.</p> | |
<p>This can be changed at runtime but will only affect new terminal | |
surfaces.</p> | |
</dd> | |
<dt><code>link</code></dt> | |
<dd> | |
<p>Match a regular expression against the terminal text and associate | |
clicking it with an action. This can be used to match URLs, file paths, | |
etc. Actions can be opening using the system opener | |
(i.e. <code>open</code> or <code>xdg-open</code>) or executing any | |
arbitrary binding action.</p> | |
<p>Links that are configured earlier take precedence over links that are | |
configured later.</p> | |
<p>A default link that matches a URL and opens it in the system opener | |
always exists. This can be disabled using <code>link-url</code>.</p> | |
<p>TODO: This can’t currently be set!</p> | |
</dd> | |
<dt><code>link-url</code></dt> | |
<dd> | |
<p>Enable URL matching. URLs are matched on hover with control (Linux) | |
or super (macOS) pressed and open using the default system application | |
for the linked URL.</p> | |
<p>The URL matcher is always lowest priority of any configured links | |
(see <code>link</code>). If you want to customize URL matching, use | |
<code>link</code> and disable this.</p> | |
</dd> | |
<dt><code>fullscreen</code></dt> | |
<dd> | |
<p>Start new windows in fullscreen. This setting applies to new windows | |
and does not apply to tabs, splits, etc. However, this setting will | |
apply to all new windows, not just the first one.</p> | |
<p>On macOS, this always creates the window in native fullscreen. | |
Non-native fullscreen is not currently supported with this setting.</p> | |
<p>On macOS, this setting does not work if window-decoration is set to | |
“false”, because native fullscreen on macOS requires window decorations | |
to be set.</p> | |
</dd> | |
<dt><code>title</code></dt> | |
<dd> | |
<p>The title Ghostty will use for the window. This will force the title | |
of the window to be this title at all times and Ghostty will ignore any | |
set title escape sequences programs (such as Neovim) may send.</p> | |
</dd> | |
<dt><code>class</code></dt> | |
<dd> | |
<p>The setting that will change the application class value.</p> | |
<p>This controls the class field of the <code>WM_CLASS</code> X11 | |
property (when running under X11), and the Wayland application ID (when | |
running under Wayland).</p> | |
<p>Note that changing this value between invocations will create new, | |
separate instances, of Ghostty when running with | |
<code>gtk-single-instance=true</code>. See that option for more | |
details.</p> | |
<p>The class name must follow the requirements defined <a | |
href="https://docs.gtk.org/gio/type_func.Application.id_is_valid.html">in | |
the GTK documentation</a>.</p> | |
<p>The default is <code>com.mitchellh.ghostty</code>.</p> | |
<p>This only affects GTK builds.</p> | |
</dd> | |
<dt><code>x11-instance-name</code></dt> | |
<dd> | |
<p>This controls the instance name field of the <code>WM_CLASS</code> | |
X11 property when running under X11. It has no effect otherwise.</p> | |
<p>The default is <code>ghostty</code>.</p> | |
<p>This only affects GTK builds.</p> | |
</dd> | |
<dt><code>working-directory</code></dt> | |
<dd> | |
<p>The directory to change to after starting the command.</p> | |
<p>This setting is secondary to the | |
<code>window-inherit-working-directory</code> setting. If a previous | |
Ghostty terminal exists in the same process, | |
<code>window-inherit-working-directory</code> will take precedence. | |
Otherwise, this setting will be used. Typically, this setting is used | |
only for the first window.</p> | |
<p>The default is <code>inherit</code> except in special scenarios | |
listed next. On macOS, if Ghostty can detect it is launched from launchd | |
(double-clicked) or <code>open</code>, then it defaults to | |
<code>home</code>. On Linux with GTK, if Ghostty can detect it was | |
launched from a desktop launcher, then it defaults to | |
<code>home</code>.</p> | |
<p>The value of this must be an absolute value or one of the special | |
values below:</p> | |
<ul> | |
<li><p><code>home</code> - The home directory of the executing | |
user.</p></li> | |
<li><p><code>inherit</code> - The working directory of the launching | |
process.</p></li> | |
</ul> | |
</dd> | |
<dt><code>keybind</code></dt> | |
<dd> | |
<p>Key bindings. The format is <code>trigger=action</code>. Duplicate | |
triggers will overwrite previously set values.</p> | |
<p>Trigger: <code>+</code>-separated list of keys and modifiers. | |
Example: <code>ctrl+a</code>, <code>ctrl+shift+b</code>, | |
<code>up</code>. Some notes:</p> | |
<ul> | |
<li><p>modifiers cannot repeat, <code>ctrl+ctrl+a</code> is | |
invalid.</p></li> | |
<li><p>modifiers and keys can be in any order, <code>shift+a+ctrl</code> | |
is <em>weird</em>, but valid.</p></li> | |
<li><p>only a single key input is allowed, <code>ctrl+a+b</code> is | |
invalid.</p></li> | |
<li><p>the key input can be prefixed with <code>physical:</code> to | |
specify a physical key mapping rather than a logical one. A physical key | |
mapping responds to the hardware keycode and not the keycode translated | |
by any system keyboard layouts. Example: “ctrl+physical:a”</p></li> | |
</ul> | |
<p>Valid modifiers are <code>shift</code>, <code>ctrl</code> (alias: | |
<code>control</code>), <code>alt</code> (alias: <code>opt</code>, | |
<code>option</code>), and <code>super</code> (alias: <code>cmd</code>, | |
<code>command</code>). You may use the modifier or the alias. When | |
debugging keybinds, the non-aliased modifier will always be used in | |
output.</p> | |
<p>You may also specify multiple triggers separated by <code>></code> | |
to require a sequence of triggers to activate the action. For example, | |
<code>ctrl+a>n=new_window</code> will only trigger the | |
<code>new_window</code> action if the user presses <code>ctrl+a</code> | |
followed separately by <code>n</code>. In other software, this is | |
sometimes called a leader key, a key chord, a key table, etc. There is | |
no hardcoded limit on the number of parts in a sequence.</p> | |
<p>Warning: if you define a sequence as a CLI argument to | |
<code>ghostty</code>, you probably have to quote the keybind since | |
<code>></code> is a special character in most shells. Example: | |
ghostty –keybind=‘ctrl+a>n=new_window’</p> | |
<p>A trigger sequence has some special handling:</p> | |
<ul> | |
<li><p>Ghostty will wait an indefinite amount of time for the next key | |
in the sequence. There is no way to specify a timeout. The only way to | |
force the output of a prefix key is to assign another keybind to | |
specifically output that key | |
(i.e. <code>ctrl+a>ctrl+a=text:foo</code>) or press an unbound key | |
which will send both keys to the program.</p></li> | |
<li><p>If a prefix in a sequence is previously bound, the sequence will | |
override the previous binding. For example, if <code>ctrl+a</code> is | |
bound to <code>new_window</code> and <code>ctrl+a>n</code> is bound | |
to <code>new_tab</code>, pressing <code>ctrl+a</code> will do | |
nothing.</p></li> | |
<li><p>Adding to the above, if a previously bound sequence prefix is | |
used in a new, non-sequence binding, the entire previously bound | |
sequence will be unbound. For example, if you bind | |
<code>ctrl+a>n</code> and <code>ctrl+a>t</code>, and then bind | |
<code>ctrl+a</code> directly, both <code>ctrl+a>n</code> and | |
<code>ctrl+a>t</code> will become unbound.</p></li> | |
</ul> | |
<p>Action is the action to take when the trigger is satisfied. It takes | |
the format <code>action</code> or <code>action:param</code>. The latter | |
form is only valid if the action requires a parameter.</p> | |
<ul> | |
<li><p><code>ignore</code> - Do nothing, ignore the key input. This can | |
be used to black hole certain inputs to have no effect.</p></li> | |
<li><p><code>unbind</code> - Remove the binding. This makes it so the | |
previous action is removed, and the key will be sent through to the | |
child command if it is printable.</p></li> | |
<li><p><code>csi:text</code> - Send a CSI sequence. | |
i.e. <code>csi:A</code> sends “cursor up”.</p></li> | |
<li><p><code>esc:text</code> - Send an escape sequence. | |
i.e. <code>esc:d</code> deletes to the end of the word to the | |
right.</p></li> | |
<li><p><code>text:text</code> - Send a string. Uses Zig string literal | |
syntax. i.e. <code>text:\x15</code> sends Ctrl-U.</p></li> | |
</ul> | |
<p>Some notes for the action:</p> | |
<ul> | |
<li>The parameter is taken as-is after the <code>:</code>. Double quotes | |
or other mechanisms are included and NOT parsed. If you want to send a | |
string value that includes spaces, wrap the entire trigger/action in | |
double quotes. Example: <code>--keybind="up=csi:A B"</code></li> | |
</ul> | |
<p>There are some additional special values that can be specified for | |
keybind:</p> | |
<ul> | |
<li><code>keybind=clear</code> will clear all set keybindings. Warning: | |
this removes ALL keybindings up to this point, including the default | |
keybindings.</li> | |
</ul> | |
<p>A keybind by default causes the input to be consumed. This means that | |
the associated encoding (if any) will not be sent to the running program | |
in the terminal. If you wish to send the encoded value to the program, | |
specify the “unconsumed:” prefix before the entire keybind. For example: | |
“unconsumed:ctrl+a=reload_config”</p> | |
</dd> | |
<dt><code>window-padding-x</code></dt> | |
<dd> | |
<p>Horizontal window padding. This applies padding between the terminal | |
cells and the left and right window borders. The value is in points, | |
meaning that it will be scaled appropriately for screen DPI.</p> | |
<p>If this value is set too large, the screen will render nothing, | |
because the grid will be completely squished by the padding. It is up to | |
you as the user to pick a reasonable value. If you pick an unreasonable | |
value, a warning will appear in the logs.</p> | |
<p>Changing this configuration at runtime will only affect new | |
terminals, i.e. new windows, tabs, etc.</p> | |
<p>To set a different left and right padding, specify two numerical | |
values separated by a comma. For example, | |
<code>window-padding-x = 2,4</code> will set the left padding to 2 and | |
the right padding to 4. If you want to set both paddings to the same | |
value, you can use a single value. For example, | |
<code>window-padding-x = 2</code> will set both paddings to 2.</p> | |
</dd> | |
<dt><code>window-padding-y</code></dt> | |
<dd> | |
<p>Vertical window padding. This applies padding between the terminal | |
cells and the top and bottom window borders. The value is in points, | |
meaning that it will be scaled appropriately for screen DPI.</p> | |
<p>If this value is set too large, the screen will render nothing, | |
because the grid will be completely squished by the padding. It is up to | |
you as the user to pick a reasonable value. If you pick an unreasonable | |
value, a warning will appear in the logs.</p> | |
<p>Changing this configuration at runtime will only affect new | |
terminals, i.e. new windows, tabs, etc.</p> | |
<p>To set a different top and bottom padding, specify two numerical | |
values separated by a comma. For example, | |
<code>window-padding-y = 2,4</code> will set the top padding to 2 and | |
the bottom padding to 4. If you want to set both paddings to the same | |
value, you can use a single value. For example, | |
<code>window-padding-y = 2</code> will set both paddings to 2.</p> | |
</dd> | |
<dt><code>window-padding-balance</code></dt> | |
<dd> | |
<p>The viewport dimensions are usually not perfectly divisible by the | |
cell size. In this case, some extra padding on the end of a column and | |
the bottom of the final row may exist. If this is <code>true</code>, | |
then this extra padding is automatically balanced between all four edges | |
to minimize imbalance on one side. If this is <code>false</code>, the | |
top left grid cell will always hug the edge with zero padding other than | |
what may be specified with the other <code>window-padding</code> | |
options.</p> | |
<p>If other <code>window-padding</code> fields are set and this is | |
<code>true</code>, this will still apply. The other padding is applied | |
first and may affect how many grid cells actually exist, and this is | |
applied last in order to balance the padding given a certain viewport | |
size and grid cell size.</p> | |
</dd> | |
<dt><code>window-padding-color</code></dt> | |
<dd> | |
<p>The color of the padding area of the window. Valid values are:</p> | |
<ul> | |
<li><code>background</code> - The background color specified in | |
<code>background</code>.</li> | |
<li><code>extend</code> - Extend the background color of the nearest | |
grid cell.</li> | |
<li><code>extend-always</code> - Same as “extend” but always extends | |
without applying any of the heuristics that disable extending noted | |
below.</li> | |
</ul> | |
<p>The “extend” value will be disabled in certain scenarios. On primary | |
screen applications (i.e. not something like Neovim), the color will not | |
be extended vertically if any of the following are true:</p> | |
<ul> | |
<li>The nearest row has any cells that have the default background | |
color. The thinking is that in this case, the default background color | |
looks fine as a padding color.</li> | |
<li>The nearest row is a prompt row (requires shell integration). The | |
thinking here is that prompts often contain powerline glyphs that do not | |
look good extended.</li> | |
<li>The nearest row contains a perfect fit powerline character. These | |
don’t look good extended.</li> | |
</ul> | |
</dd> | |
<dt><code>window-vsync</code></dt> | |
<dd> | |
<p>Synchronize rendering with the screen refresh rate. If true, this | |
will minimize tearing and align redraws with the screen but may cause | |
input latency. If false, this will maximize redraw frequency but may | |
cause tearing, and under heavy load may use more CPU and power.</p> | |
<p>This defaults to true because out-of-sync rendering on macOS can | |
cause kernel panics (macOS 14.4+) and performance issues for external | |
displays over some hardware such as DisplayLink. If you want to minimize | |
input latency, set this to false with the known aforementioned | |
risks.</p> | |
<p>Changing this value at runtime will only affect new terminals.</p> | |
<p>This setting is only supported currently on macOS.</p> | |
</dd> | |
<dt><code>window-inherit-working-directory</code></dt> | |
<dd> | |
<p>If true, new windows and tabs will inherit the working directory of | |
the previously focused window. If no window was previously focused, the | |
default working directory will be used (the | |
<code>working-directory</code> option).</p> | |
</dd> | |
<dt><code>window-inherit-font-size</code></dt> | |
<dd> | |
<p>If true, new windows and tabs will inherit the font size of the | |
previously focused window. If no window was previously focused, the | |
default font size will be used. If this is false, the default font size | |
specified in the configuration <code>font-size</code> will be used.</p> | |
</dd> | |
<dt><code>window-decoration</code></dt> | |
<dd> | |
<p>Valid values:</p> | |
<ul> | |
<li><code>true</code></li> | |
<li><code>false</code> - windows won’t have native decorations, | |
i.e. titlebar and borders. On MacOS this also disables tabs and tab | |
overview.</li> | |
</ul> | |
<p>The “toggle_window_decoration” keybind action can be used to create a | |
keybinding to toggle this setting at runtime.</p> | |
<p>Changing this configuration in your configuration and reloading will | |
only affect new windows. Existing windows will not be affected.</p> | |
</dd> | |
<dt><code>window-title-font-family</code></dt> | |
<dd> | |
<p>The font that will be used for the application’s window and tab | |
titles.</p> | |
<p>This is currently only supported on macOS.</p> | |
</dd> | |
<dt><code>window-theme</code></dt> | |
<dd> | |
<p>The theme to use for the windows. Valid values:</p> | |
<ul> | |
<li><code>auto</code> - Determine the theme based on the configured | |
terminal background color.</li> | |
<li><code>system</code> - Use the system theme.</li> | |
<li><code>light</code> - Use the light theme regardless of system | |
theme.</li> | |
<li><code>dark</code> - Use the dark theme regardless of system | |
theme.</li> | |
</ul> | |
<p>On macOS, if <code>macos-titlebar-style</code> is “tabs”, the window | |
theme will be automatically set based on the luminosity of the terminal | |
background color. This only applies to terminal windows. This setting | |
will still apply to non-terminal windows within Ghostty.</p> | |
<p>This is currently only supported on macOS and Linux.</p> | |
</dd> | |
<dt><code>window-colorspace</code></dt> | |
<dd> | |
<p>The colorspace to use for the terminal window. The default is | |
<code>srgb</code> but this can also be set to <code>display-p3</code> to | |
use the Display P3 colorspace.</p> | |
<p>Changing this value at runtime will only affect new windows.</p> | |
<p>This setting is only supported on macOS.</p> | |
</dd> | |
<dt><code>window-height</code></dt> | |
<dd> | |
<p>The initial window size. This size is in terminal grid cells by | |
default. Both values must be set to take effect. If only one value is | |
set, it is ignored.</p> | |
<p>We don’t currently support specifying a size in pixels but a future | |
change can enable that. If this isn’t specified, the app runtime will | |
determine some default size.</p> | |
<p>Note that the window manager may put limits on the size or override | |
the size. For example, a tiling window manager may force the window to | |
be a certain size to fit within the grid. There is nothing Ghostty will | |
do about this, but it will make an effort.</p> | |
<p>Sizes larger than the screen size will be clamped to the screen size. | |
This can be used to create a maximized-by-default window size.</p> | |
<p>This will not affect new tabs, splits, or other nested terminal | |
elements. This only affects the initial window size of any new window. | |
Changing this value will not affect the size of the window after it has | |
been created. This is only used for the initial size.</p> | |
<p>BUG: On Linux with GTK, the calculated window size will not properly | |
take into account window decorations. As a result, the grid dimensions | |
will not exactly match this configuration. If window decorations are | |
disabled (see window-decorations), then this will work as expected.</p> | |
<p>Windows smaller than 10 wide by 4 high are not allowed.</p> | |
</dd> | |
</dl> | |
<p><code>window-width</code></p> | |
<dl> | |
<dt><code>window-save-state</code></dt> | |
<dd> | |
<p>Whether to enable saving and restoring window state. Window state | |
includes their position, size, tabs, splits, etc. Some window state | |
requires shell integration, such as preserving working directories. See | |
<code>shell-integration</code> for more information.</p> | |
<p>There are three valid values for this configuration:</p> | |
<ul> | |
<li><p><code>default</code> will use the default system behavior. On | |
macOS, this will only save state if the application is forcibly | |
terminated or if it is configured systemwide via Settings.app.</p></li> | |
<li><p><code>never</code> will never save window state.</p></li> | |
<li><p><code>always</code> will always save window state whenever | |
Ghostty is exited.</p></li> | |
</ul> | |
<p>If you change this value to <code>never</code> while Ghostty is not | |
running, the next Ghostty launch will NOT restore the window state.</p> | |
<p>If you change this value to <code>default</code> while Ghostty is not | |
running and the previous exit saved state, the next Ghostty launch will | |
still restore the window state. This is because Ghostty cannot know if | |
the previous exit was due to a forced save or not (macOS doesn’t provide | |
this information).</p> | |
<p>If you change this value so that window state is saved while Ghostty | |
is not running, the previous window state will not be restored because | |
Ghostty only saves state on exit if this is enabled.</p> | |
<p>The default value is <code>default</code>.</p> | |
<p>This is currently only supported on macOS. This has no effect on | |
Linux.</p> | |
</dd> | |
<dt><code>window-step-resize</code></dt> | |
<dd> | |
<p>Resize the window in discrete increments of the focused surface’s | |
cell size. If this is disabled, surfaces are resized in pixel | |
increments. Currently only supported on macOS.</p> | |
</dd> | |
<dt><code>window-new-tab-position</code></dt> | |
<dd> | |
<p>The position where new tabs are created. Valid values:</p> | |
<ul> | |
<li><p><code>current</code> - Insert the new tab after the currently | |
focused tab, or at the end if there are no focused tabs.</p></li> | |
<li><p><code>end</code> - Insert the new tab at the end of the tab | |
list.</p></li> | |
</ul> | |
<p>This configuration currently only works with GTK.</p> | |
</dd> | |
<dt><code>resize-overlay</code></dt> | |
<dd> | |
<p>This controls when resize overlays are shown. Resize overlays are a | |
transient popup that shows the size of the terminal while the surfaces | |
are being resized. The possible options are:</p> | |
<ul> | |
<li><code>always</code> - Always show resize overlays.</li> | |
<li><code>never</code> - Never show resize overlays.</li> | |
<li><code>after-first</code> - The resize overlay will not appear when | |
the surface is first created, but will show up if the surface is | |
subsequently resized.</li> | |
</ul> | |
<p>The default is <code>after-first</code>.</p> | |
</dd> | |
<dt><code>resize-overlay-position</code></dt> | |
<dd> | |
<p>If resize overlays are enabled, this controls the position of the | |
overlay. The possible options are:</p> | |
<ul> | |
<li><code>center</code></li> | |
<li><code>top-left</code></li> | |
<li><code>top-center</code></li> | |
<li><code>top-right</code></li> | |
<li><code>bottom-left</code></li> | |
<li><code>bottom-center</code></li> | |
<li><code>bottom-right</code></li> | |
</ul> | |
<p>The default is <code>center</code>.</p> | |
</dd> | |
<dt><code>resize-overlay-duration</code></dt> | |
<dd> | |
<p>If resize overlays are enabled, this controls how long the overlay is | |
visible on the screen before it is hidden. The default is ¾ of a second | |
or 750 ms.</p> | |
<p>The duration is specified as a series of numbers followed by time | |
units. Whitespace is allowed between numbers and units. Each number and | |
unit will be added together to form the total duration.</p> | |
<p>The allowed time units are as follows:</p> | |
<ul> | |
<li><code>y</code> - 365 SI days, or 8760 hours, or 31536000 seconds. No | |
adjustments are made for leap years or leap seconds.</li> | |
<li><code>d</code> - one SI day, or 86400 seconds.</li> | |
<li><code>h</code> - one hour, or 3600 seconds.</li> | |
<li><code>m</code> - one minute, or 60 seconds.</li> | |
<li><code>s</code> - one second.</li> | |
<li><code>ms</code> - one millisecond, or 0.001 second.</li> | |
<li><code>us</code> or <code>µs</code> - one microsecond, or 0.000001 | |
second.</li> | |
<li><code>ns</code> - one nanosecond, or 0.000000001 second.</li> | |
</ul> | |
<p>Examples: * <code>1h30m</code> * <code>45s</code></p> | |
<p>Units can be repeated and will be added together. This means that | |
<code>1h1h</code> is equivalent to <code>2h</code>. This is confusing | |
and should be avoided. A future update may disallow this.</p> | |
<p>The maximum value is | |
<code>584y 49w 23h 34m 33s 709ms 551µs 615ns</code>. Any value larger | |
than this will be clamped to the maximum value.</p> | |
</dd> | |
</dl> | |
<p><code>focus-follows-mouse</code></p> | |
<dl> | |
<dt><code>clipboard-read</code></dt> | |
<dd> | |
<p>Whether to allow programs running in the terminal to read/write to | |
the system clipboard (OSC 52, for googling). The default is to allow | |
clipboard reading after prompting the user and allow writing | |
unconditionally.</p> | |
<p>Valid values are:</p> | |
<ul> | |
<li><code>ask</code></li> | |
<li><code>allow</code></li> | |
<li><code>deny</code></li> | |
</ul> | |
</dd> | |
</dl> | |
<p><code>clipboard-write</code></p> | |
<dl> | |
<dt><code>clipboard-trim-trailing-spaces</code></dt> | |
<dd> | |
<p>Trims trailing whitespace on data that is copied to the clipboard. | |
This does not affect data sent to the clipboard via | |
<code>clipboard-write</code>.</p> | |
</dd> | |
<dt><code>clipboard-paste-protection</code></dt> | |
<dd> | |
<p>Require confirmation before pasting text that appears unsafe. This | |
helps prevent a “copy/paste attack” where a user may accidentally | |
execute unsafe commands by pasting text with newlines.</p> | |
</dd> | |
<dt><code>clipboard-paste-bracketed-safe</code></dt> | |
<dd> | |
<p>If true, bracketed pastes will be considered safe. By default, | |
bracketed pastes are considered safe. “Bracketed” pastes are pastes | |
while the running program has bracketed paste mode enabled (a setting | |
set by the running program, not the terminal emulator).</p> | |
</dd> | |
<dt><code>image-storage-limit</code></dt> | |
<dd> | |
<p>The total amount of bytes that can be used for image data (i.e. the | |
Kitty image protocol) per terminal scren. The maximum value is | |
4,294,967,295 (4GiB). The default is 320MB. If this is set to zero, then | |
all image protocols will be disabled.</p> | |
<p>This value is separate for primary and alternate screens so the | |
effective limit per surface is double.</p> | |
</dd> | |
<dt><code>copy-on-select</code></dt> | |
<dd> | |
<p>Whether to automatically copy selected text to the clipboard. | |
<code>true</code> will only copy on systems that support a selection | |
clipboard.</p> | |
<p>The value <code>clipboard</code> will copy to the system clipboard, | |
making this work on macOS. Note that middle-click will also paste from | |
the system clipboard in this case.</p> | |
<p>Note that if this is disabled, middle-click paste will also be | |
disabled.</p> | |
</dd> | |
<dt><code>click-repeat-interval</code></dt> | |
<dd> | |
<p>The time in milliseconds between clicks to consider a click a repeat | |
(double, triple, etc.) or an entirely new single click. A value of zero | |
will use a platform-specific default. The default on macOS is determined | |
by the OS settings. On every other platform it is 500ms.</p> | |
</dd> | |
<dt><code>config-file</code></dt> | |
<dd> | |
<p>Additional configuration files to read. This configuration can be | |
repeated to read multiple configuration files. Configuration files | |
themselves can load more configuration files. Paths are relative to the | |
file containing the <code>config-file</code> directive. For command-line | |
arguments, paths are relative to the current working directory.</p> | |
<p>Cycles are not allowed. If a cycle is detected, an error will be | |
logged and the configuration file will be ignored.</p> | |
</dd> | |
<dt><code>config-default-files</code></dt> | |
<dd> | |
<p>When this is true, the default configuration file paths will be | |
loaded. The default configuration file paths are currently only the XDG | |
config path ($XDG_CONFIG_HOME/ghostty/config).</p> | |
<p>If this is false, the default configuration paths will not be loaded. | |
This is targeted directly at using Ghostty from the CLI in a way that | |
minimizes external affects.</p> | |
<p>This is a CLI-only configuration. Setting this in a configuration | |
file will have no effect. It is not an error, but it will not do | |
anything. This configuration can only be set via CLI arguments.</p> | |
</dd> | |
<dt><code>confirm-close-surface</code></dt> | |
<dd> | |
<p>Confirms that a surface should be closed before closing it. This | |
defaults to true. If set to false, surfaces will close without any | |
confirmation.</p> | |
</dd> | |
<dt><code>quit-after-last-window-closed</code></dt> | |
<dd> | |
<p>Whether or not to quit after the last surface is closed.</p> | |
<p>This defaults to <code>false</code> on macOS since that is standard | |
behavior for a macOS application. On Linux, this defaults to | |
<code>true</code> since that is generally expected behavior.</p> | |
<p>On Linux, if this is <code>true</code>, Ghostty can delay quitting | |
fully until a configurable amount of time has passed after the last | |
window is closed. See the documentation of | |
<code>quit-after-last-window-closed-delay</code>.</p> | |
</dd> | |
<dt><code>quit-after-last-window-closed-delay</code></dt> | |
<dd> | |
<p>Controls how long Ghostty will stay running after the last open | |
surface has been closed. This only has an effect if | |
<code>quit-after-last-window-closed</code> is also set to | |
<code>true</code>.</p> | |
<p>The minimum value for this configuration is <code>1s</code>. Any | |
values lower than this will be clamped to <code>1s</code>.</p> | |
<p>The duration is specified as a series of numbers followed by time | |
units. Whitespace is allowed between numbers and units. Each number and | |
unit will be added together to form the total duration.</p> | |
<p>The allowed time units are as follows:</p> | |
<ul> | |
<li><code>y</code> - 365 SI days, or 8760 hours, or 31536000 seconds. No | |
adjustments are made for leap years or leap seconds.</li> | |
<li><code>d</code> - one SI day, or 86400 seconds.</li> | |
<li><code>h</code> - one hour, or 3600 seconds.</li> | |
<li><code>m</code> - one minute, or 60 seconds.</li> | |
<li><code>s</code> - one second.</li> | |
<li><code>ms</code> - one millisecond, or 0.001 second.</li> | |
<li><code>us</code> or <code>µs</code> - one microsecond, or 0.000001 | |
second.</li> | |
<li><code>ns</code> - one nanosecond, or 0.000000001 second.</li> | |
</ul> | |
<p>Examples: * <code>1h30m</code> * <code>45s</code></p> | |
<p>Units can be repeated and will be added together. This means that | |
<code>1h1h</code> is equivalent to <code>2h</code>. This is confusing | |
and should be avoided. A future update may disallow this.</p> | |
<p>The maximum value is | |
<code>584y 49w 23h 34m 33s 709ms 551µs 615ns</code>. Any value larger | |
than this will be clamped to the maximum value.</p> | |
<p>By default <code>quit-after-last-window-closed-delay</code> is unset | |
and Ghostty will quit immediately after the last window is closed if | |
<code>quit-after-last-window-closed</code> is <code>true</code>.</p> | |
<p>Only implemented on Linux.</p> | |
</dd> | |
<dt><code>initial-window</code></dt> | |
<dd> | |
<p>This controls whether an initial window is created when Ghostty is | |
run. Note that if <code>quit-after-last-window-closed</code> is | |
<code>true</code> and <code>quit-after-last-window-closed-delay</code> | |
is set, setting <code>initial-window</code> to <code>false</code> will | |
mean that Ghostty will quit after the configured delay if no window is | |
ever created. Only implemented on Linux.</p> | |
</dd> | |
<dt><code>shell-integration</code></dt> | |
<dd> | |
<p>Whether to enable shell integration auto-injection or not. Shell | |
integration greatly enhances the terminal experience by enabling a | |
number of features:</p> | |
<ul> | |
<li><p>Working directory reporting so new tabs, splits inherit the | |
previous terminal’s working directory.</p></li> | |
<li><p>Prompt marking that enables the “jump_to_prompt” | |
keybinding.</p></li> | |
<li><p>If you’re sitting at a prompt, closing a terminal will not ask | |
for confirmation.</p></li> | |
<li><p>Resizing the window with a complex prompt usually paints much | |
better.</p></li> | |
</ul> | |
<p>Allowable values are:</p> | |
<ul> | |
<li><p><code>none</code> - Do not do any automatic injection. You can | |
still manually configure your shell to enable the integration.</p></li> | |
<li><p><code>detect</code> - Detect the shell based on the | |
filename.</p></li> | |
<li><p><code>bash</code>, <code>elvish</code>, <code>fish</code>, | |
<code>zsh</code> - Use this specific shell injection scheme.</p></li> | |
</ul> | |
<p>The default value is <code>detect</code>.</p> | |
</dd> | |
<dt><code>shell-integration-features</code></dt> | |
<dd> | |
<p>Shell integration features to enable if shell integration itself is | |
enabled. The format of this is a list of features to enable separated by | |
commas. If you prefix a feature with <code>no-</code> then it is | |
disabled. If you omit a feature, its default value is used, so you must | |
explicitly disable features you don’t want. You can also use | |
<code>true</code> or <code>false</code> to turn all features on or | |
off.</p> | |
<p>Available features:</p> | |
<ul> | |
<li><p><code>cursor</code> - Set the cursor to a blinking bar at the | |
prompt.</p></li> | |
<li><p><code>sudo</code> - Set sudo wrapper to preserve | |
terminfo.</p></li> | |
<li><p><code>title</code> - Set the window title via shell | |
integration.</p></li> | |
</ul> | |
<p>Example: <code>cursor</code>, <code>no-cursor</code>, | |
<code>sudo</code>, <code>no-sudo</code>, <code>title</code>, | |
<code>no-title</code></p> | |
</dd> | |
<dt><code>osc-color-report-format</code></dt> | |
<dd> | |
<p>Sets the reporting format for OSC sequences that request color | |
information. Ghostty currently supports OSC 10 (foreground), OSC 11 | |
(background), and OSC 4 (256 color palette) queries, and by default the | |
reported values are scaled-up RGB values, where each component are 16 | |
bits. This is how most terminals report these values. However, some | |
legacy applications may require 8-bit, unscaled, components. We also | |
support turning off reporting altogether. The components are lowercase | |
hex values.</p> | |
<p>Allowable values are:</p> | |
<ul> | |
<li><p><code>none</code> - OSC 4/10/11 queries receive no reply</p></li> | |
<li><p><code>8-bit</code> - Color components are return unscaled, | |
i.e. <code>rr/gg/bb</code></p></li> | |
<li><p><code>16-bit</code> - Color components are returned scaled, | |
e.g. <code>rrrr/gggg/bbbb</code></p></li> | |
</ul> | |
<p>The default value is <code>16-bit</code>.</p> | |
</dd> | |
<dt><code>vt-kam-allowed</code></dt> | |
<dd> | |
<p>If true, allows the “KAM” mode (ANSI mode 2) to be used within the | |
terminal. KAM disables keyboard input at the request of the application. | |
This is not a common feature and is not recommended to be enabled. This | |
will not be documented further because if you know you need KAM, you | |
know. If you don’t know if you need KAM, you don’t need it.</p> | |
</dd> | |
<dt><code>custom-shader</code></dt> | |
<dd> | |
<p>Custom shaders to run after the default shaders. This is a file path | |
to a GLSL-syntax shader for all platforms.</p> | |
<p>WARNING: Invalid shaders can cause Ghostty to become unusable such as | |
by causing the window to be completely black. If this happens, you can | |
unset this configuration to disable the shader.</p> | |
<p>On Linux, this requires OpenGL 4.2. Ghostty typically only requires | |
OpenGL 3.3, but custom shaders push that requirement up to 4.2.</p> | |
<p>The shader API is identical to the Shadertoy API: you specify a | |
<code>mainImage</code> function and the available uniforms match | |
Shadertoy. The iChannel0 uniform is a texture containing the rendered | |
terminal screen.</p> | |
<p>If the shader fails to compile, the shader will be ignored. Any | |
errors related to shader compilation will not show up as configuration | |
errors and only show up in the log, since shader compilation happens | |
after configuration loading on the dedicated render thread. For | |
interactive development, use <a | |
href="https://shadertoy.com">shadertoy.com</a>.</p> | |
<p>This can be repeated multiple times to load multiple shaders. The | |
shaders will be run in the order they are specified.</p> | |
<p>Changing this value at runtime and reloading the configuration will | |
only affect new windows, tabs, and splits.</p> | |
</dd> | |
<dt><code>custom-shader-animation</code></dt> | |
<dd> | |
<p>If <code>true</code> (default), the focused terminal surface will run | |
an animation loop when custom shaders are used. This uses slightly more | |
CPU (generally less than 10%) but allows the shader to animate. This | |
only runs if there are custom shaders and the terminal is focused.</p> | |
<p>If this is set to <code>false</code>, the terminal and custom shader | |
will only render when the terminal is updated. This is more efficient | |
but the shader will not animate.</p> | |
<p>This can also be set to <code>always</code>, which will always run | |
the animation loop regardless of whether the terminal is focused or not. | |
The animation loop will still only run when custom shaders are used. | |
Note that this will use more CPU per terminal surface and can become | |
quite expensive depending on the shader and your terminal usage.</p> | |
<p>This value can be changed at runtime and will affect all currently | |
open terminals.</p> | |
</dd> | |
<dt><code>macos-non-native-fullscreen</code></dt> | |
<dd> | |
<p>If anything other than false, fullscreen mode on macOS will not use | |
the native fullscreen, but make the window fullscreen without animations | |
and using a new space. It’s faster than the native fullscreen mode since | |
it doesn’t use animations.</p> | |
<p>Warning: tabs do not work with a non-native fullscreen window. This | |
can be fixed but is looking for contributors to help. See issue | |
#392.</p> | |
<p>Allowable values are:</p> | |
<ul> | |
<li><code>visible-menu</code> - Use non-native macOS fullscreen, keep | |
the menu bar visible</li> | |
<li><code>true</code> - Use non-native macOS fullscreen, hide the menu | |
bar</li> | |
<li><code>false</code> - Use native macOS fullscreen</li> | |
</ul> | |
</dd> | |
<dt><code>macos-titlebar-style</code></dt> | |
<dd> | |
<p>The style of the macOS titlebar. Available values are: “native”, | |
“transparent”, and “tabs”.</p> | |
<p>The “native” style uses the native macOS titlebar with zero | |
customization. The titlebar will match your window theme (see | |
<code>window-theme</code>).</p> | |
<p>The “transparent” style is the same as “native” but the titlebar will | |
be transparent and allow your window background color to come through. | |
This makes a more seamless window appearance but looks a little less | |
typical for a macOS application and may not work well with all | |
themes.</p> | |
<p>The “tabs” style is a completely custom titlebar that integrates the | |
tab bar into the titlebar. This titlebar always matches the background | |
color of the terminal. There are some limitations to this style: On | |
macOS 13 and below, saved window state will not restore tabs correctly. | |
macOS 14 does not have this issue and any other macOS version has not | |
been tested.</p> | |
<p>The default value is “transparent”. This is an opinionated choice but | |
its one I think is the most aesthetically pleasing and works in most | |
cases.</p> | |
<p>Changing this option at runtime only applies to new windows.</p> | |
</dd> | |
<dt><code>macos-option-as-alt</code></dt> | |
<dd> | |
<p>If <code>true</code>, the <em>Option</em> key will be treated as | |
<em>Alt</em>. This makes terminal sequences expecting <em>Alt</em> to | |
work properly, but will break Unicode input sequences on macOS if you | |
use them via the <em>Alt</em> key. You may set this to | |
<code>false</code> to restore the macOS <em>Alt</em> key unicode | |
sequences but this will break terminal sequences expecting <em>Alt</em> | |
to work.</p> | |
<p>Note that if an <em>Option</em>-sequence doesn’t produce a printable | |
character, it will be treated as <em>Alt</em> regardless of this | |
setting. (i.e. <code>alt+ctrl+a</code>).</p> | |
<p>This does not work with GLFW builds.</p> | |
</dd> | |
<dt><code>macos-window-shadow</code></dt> | |
<dd> | |
<p>Whether to enable the macOS window shadow. The default value is true. | |
With some window managers and window transparency settings, you may find | |
false more visually appealing.</p> | |
</dd> | |
<dt><code>linux-cgroup</code></dt> | |
<dd> | |
<p>Put every surface (tab, split, window) into a dedicated Linux | |
cgroup.</p> | |
<p>This makes it so that resource management can be done on a | |
per-surface granularity. For example, if a shell program is using too | |
much memory, only that shell will be killed by the oom monitor instead | |
of the entire Ghostty process. Similarly, if a shell program is using | |
too much CPU, only that surface will be CPU-throttled.</p> | |
<p>This will cause startup times to be slower (a hundred milliseconds or | |
so), so the default value is “single-instance.” In single-instance mode, | |
only one instance of Ghostty is running (see gtk-single-instance) so the | |
startup time is a one-time cost. Additionally, single instance Ghostty | |
is much more likely to have many windows, tabs, etc. so cgroup isolation | |
is a big benefit.</p> | |
<p>This feature requires systemd. If systemd is unavailable, cgroup | |
initialization will fail. By default, this will not prevent Ghostty from | |
working (see linux-cgroup-hard-fail).</p> | |
<p>Valid values are:</p> | |
<ul> | |
<li><code>never</code> - Never use cgroups.</li> | |
<li><code>always</code> - Always use cgroups.</li> | |
<li><code>single-instance</code> - Enable cgroups only for Ghostty | |
instances launched as single-instance applications (see | |
gtk-single-instance).</li> | |
</ul> | |
</dd> | |
<dt><code>linux-cgroup-memory-limit</code></dt> | |
<dd> | |
<p>Memory limit for any individual terminal process (tab, split, window, | |
etc.) in bytes. If this is unset then no memory limit will be set.</p> | |
<p>Note that this sets the “memory.high” configuration for the memory | |
controller, which is a soft limit. You should configure something like | |
systemd-oom to handle killing processes that have too much memory | |
pressure.</p> | |
</dd> | |
<dt><code>linux-cgroup-processes-limit</code></dt> | |
<dd> | |
<p>Number of processes limit for any individual terminal process (tab, | |
split, window, etc.). If this is unset then no limit will be set.</p> | |
<p>Note that this sets the “pids.max” configuration for the process | |
number controller, which is a hard limit.</p> | |
</dd> | |
<dt><code>linux-cgroup-hard-fail</code></dt> | |
<dd> | |
<p>If this is false, then any cgroup initialization (for linux-cgroup) | |
will be allowed to fail and the failure is ignored. This is useful if | |
you view cgroup isolation as a “nice to have” and not a critical | |
resource management feature, because Ghostty startup will not fail if | |
cgroup APIs fail.</p> | |
<p>If this is true, then any cgroup initialization failure will cause | |
Ghostty to exit or new surfaces to not be created.</p> | |
<p>Note: this currently only affects cgroup initialization. Subprocesses | |
must always be able to move themselves into an isolated cgroup.</p> | |
</dd> | |
<dt><code>gtk-single-instance</code></dt> | |
<dd> | |
<p>If <code>true</code>, the Ghostty GTK application will run in | |
single-instance mode: each new <code>ghostty</code> process launched | |
will result in a new window if there is already a running process.</p> | |
<p>If <code>false</code>, each new ghostty process will launch a | |
separate application.</p> | |
<p>The default value is <code>detect</code> which will default to | |
<code>true</code> if Ghostty detects that it was launched from the | |
<code>.desktop</code> file such as an app launcher (like Gnome Shell) or | |
by D-Bus activation. If Ghostty is launched from the command line, it | |
will default to <code>false</code>.</p> | |
<p>Note that debug builds of Ghostty have a separate single-instance ID | |
so you can test single instance without conflicting with release | |
builds.</p> | |
</dd> | |
<dt><code>gtk-titlebar</code></dt> | |
<dd> | |
<p>When enabled, the full GTK titlebar is displayed instead of your | |
window manager’s simple titlebar. The behavior of this option will vary | |
with your window manager.</p> | |
<p>This option does nothing when <code>window-decoration</code> is false | |
or when running under macOS.</p> | |
<p>Changing this value at runtime and reloading the configuration will | |
only affect new windows.</p> | |
</dd> | |
<dt><code>gtk-tabs-location</code></dt> | |
<dd> | |
<p>Determines the side of the screen that the GTK tab bar will stick to. | |
Top, bottom, left, and right are supported. The default is top.</p> | |
</dd> | |
<dt><code>gtk-wide-tabs</code></dt> | |
<dd> | |
<p>If <code>true</code> (default), then the Ghostty GTK tabs will be | |
“wide.” Wide tabs are the new typical Gnome style where tabs fill their | |
available space. If you set this to <code>false</code> then tabs will | |
only take up space they need, which is the old style.</p> | |
</dd> | |
<dt><code>gtk-adwaita</code></dt> | |
<dd> | |
<p>If <code>true</code> (default), Ghostty will enable libadwaita theme | |
support. This will make <code>window-theme</code> work properly and will | |
also allow Ghostty to properly respond to system theme changes, | |
light/dark mode changing, etc. This requires a GTK4 desktop with a GTK4 | |
theme.</p> | |
<p>If you are running GTK3 or have a GTK3 theme, you may have to set | |
this to false to get your theme picked up properly. Having this set to | |
true with GTK3 should not cause any problems, but it may not work | |
exactly as expected.</p> | |
<p>This configuration only has an effect if Ghostty was built with | |
libadwaita support.</p> | |
</dd> | |
<dt><code>desktop-notifications</code></dt> | |
<dd> | |
<p>If <code>true</code> (default), applications running in the terminal | |
can show desktop notifications using certain escape sequences such as | |
OSC 9 or OSC 777.</p> | |
</dd> | |
<dt><code>bold-is-bright</code></dt> | |
<dd> | |
<p>If <code>true</code>, the bold text will use the bright color | |
palette.</p> | |
</dd> | |
<dt><code>term</code></dt> | |
<dd> | |
<p>This will be used to set the <code>TERM</code> environment variable. | |
HACK: We set this with an <code>xterm</code> prefix because vim uses | |
that to enable key protocols (specifically this will enable | |
<code>modifyOtherKeys</code>), among other features. An option exists in | |
vim to modify this: <code>:set keyprotocol=ghostty:kitty</code>, however | |
a bug in the implementation prevents it from working properly. | |
https://github.com/vim/vim/pull/13211 fixes this.</p> | |
</dd> | |
<dt><code>enquiry-response</code></dt> | |
<dd> | |
<p>String to send when we receive <code>ENQ</code> (<code>0x05</code>) | |
from the command that we are running. Defaults to an empty string if not | |
set.</p> | |
</dd> | |
</dl> | |
<h1 id="keybind-actions">KEYBIND ACTIONS</h1> | |
<dl> | |
<dt><code>ignore</code></dt> | |
<dd> | |
<p>Ignore this key combination, don’t send it to the child process, just | |
black hole it.</p> | |
</dd> | |
<dt><code>unbind</code></dt> | |
<dd> | |
<p>This action is used to flag that the binding should be removed from | |
the set. This should never exist in an active set and | |
<code>set.put</code> has an assertion to verify this.</p> | |
</dd> | |
<dt><code>csi</code></dt> | |
<dd> | |
<p>Send a CSI sequence. The value should be the CSI sequence without the | |
CSI header (<code>ESC ]</code> or <code>\x1b]</code>).</p> | |
</dd> | |
<dt><code>esc</code></dt> | |
<dd> | |
<p>Send an <code>ESC</code> sequence.</p> | |
</dd> | |
</dl> | |
<p><code>text</code></p> | |
<dl> | |
<dt><code>cursor_key</code></dt> | |
<dd> | |
<p>Send data to the pty depending on whether cursor key mode is enabled | |
(<code>application</code>) or disabled (<code>normal</code>).</p> | |
</dd> | |
<dt><code>reset</code></dt> | |
<dd> | |
<p>Reset the terminal. This can fix a lot of issues when a running | |
program puts the terminal into a broken state. This is equivalent to | |
when you type “reset” and press enter.</p> | |
<p>If you do this while in a TUI program such as vim, this may break the | |
program. If you do this while in a shell, you may have to press enter | |
after to get a new prompt.</p> | |
</dd> | |
<dt><code>copy_to_clipboard</code></dt> | |
<dd> | |
<p>Copy and paste.</p> | |
</dd> | |
</dl> | |
<p><code>paste_from_clipboard</code></p> | |
<p><code>paste_from_selection</code></p> | |
<dl> | |
<dt><code>increase_font_size</code></dt> | |
<dd> | |
<p>Increase/decrease the font size by a certain amount.</p> | |
</dd> | |
</dl> | |
<p><code>decrease_font_size</code></p> | |
<dl> | |
<dt><code>reset_font_size</code></dt> | |
<dd> | |
<p>Reset the font size to the original configured size.</p> | |
</dd> | |
<dt><code>clear_screen</code></dt> | |
<dd> | |
<p>Clear the screen. This also clears all scrollback.</p> | |
</dd> | |
<dt><code>select_all</code></dt> | |
<dd> | |
<p>Select all text on the screen.</p> | |
</dd> | |
<dt><code>scroll_to_top</code></dt> | |
<dd> | |
<p>Scroll the screen varying amounts.</p> | |
</dd> | |
</dl> | |
<p><code>scroll_to_bottom</code></p> | |
<p><code>scroll_page_up</code></p> | |
<p><code>scroll_page_down</code></p> | |
<p><code>scroll_page_fractional</code></p> | |
<p><code>scroll_page_lines</code></p> | |
<dl> | |
<dt><code>adjust_selection</code></dt> | |
<dd> | |
<p>Adjust an existing selection in a given direction. This action does | |
nothing if there is no active selection.</p> | |
</dd> | |
<dt><code>jump_to_prompt</code></dt> | |
<dd> | |
<p>Jump the viewport forward or back by prompt. Positive number is the | |
number of prompts to jump forward, negative is backwards.</p> | |
</dd> | |
<dt><code>write_scrollback_file</code></dt> | |
<dd> | |
<p>Write the entire scrollback into a temporary file. The action | |
determines what to do with the filepath. Valid values are:</p> | |
<ul> | |
<li>“paste”: Paste the file path into the terminal.</li> | |
<li>“open”: Open the file in the default OS editor for text files.</li> | |
</ul> | |
</dd> | |
<dt><code>write_screen_file</code></dt> | |
<dd> | |
<p>Same as write_scrollback_file but writes the full screen contents. | |
See write_scrollback_file for available values.</p> | |
</dd> | |
<dt><code>write_selection_file</code></dt> | |
<dd> | |
<p>Same as write_scrollback_file but writes the selected text. If there | |
is no selected text this does nothing (it doesn’t even create an empty | |
file). See write_scrollback_file for available values.</p> | |
</dd> | |
<dt><code>new_window</code></dt> | |
<dd> | |
<p>Open a new window.</p> | |
</dd> | |
<dt><code>new_tab</code></dt> | |
<dd> | |
<p>Open a new tab.</p> | |
</dd> | |
<dt><code>previous_tab</code></dt> | |
<dd> | |
<p>Go to the previous tab.</p> | |
</dd> | |
<dt><code>next_tab</code></dt> | |
<dd> | |
<p>Go to the next tab.</p> | |
</dd> | |
<dt><code>last_tab</code></dt> | |
<dd> | |
<p>Go to the last tab (the one with the highest index)</p> | |
</dd> | |
<dt><code>goto_tab</code></dt> | |
<dd> | |
<p>Go to the tab with the specific number, 1-indexed.</p> | |
</dd> | |
<dt><code>new_split</code></dt> | |
<dd> | |
<p>Create a new split in the given direction. The new split will appear | |
in the direction given.</p> | |
</dd> | |
<dt><code>goto_split</code></dt> | |
<dd> | |
<p>Focus on a split in a given direction.</p> | |
</dd> | |
<dt><code>toggle_split_zoom</code></dt> | |
<dd> | |
<p>zoom/unzoom the current split.</p> | |
</dd> | |
<dt><code>resize_split</code></dt> | |
<dd> | |
<p>Resize the current split by moving the split divider in the given | |
direction</p> | |
</dd> | |
<dt><code>equalize_splits</code></dt> | |
<dd> | |
<p>Equalize all splits in the current window</p> | |
</dd> | |
<dt><code>inspector</code></dt> | |
<dd> | |
<p>Show, hide, or toggle the terminal inspector for the currently | |
focused terminal.</p> | |
</dd> | |
<dt><code>open_config</code></dt> | |
<dd> | |
<p>Open the configuration file in the default OS editor. If your default | |
OS editor isn’t configured then this will fail. Currently, any failures | |
to open the configuration will show up only in the logs.</p> | |
</dd> | |
<dt><code>reload_config</code></dt> | |
<dd> | |
<p>Reload the configuration. The exact meaning depends on the app | |
runtime in use but this usually involves re-reading the configuration | |
file and applying any changes. Note that not all changes can be applied | |
at runtime.</p> | |
</dd> | |
<dt><code>close_surface</code></dt> | |
<dd> | |
<p>Close the current “surface”, whether that is a window, tab, split, | |
etc. This only closes ONE surface. This will trigger close confirmation | |
as configured.</p> | |
</dd> | |
<dt><code>close_window</code></dt> | |
<dd> | |
<p>Close the window, regardless of how many tabs or splits there may be. | |
This will trigger close confirmation as configured.</p> | |
</dd> | |
<dt><code>close_all_windows</code></dt> | |
<dd> | |
<p>Close all windows. This will trigger close confirmation as | |
configured. This only works for macOS currently.</p> | |
</dd> | |
<dt><code>toggle_fullscreen</code></dt> | |
<dd> | |
<p>Toggle fullscreen mode of window.</p> | |
</dd> | |
<dt><code>toggle_window_decorations</code></dt> | |
<dd> | |
<p>Toggle window decorations on and off. This only works on Linux.</p> | |
</dd> | |
<dt><code>quit</code></dt> | |
<dd> | |
<p>Quit ghostty.</p> | |
</dd> | |
</dl> | |
<h1 id="files">FILES</h1> | |
<dl> | |
<dt><em>$XDG_CONFIG_HOME/ghostty/config</em></dt> | |
<dd> | |
<p>Location of the default configuration file.</p> | |
</dd> | |
<dt><em>$LOCALAPPDATA/ghostty/config</em></dt> | |
<dd> | |
<p><strong>On Windows</strong>, if <em>$XDG_CONFIG_HOME</em> is not set, | |
<em>$LOCALAPPDATA</em> will be searched for configuration files.</p> | |
</dd> | |
</dl> | |
<h1 id="environment">ENVIRONMENT</h1> | |
<dl> | |
<dt><strong>XDG_CONFIG_HOME</strong></dt> | |
<dd> | |
<p>Default location for configuration files.</p> | |
</dd> | |
<dt><strong>LOCALAPPDATA</strong></dt> | |
<dd> | |
<p><strong>WINDOWS ONLY:</strong> alternate location to search for | |
configuration files.</p> | |
</dd> | |
</dl> | |
<h1 id="bugs">BUGS</h1> | |
<p>See GitHub issues: <a | |
href="https://github.com/ghostty-org/ghostty/issues" | |
class="uri">https://github.com/ghostty-org/ghostty/issues</a></p> | |
<h1 id="author">AUTHOR</h1> | |
<p>Mitchell Hashimoto <a href="mailto:[email protected]" | |
class="email">[email protected]</a></p> | |
<h1 id="see-also">SEE ALSO</h1> | |
<p><strong>ghostty(1)</strong></p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment