· 4 years ago · Mar 28, 2021, 12:04 AM
1# Configuration for Alacritty, the GPU enhanced terminal emulator.
2
3# Any items in the `env` entry below will be added as
4# environment variables. Some entries may override variables
5# set by alacritty itself.
6#env:
7 # TERM variable
8 #
9 # This value is used to set the `$TERM` environment variable for
10 # each instance of Alacritty. If it is not present, alacritty will
11 # check the local terminfo database and use `alacritty` if it is
12 # available, otherwise `xterm-256color` is used.
13 #TERM: xterm-256color
14
15window:
16 # Window dimensions (changes require restart)
17 #
18 # Specified in number of columns/lines, not pixels.
19 # If both are `0`, this setting is ignored.
20 dimensions:
21 columns: 0
22 lines: 0
23
24 # Window position (changes require restart)
25 #
26 # Specified in number of pixels.
27 # If the position is not set, the window manager will handle the placement.
28 #position:
29 # x: 0
30 # y: 0
31
32 # Window padding (changes require restart)
33 #
34 # Blank space added around the window in pixels. This padding is scaled
35 # by DPI and the specified value is always added at both opposing sides.
36 padding:
37 x: 8
38 y: 0
39
40 # Spread additional padding evenly around the terminal content.
41 dynamic_padding: false
42
43 # Window decorations
44 #
45 # Values for `decorations`:
46 # - full: Borders and title bar
47 # - none: Neither borders nor title bar
48 #
49 # Values for `decorations` (macOS only):
50 # - transparent: Title bar, transparent background and title bar buttons
51 # - buttonless: Title bar, transparent background, but no title bar buttons
52 decorations: full
53
54 # Startup Mode (changes require restart)
55 #
56 # Values for `startup_mode`:
57 # - Windowed
58 # - Maximized
59 # - Fullscreen
60 #
61 # Values for `startup_mode` (macOS only):
62 # - SimpleFullscreen
63 startup_mode: Windowed
64
65 # Window title
66 #title: Alacritty
67
68 # Window class (Linux only):
69 #class: Alacritty
70
71scrolling:
72 # Maximum number of lines in the scrollback buffer.
73 # Specifying '0' will disable scrolling.
74 history: 10000
75
76 # Number of lines the viewport will move for every line scrolled when
77 # scrollback is enabled (history > 0).
78 multiplier: 3
79
80 # Faux Scrolling
81 #
82 # The `faux_multiplier` setting controls the number of lines the terminal
83 # should scroll when the alternate screen buffer is active. This is used
84 # to allow mouse scrolling for applications like `man`.
85 #
86 # Specifying `0` will disable faux scrolling.
87 faux_multiplier: 3
88
89 # Scroll to the bottom when new text is written to the terminal.
90 auto_scroll: false
91
92# Spaces per Tab (changes require restart)
93#
94# This setting defines the width of a tab in cells.
95#
96# Some applications, like Emacs, rely on knowing about the width of a tab.
97# To prevent unexpected behavior in these applications, it's also required to
98# change the `it` value in terminfo when altering this setting.
99tabspaces: 8
100
101# Font configuration (changes require restart)
102font:
103 normal:
104 family: Hack Nerd Font
105 style: Regular
106
107 bold:
108 family: Hack Nerd Font
109 style: Bold
110
111 italic:
112 family: Hack Nerd Font
113 style: Italic
114
115 size: 12.0
116
117 # Offset is the extra space around each character. `offset.y` can be thought of
118 # as modifying the line spacing, and `offset.x` as modifying the letter spacing.
119 offset:
120 x: 0
121 y: 0
122
123 # Glyph offset determines the locations of the glyphs within their cells with
124 # the default being at the bottom. Increasing `x` moves the glyph to the right,
125 # increasing `y` moves the glyph upwards.
126 glyph_offset:
127 x: 0
128 y: 0
129
130 # Thin stroke font rendering (macOS only)
131 #
132 # Thin strokes are suitable for retina displays, but for non-retina screens
133 # it is recommended to set `use_thin_strokes` to `false`
134 #
135 # macOS >= 10.14.x:
136 #
137 # If the font quality on non-retina display looks bad then set
138 # `use_thin_strokes` to `true` and enable font smoothing by running the
139 # following command:
140 # `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO`
141 #
142 # This is a global setting and will require a log out or restart to take
143 # effect.
144 use_thin_strokes: true
145
146# If `true`, bold text is drawn using the bright color variants.
147draw_bold_text_with_bright_colors: true
148
149# Colors (Gruvbox dark)
150colors:
151 # Default colors
152 primary:
153 # hard contrast: background = '0x1d2021'
154 background: '0x282828'
155 # soft contrast: background = '0x32302f'
156 foreground: '0xebdbb2'
157
158 # Normal colors
159 normal:
160 black: '0x282828'
161 red: '0xcc241d'
162 green: '0x98971a'
163 yellow: '0xd79921'
164 blue: '0x458588'
165 magenta: '0xb16286'
166 cyan: '0x689d6a'
167 white: '0xa89984'
168
169 # Bright colors
170 bright:
171 black: '0x928374'
172 red: '0xfb4934'
173 green: '0xb8bb26'
174 yellow: '0xfabd2f'
175 blue: '0x83a598'
176 magenta: '0xd3869b'
177 cyan: '0x8ec07c'
178 white: '0xebdbb2'
179
180 # Dim colors
181 #
182 # If the dim colors are not set, they will be calculated automatically based
183 # on the `normal` colors.
184 #dim:
185 # black: '0x000000'
186 # red: '0x8c3336'
187 # green: '0x7a8530'
188 # yellow: '0x97822e'
189 # blue: '0x506d8f'
190 # magenta: '0x80638e'
191 # cyan: '0x497e7a'
192 # white: '0x9a9a9a'
193
194 # Indexed Colors
195 #
196 # The indexed colors include all colors from 16 to 256.
197 # When these are not set, they're filled with sensible defaults.
198 #
199 # Example:
200 # `- { index: 16, color: '0xff00ff' }`
201 #
202 indexed_colors: []
203
204# Visual Bell
205#
206# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
207# rung, the terminal background will be set to white and transition back to the
208# default background color. You can control the rate of this transition by
209# setting the `duration` property (represented in milliseconds). You can also
210# configure the transition function by setting the `animation` property.
211#
212# Values for `animation`:
213# - Ease
214# - EaseOut
215# - EaseOutSine
216# - EaseOutQuad
217# - EaseOutCubic
218# - EaseOutQuart
219# - EaseOutQuint
220# - EaseOutExpo
221# - EaseOutCirc
222# - Linear
223#
224# Specifying a `duration` of `0` will disable the visual bell.
225bell:
226 animation: EaseOutExpo
227 duration: 0
228 color: '0xffffff'
229
230# Background opacity
231#
232# Window opacity as a floating point number from `0.0` to `1.0`.
233# The value `0.0` is completely transparent and `1.0` is opaque.
234background_opacity: 1.0
235
236# Mouse bindings
237#
238# Available fields:
239# - mouse
240# - action
241# - mods (optional)
242#
243# Values for `mouse`:
244# - Middle
245# - Left
246# - Right
247# - Numeric identifier such as `5`
248#
249# All available `mods` and `action` values are documented in the key binding
250# section.
251mouse_bindings:
252 - { mouse: Middle, action: PasteSelection }
253
254mouse:
255 # Click settings
256 #
257 # The `double_click` and `triple_click` settings control the time
258 # alacritty should wait for accepting multiple clicks as one double
259 # or triple click.
260 double_click: { threshold: 300 }
261 triple_click: { threshold: 300 }
262
263 # If this is `true`, the cursor is temporarily hidden when typing.
264 hide_when_typing: false
265
266 url:
267 # URL launcher
268 #
269 # This program is executed when clicking on a text which is recognized as a URL.
270 # The URL is always added to the command as the last parameter.
271 #
272 # When set to `None`, URL launching will be disabled completely.
273 #
274 # Default:
275 # - (macOS) open
276 # - (Linux) xdg-open
277 # - (Windows) explorer
278 #launcher:
279 # program: xdg-open
280 # args: []
281
282 # URL modifiers
283 #
284 # These are the modifiers that need to be held down for opening URLs when clicking
285 # on them. The available modifiers are documented in the key binding section.
286 modifiers: None
287
288selection:
289 semantic_escape_chars: ",│`|:\"' ()[]{}<>"
290
291 # When set to `true`, selected text will be copied to the primary clipboard.
292 save_to_clipboard: false
293
294# Allow terminal applications to change Alacritty's window title.
295dynamic_title: true
296
297cursor:
298 # Cursor style
299 #
300 # Values for `style`:
301 # - ▇ Block
302 # - _ Underline
303 # - | Beam
304 style: Block
305
306 # If this is `true`, the cursor will be rendered as a hollow box when the
307 # window is not focused.
308 unfocused_hollow: true
309
310# Live config reload (changes require restart)
311live_config_reload: true
312
313# Shell
314#
315# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
316# Entries in `shell.args` are passed unmodified as arguments to the shell.
317#
318# Default:
319# - (macOS) /bin/bash --login
320# - (Linux) user login shell
321# - (Windows) powershell
322#shell:
323# program: /usr/local/bin/tmux
324# args:
325# - -u
326
327# Startup directory
328#
329# Directory the shell is started in. If this is unset, or `None`, the working
330# directory of the parent process will be used.
331working_directory: None
332
333# Windows 10 ConPTY backend (Windows only)
334#
335# This will enable better color support and may resolve other issues,
336# however this API and its implementation is still young and so is
337# disabled by default, as stability may not be as good as the winpty
338# backend.
339#
340# Alacritty will fall back to the WinPTY automatically if the ConPTY
341# backend cannot be initialized.
342enable_experimental_conpty_backend: false
343
344# Send ESC (\x1b) before characters when alt is pressed.
345alt_send_esc: true
346
347debug:
348 # Display the time it takes to redraw each frame.
349 render_timer: false
350
351 # Keep the log file after quitting Alacritty.
352 persistent_logging: false
353
354 # Log level
355 #
356 # Values for `log_level`:
357 # - None
358 # - Error
359 # - Warn
360 # - Info
361 # - Debug
362 # - Trace
363 log_level: Warn
364
365 # Print all received window events.
366 print_events: false
367
368 # Record all characters and escape sequences as test data.
369 ref_test: false
370
371# Key bindings
372#
373# Key bindings are specified as a list of objects. Each binding will specify a
374# key and modifiers required to trigger it, terminal modes where the binding is
375# applicable, and what should be done when the key binding fires. It can either
376# send a byte sequence to the running application (`chars`), execute a
377# predefined action (`action`) or fork and execute a specified command plus
378# arguments (`command`).
379#
380# Bindings are always filled by default, but will be replaced when a new binding
381# with the same triggers is defined. To unset a default binding, it can be
382# mapped to the `None` action.
383#
384# Example:
385# `- { key: V, mods: Control|Shift, action: Paste }`
386#
387# Available fields:
388# - key
389# - mods (optional)
390# - chars | action | command (exactly one required)
391# - mode (optional)
392#
393# Values for `key`:
394# - `A` -> `Z`
395# - `F1` -> `F12`
396# - `Key1` -> `Key0`
397#
398# A full list with available key codes can be found here:
399# https://docs.rs/glutin/*/glutin/enum.VirtualKeyCode.html#variants
400#
401# Instead of using the name of the keys, the `key` field also supports using
402# the scancode of the desired key. Scancodes have to be specified as a
403# decimal number.
404# This command will allow you to display the hex scancodes for certain keys:
405# `showkey --scancodes`
406#
407# Values for `mods`:
408# - Command
409# - Control
410# - Option
411# - Super
412# - Shift
413# - Alt
414#
415# Multiple `mods` can be combined using `|` like this: `mods: Control|Shift`.
416# Whitespace and capitalization is relevant and must match the example.
417#
418# Values for `chars`:
419# The `chars` field writes the specified string to the terminal. This makes
420# it possible to pass escape sequences.
421# To find escape codes for bindings like `PageUp` ("\x1b[5~"), you can run
422# the command `showkey -a` outside of tmux.
423# Note that applications use terminfo to map escape sequences back to
424# keys. It is therefore required to update the terminfo when
425# changing an escape sequence.
426#
427# Values for `action`:
428# - Paste
429# - PasteSelection
430# - Copy
431# - IncreaseFontSize
432# - DecreaseFontSize
433# - ResetFontSize
434# - ScrollPageUp
435# - ScrollPageDown
436# - ScrollLineUp
437# - ScrollLineDown
438# - ScrollToTop
439# - ScrollToBottom
440# - ClearHistory
441# - Hide
442# - Quit
443# - ClearLogNotice
444# - SpawnNewInstance
445# - ToggleFullscreen
446# - None
447#
448# Values for `action` (macOS only):
449# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space
450#
451# Values for `command`:
452# The `command` field must be a map containing a `program` string and
453# an `args` array of command line parameter strings.
454#
455# Example:
456# `command: { program: "alacritty", args: ["-e", "vttest"] }`
457#
458# Values for `mode`:
459# - ~AppCursor
460# - AppCursor
461# - ~AppKeypad
462# - AppKeypad
463key_bindings:
464 # (Windows/Linux only)
465 #- { key: V, mods: Control|Shift, action: Paste }
466 #- { key: C, mods: Control|Shift, action: Copy }
467 #- { key: Insert, mods: Shift, action: PasteSelection }
468 #- { key: Key0, mods: Control, action: ResetFontSize }
469 #- { key: Equals, mods: Control, action: IncreaseFontSize }
470 #- { key: Add, mods: Control, action: IncreaseFontSize }
471 #- { key: Subtract, mods: Control, action: DecreaseFontSize }
472 #- { key: Minus, mods: Control, action: DecreaseFontSize }
473 #- { key: Return, mods: Alt, action: ToggleFullscreen }
474
475 # (macOS only)
476 #- { key: Key0, mods: Command, action: ResetFontSize }
477 #- { key: Equals, mods: Command, action: IncreaseFontSize }
478 #- { key: Add, mods: Command, action: IncreaseFontSize }
479 #- { key: Minus, mods: Command, action: DecreaseFontSize }
480 #- { key: K, mods: Command, action: ClearHistory }
481 #- { key: K, mods: Command, chars: "\x0c" }
482 #- { key: V, mods: Command, action: Paste }
483 #- { key: C, mods: Command, action: Copy }
484 #- { key: H, mods: Command, action: Hide }
485 #- { key: Q, mods: Command, action: Quit }
486 #- { key: W, mods: Command, action: Quit }
487 #- { key: F, mods: Command|Control, action: ToggleFullscreen }
488
489 - { key: Paste, action: Paste }
490 - { key: Copy, action: Copy }
491 - { key: L, mods: Control, action: ClearLogNotice }
492 - { key: L, mods: Control, chars: "\x0c" }
493 - { key: Home, mods: Alt, chars: "\x1b[1;3H" }
494 - { key: Home, chars: "\x1bOH", mode: AppCursor }
495 - { key: Home, chars: "\x1b[H", mode: ~AppCursor }
496 - { key: End, mods: Alt, chars: "\x1b[1;3F" }
497 - { key: End, chars: "\x1bOF", mode: AppCursor }
498 - { key: End, chars: "\x1b[F", mode: ~AppCursor }
499 - { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt }
500 - { key: PageUp, mods: Shift, chars: "\x1b[5;2~", mode: Alt }
501 - { key: PageUp, mods: Control, chars: "\x1b[5;5~" }
502 - { key: PageUp, mods: Alt, chars: "\x1b[5;3~" }
503 - { key: PageUp, chars: "\x1b[5~" }
504 - { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt }
505 - { key: PageDown, mods: Shift, chars: "\x1b[6;2~", mode: Alt }
506 - { key: PageDown, mods: Control, chars: "\x1b[6;5~" }
507 - { key: PageDown, mods: Alt, chars: "\x1b[6;3~" }
508 - { key: PageDown, chars: "\x1b[6~" }
509 - { key: Tab, mods: Shift, chars: "\x1b[Z" }
510 - { key: Back, chars: "\x7f" }
511 - { key: Back, mods: Alt, chars: "\x1b\x7f" }
512 - { key: Insert, chars: "\x1b[2~" }
513 - { key: Delete, chars: "\x1b[3~" }
514 - { key: Left, mods: Shift, chars: "\x1b[1;2D" }
515 - { key: Left, mods: Control, chars: "\x1b[1;5D" }
516 - { key: Left, mods: Alt, chars: "\x1b[1;3D" }
517 - { key: Left, chars: "\x1b[D", mode: ~AppCursor }
518 - { key: Left, chars: "\x1bOD", mode: AppCursor }
519 - { key: Right, mods: Shift, chars: "\x1b[1;2C" }
520 - { key: Right, mods: Control, chars: "\x1b[1;5C" }
521 - { key: Right, mods: Alt, chars: "\x1b[1;3C" }
522 - { key: Right, chars: "\x1b[C", mode: ~AppCursor }
523 - { key: Right, chars: "\x1bOC", mode: AppCursor }
524 - { key: Up, mods: Shift, chars: "\x1b[1;2A" }
525 - { key: Up, mods: Control, chars: "\x1b[1;5A" }
526 - { key: Up, mods: Alt, chars: "\x1b[1;3A" }
527 - { key: Up, chars: "\x1b[A", mode: ~AppCursor }
528 - { key: Up, chars: "\x1bOA", mode: AppCursor }
529 - { key: Down, mods: Shift, chars: "\x1b[1;2B" }
530 - { key: Down, mods: Control, chars: "\x1b[1;5B" }
531 - { key: Down, mods: Alt, chars: "\x1b[1;3B" }
532 - { key: Down, chars: "\x1b[B", mode: ~AppCursor }
533 - { key: Down, chars: "\x1bOB", mode: AppCursor }
534 - { key: F1, chars: "\x1bOP" }
535 - { key: F2, chars: "\x1bOQ" }
536 - { key: F3, chars: "\x1bOR" }
537 - { key: F4, chars: "\x1bOS" }
538 - { key: F5, chars: "\x1b[15~" }
539 - { key: F6, chars: "\x1b[17~" }
540 - { key: F7, chars: "\x1b[18~" }
541 - { key: F8, chars: "\x1b[19~" }
542 - { key: F9, chars: "\x1b[20~" }
543 - { key: F10, chars: "\x1b[21~" }
544 - { key: F11, chars: "\x1b[23~" }
545 - { key: F12, chars: "\x1b[24~" }
546 - { key: F1, mods: Shift, chars: "\x1b[1;2P" }
547 - { key: F2, mods: Shift, chars: "\x1b[1;2Q" }
548 - { key: F3, mods: Shift, chars: "\x1b[1;2R" }
549 - { key: F4, mods: Shift, chars: "\x1b[1;2S" }
550 - { key: F5, mods: Shift, chars: "\x1b[15;2~" }
551 - { key: F6, mods: Shift, chars: "\x1b[17;2~" }
552 - { key: F7, mods: Shift, chars: "\x1b[18;2~" }
553 - { key: F8, mods: Shift, chars: "\x1b[19;2~" }
554 - { key: F9, mods: Shift, chars: "\x1b[20;2~" }
555 - { key: F10, mods: Shift, chars: "\x1b[21;2~" }
556 - { key: F11, mods: Shift, chars: "\x1b[23;2~" }
557 - { key: F12, mods: Shift, chars: "\x1b[24;2~" }
558 - { key: F1, mods: Control, chars: "\x1b[1;5P" }
559 - { key: F2, mods: Control, chars: "\x1b[1;5Q" }
560 - { key: F3, mods: Control, chars: "\x1b[1;5R" }
561 - { key: F4, mods: Control, chars: "\x1b[1;5S" }
562 - { key: F5, mods: Control, chars: "\x1b[15;5~" }
563 - { key: F6, mods: Control, chars: "\x1b[17;5~" }
564 - { key: F7, mods: Control, chars: "\x1b[18;5~" }
565 - { key: F8, mods: Control, chars: "\x1b[19;5~" }
566 - { key: F9, mods: Control, chars: "\x1b[20;5~" }
567 - { key: F10, mods: Control, chars: "\x1b[21;5~" }
568 - { key: F11, mods: Control, chars: "\x1b[23;5~" }
569 - { key: F12, mods: Control, chars: "\x1b[24;5~" }
570 - { key: F1, mods: Alt, chars: "\x1b[1;6P" }
571 - { key: F2, mods: Alt, chars: "\x1b[1;6Q" }
572 - { key: F3, mods: Alt, chars: "\x1b[1;6R" }
573 - { key: F4, mods: Alt, chars: "\x1b[1;6S" }
574 - { key: F5, mods: Alt, chars: "\x1b[15;6~" }
575 - { key: F6, mods: Alt, chars: "\x1b[17;6~" }
576 - { key: F7, mods: Alt, chars: "\x1b[18;6~" }
577 - { key: F8, mods: Alt, chars: "\x1b[19;6~" }
578 - { key: F9, mods: Alt, chars: "\x1b[20;6~" }
579 - { key: F10, mods: Alt, chars: "\x1b[21;6~" }
580 - { key: F11, mods: Alt, chars: "\x1b[23;6~" }
581 - { key: F12, mods: Alt, chars: "\x1b[24;6~" }
582 - { key: F1, mods: Super, chars: "\x1b[1;3P" }
583 - { key: F2, mods: Super, chars: "\x1b[1;3Q" }
584 - { key: F3, mods: Super, chars: "\x1b[1;3R" }
585 - { key: F4, mods: Super, chars: "\x1b[1;3S" }
586 - { key: F5, mods: Super, chars: "\x1b[15;3~" }
587 - { key: F6, mods: Super, chars: "\x1b[17;3~" }
588 - { key: F7, mods: Super, chars: "\x1b[18;3~" }
589 - { key: F8, mods: Super, chars: "\x1b[19;3~" }
590 - { key: F9, mods: Super, chars: "\x1b[20;3~" }
591 - { key: F10, mods: Super, chars: "\x1b[21;3~" }
592 - { key: F11, mods: Super, chars: "\x1b[23;3~" }
593 - { key: F12, mods: Super, chars: "\x1b[24;3~" }
594 - { key: NumpadEnter, chars: "\n" }
595
596# tmux key bindings
597 - { key: T, mods: Command, chars: "\x02\x25" }
598 - { key: T, mods: Command|Shift, chars: "\x02\x22" }
599 - { key: W, mods: Command, chars: "\x04" }
600 - { key: H, mods: Command, chars: "\x02\x1b\x5b\x44" }
601 - { key: J, mods: Command, chars: "\x02\x1b\x5b\x42" }
602 - { key: K, mods: Command, chars: "\x02\x1b\x5b\x41" }
603 - { key: L, mods: Command, chars: "\x02\x1b\x5b\x43" }
604 - { key: Up, mods: Command, chars: "\x02\x1b\x5b\x31\x3b\x33\x41" }
605 - { key: Down, mods: Command, chars: "\x02\x1b\x5b\x31\x3b\x33\x42" }
606 - { key: Right, mods: Command, chars: "\x02\x1b\x5b\x31\x3b\x33\x43" }
607 - { key: Left, mods: Command, chars: "\x02\x1b\x5b\x31\x3b\x33\x44" }
608