ALACRITTY(5) | File Formats Manual | ALACRITTY(5) |
NAME¶
Alacritty - TOML configuration file format.
SYNTAX¶
Alacritty's configuration file uses the TOML format. The format's specification can be found at https://toml.io/en/v1.0.0.
GENERAL¶
This section documents the root level of the configuration file.
import = ["<string>",]
Imports are loaded in order, skipping all missing files, with the importing file being loaded last. If a field is already present in a previous import, it will be replaced.
All imports must either be absolute paths starting with /, or paths relative to the user's home directory starting with ~/.
Example:
"~/.config/alacritty/base16-dark.toml",
"~/.config/alacritty/keybindings.toml",
]
shell = "<string>" | { program = "<string>", args = ["<string>",] }
Default:
Windows: "powershell"
Example:
program = "/bin/zsh"
args = ["-l"]
working_directory = "<string>" | "None"
Default: "None"
live_config_reload = true | false
Default: true
ipc_socket = true | false # (unix only)
Default: true
ENV¶
All key-value pairs in the [env] section will be added as environment variables for any process spawned by Alacritty, including its shell. Some entries may override variables set by alacritty itself.
Example:
WINIT_X11_SCALE_FACTOR = "1.0"
WINDOW¶
This section documents the [window] table of the configuration file.
dimensions = { columns = <integer>, lines = <integer> }
Number of lines/columns (not pixels) in the terminal. Both lines and columns must be non-zero for this to take effect. The number of columns must be at least 2, while using a value of 0 for columns and lines will fall back to the window manager's recommended size
Default: { columns = 0, lines = 0 }
position = "None" | { x = <integer>, y = <integer> }
Specified in number of pixels.
If the position is "None", the window manager will handle placement.
Default: "None"
padding = { x = <integer>, y = <integer> }
Default: { x = 0, y = 0 }
dynamic_padding = true | false
Default: false
decorations = "Full" | "None" | "Transparent" | "Buttonless"
Full
Default: "Full"
opacity = <float>
Default: 1.0
blur = true | false # (works on macOS/KDE Wayland)
Default: false
startup_mode = "Windowed" | "Maximized" | "Fullscreen" | "SimpleFullscreen"
Windowed
Default: "Windowed"
title = "<string>"
Default: "Alacritty"
dynamic_title = true | false
Default: true
class = { instance = "<string>", general = "<string>" } # (Linux/BSD only)
On Wayland, general is used as app_id and instance is ignored.
Default: { instance = "Alacritty", general = "Alacritty" }
decorations_theme_variant = "Dark" | "Light" | "None"
Default: "None"
resize_increments = true | false
Default: false
option_as_alt = "OnlyLeft" | "OnlyRight" | "Both" | "None" # (macos only)
Default: "None"
Example:
padding = { x = 3, y = 3 }
dynamic_padding = true
opacity = 0.9
SCROLLING¶
This section documents the [scrolling] table of the configuration file.
history = <integer>
Specifying 0 will disable scrolling.
Limited to 100000.
Default: 10000
multiplier = <integer>
Default: 3
FONT¶
This section documents the [font] table of the configuration file.
normal = { family = "<string>", style = "<string>" }
Windows: { family = "Consolas", style = "Regular" }
macOS: { family = "Menlo", style = "Regular" }
bold = { family = "<string>", style = "<string>" }
Default: { style = "Bold" }
italic = { family = "<string>", style = "<string>" }
Default: { style = "Italic" }
bold_italic = { family = "<string>", style = "<string>" }
Default: { style = "Bold Italic" }
size = <float>
Default: 11.25
offset = { x = <integer>, y = <integer> }
Default: { x = 0, y = 0 }
glyph_offset = { x = <integer>, y = <integer> }
builtin_box_drawing = true | false
Default: true
COLORS¶
This section documents the [colors] table of the configuration file.
Colors are specified using their hexadecimal values with a # prefix: #RRGGBB.
primary
foreground = "<string>"
background = "<string>"
dim_foreground = "<string>"
Default: "#828482"
bright_foreground = "<string>"
If this is not set, the normal foreground will be used.
Default: "None"
cursor = { text = "<string>", cursor = "<string>" }
Allowed values are hexadecimal colors like #ff00ff, or CellForeground/CellBackground, which references the affected cell.
Default: { text = "CellBackground", cursor = "CellForeground" }
vi_mode_cursor = { text = "<string>", cursor = "<string>" }
Allowed values are hexadecimal colors like #ff00ff, or CellForeground/CellBackground, which references the affected cell.
Default: { text = "CellBackground", cursor = "CellForeground" }
search
Allowed values are hexadecimal colors like #ff00ff, or CellForeground/CellBackground, which references the affected cell.
matches = { foreground = "<string>", background = "<string>" }
focused_match = { foreground = "<string>", background = "<string>" }
hints
start = { foreground = "<string>", background = "<string>" }
Allowed values are hexadecimal colors like #ff00ff, or CellForeground/CellBackground, which references the affected cell.
Default: { foreground = "#181818", background = "#f4bf75" }
end = { foreground = "<string>", background = "<string>" }
Allowed values are hexadecimal colors like #ff00ff, or CellForeground/CellBackground, which references the affected cell.
Default: { foreground = "#181818", background = "#ac4242" }
line_indicator = { foreground = "<string>", background = "<string>" }
Setting this to "None" will use the opposing primary color.
Default: { foreground = "None", background = "None" }
footer_bar = { foreground = "<string>", background = "<string>" }
Default: { foreground = "#181818", background = "#d8d8d8" }
selection = { text = "<string>", background = "<string>" }
Allowed values are hexadecimal colors like #ff00ff, or CellForeground/CellBackground, which references the affected cell.
Default: { text = "CellBackground", background = "CellForeground" }
normal
black = "<string>"
bright
black = "<string>"
dim
If the dim colors are not set, they will be calculated automatically based on the normal colors.
black = "<string>"
indexed_colors = [{ index = <integer>, color = "<string>" },]
Default: []
transparent_background_colors = true | false
Default: false
draw_bold_text_with_bright_colors = true | false
Default: false
BELL¶
This section documents the [bell] table of the configuration file.
animation = "Ease" | "EaseOut" | "EaseOutSine" | "EaseOutQuad" | "EaseOutCubic" | "EaseOutQuart" | "EaseOutQuint" | "EaseOutExpo" | "EaseOutCirc" | "Linear"
Default: "Linear"
duration = <integer>
Default: 0
color = "<string>"
Default: "#ffffff"
command = "<string>" | { program = "<string>", args = ["<string>",] }
When set to "None", no command will be executed.
Default: "None"
SELECTION¶
This section documents the [selection] table of the configuration file.
semantic_escape_chars = "<string>"
Default: ",│`|:\"' ()[]{}<>\t"
save_to_clipboard = true | false
Default: false
CURSOR¶
This section documents the [cursor] table of the configuration file.
style = { <shape>, <blinking> }
blinking = "Never" | "Off" | "On" | "Always"
Default: "Off"
vi_mode_style = { <shape>, <blinking> } | "None"
Default: "None"
blink_interval = <integer>
Default: 750
blink_timeout = <integer>
Specifying 0 will disable timeout for blinking.
Default: 5
unfocused_hollow = true | false
Default: true
thickness = <float>
Default: 0.15
TERMINAL¶
This section documents the [terminal] table of the configuration file.
osc52 = "Disabled" | "OnlyCopy" | "OnlyPaste" | "CopyPaste"
Default: "OnlyCopy"
MOUSE¶
This section documents the [mouse] table of the configuration file.
hide_when_typing = true | false
Default: false
bindings = [{ <mouse>, <mods>, <mode>, <command> | <chars> | <action> },]
When an application running within Alacritty captures the mouse, the `Shift` modifier can be used to suppress mouse reporting. If no action is found for the event, actions for the event without the `Shift` modifier are triggered instead.
mouse = "Middle" | "Left" | "Right" | "Back" | "Forward" | <integer>
action = <keyboard.bindings.action> | "ExpandSelection"
Example:
bindings = [
{ mouse = "Right", mods = "Control", action = "Paste" },
]
HINTS¶
This section documents the [hints] table of the configuration file.
Terminal hints can be used to find text or hyperlinks in the visible part of the terminal and pipe it to other applications.
alphabet = "<string>"
Default: "jfkdls;ahgurieowpq"
enabled = [{ <regex>, <hyperlinks>, <post_processing>, <persist>, <action>, <command> <binding>, <mouse> },]
Array with all available hints.
Each hint must have at least one of regex or hyperlinks and either an action or a command.
hyperlinks = true | false
post_processing = true | false
persist = true | false
action = "Copy" | "Paste" | "Select" | "MoveViModeCursor"
command = "<string>" | { program = "<string>", args = ["<string>",] }
The hint's text is always attached as the last argument.
binding = { key = "<string>", mods = "<string>", mode = "<string>" }
This controls which key binding is used to start the keyboard hint selection process.
mouse = { mods = "<string>", enabled = true | false }
The enabled field controls if the hint should be underlined when hovering over the hint text with all mods pressed.
Default:
command = "xdg-open" # On Linux/BSD
# command = "open" # On macOS
# command = { program = "cmd", args = [ "/c", "start", "" ] } # On Windows
hyperlinks = true
post_processing = true
persist = false
mouse.enabled = true
binding = { key = "U", mods = "Control|Shift" }
regex = "(ipfs:|ipns:|magnet:|mailto:|gemini://|gopher://|https://|http://|news:|file:|git://|ssh:|ftp://)[^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+"
KEYBOARD¶
This section documents the [keyboard] table of the configuration file.
bindings = [{ <key>, <mods>, <mode>, <command> | <chars> | <action> },]
Multiple keybindings can be triggered by a single key press and will be executed in the order they are defined in.
key = "<string>"
https://docs.rs/winit/latest/winit/keyboard/enum.NamedKey.html
https://docs.rs/winit/latest/winit/keyboard/enum.Key.html#variant.Dead
Numpad keys are prefixed by Numpad: "NumpadEnter" | "NumpadAdd" | "NumpadComma" | "NumpadDecimal" | "NumpadDivide" | "NumpadEquals" | "NumpadSubtract" | "NumpadMultiply" | "Numpad[0-9]".
The key field also supports using scancodes, which are specified as a decimal number.
mods = "Command" | "Control" | "Option" | "Super" | "Shift" | "Alt"
mode = "AppCursor" | "AppKeypad" | "Search" | "Alt" | "Vi"
Prepending ~ to a mode will require the mode to not = be active for the binding to take effect.
Multiple modes can be combined using |, like this: "~Vi|Search".
command = "<string>" | { program = "<string>", args = ["<string>",] }
chars = "<string>"
action
Vi mode actions:
Up
Search actions:
SearchFocusNext
macOS exclusive:
ToggleSimpleFullscreen
Linux/BSD exclusive:
CopySelection
Default: See alacritty-bindings(5)
Example:
bindings = [
{ key = "N", mods = "Control|Shift", action = "CreateNewWindow" },
{ key = "L", mods = "Control|Shift", chars = "l" },
]
DEBUG¶
This section documents the [debug] table of the configuration file.
Debug options are meant to help troubleshoot issues with Alacritty. These can change or be removed entirely without warning, so their stability shouldn't be relied upon.
render_timer = true | false
Default: false
persistent_logging = true | false
Default: false
log_level = "Off" | "Error" | "Warn" | "Info" | "Debug" | "Trace"
To add extra libraries to logging ALACRITTY_EXTRA_LOG_TARGETS variable can be used.
Example:
renderer = "glsl3" | "gles2" | "gles2pure" | "None"
Default: "None"
print_events = true | false
Default: false
highlight_damage = true | false
Default: false
prefer_egl = true | false
Default: false
SEE ALSO¶
BUGS¶
Found a bug? Please report it at https://github.com/alacritty/alacritty/issues.
MAINTAINERS¶
- Christian Duerr <contact@christianduerr.com>
- Kirill Chibisov <contact@kchibisov.com>
2024-10-20 |