-
Notifications
You must be signed in to change notification settings - Fork 1
/
alacritty.yml
500 lines (466 loc) · 22 KB
/
alacritty.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
---
# Configuration for Alacritty, the GPU enhanced terminal emulator
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty it self.
env:
# TERM env customization.
#
# If this property is not set, alacritty will set it to xterm-256color.
#
# Note that some xterm terminfo databases don't declare support for italics.
# You can verify this by checking for the presence of `smso` and `sitm` in
# `infocmp xterm-256color`.
TERM: alacritty
TESTENV: testvalue
# Window dimensions in character columns and lines
# Falls back to size specified by window manager if set to 0x0.
# (changes require restart)
window:
opacity: 0.93
blur: false
dimensions:
columns: 170
lines: 50
dynamic_padding: true
padding:
x: 2
y: 2
decorations: 'Buttonless'
option_as_alt: 'OnlyLeft'
# Font configuration (changes require restart)
#
# Important font attributes like antialiasing, subpixel aa, and hinting can be
# controlled through fontconfig. Specifically, the following attributes should
# have an effect:
#
# * hintstyle
# * antialias
# * lcdfilter
# * rgba
#
# For instance, if you wish to disable subpixel antialiasing, you might set the
# rgba property to "none". If you wish to completely disable antialiasing, you
# can set antialias to false.
#
# Please see these resources for more information on how to use fontconfig
#
# * https://wiki.archlinux.org/index.php/font_configuration#Fontconfig_configuration
# * file:///usr/share/doc/fontconfig/fontconfig-user.html
font:
# The normal (roman) font face to use.
normal:
family: "IosevkaTerm Nerd Font Mono" # should be "Menlo" or something on macOS.
style: Medium
# The bold font face
bold:
family: "IosevkaTerm Nerd Font Mono" # should be "Menlo" or something on macOS.
style: Heavy
bold_italic:
family: "IosevkaTerm Nerd Font Mono" # should be "Menlo" or something on macOS.
style: Heavy Italic
# The italic font face
italic:
family: "IosevkaTerm Nerd Font Mono" # should be "Menlo" or something on macOS.
style: Medium Italic
# antialias: true
# Point size of the font
size: 12
# Offset is the extra space around each character. offset.y can be thought of
# as modifying the linespacing, and offset.x as modifying the letter spacing.
offset:
x: 0
y: 0
# Glyph offset determines the locations of the glyphs within their cells with
# the default being at the bottom. Increase the x offset to move the glyph to
# the right, increase the y offset to move the glyph upward.
glyph_offset:
x: 0
y: 0
builtin_box_drawing: false
# OS X only: use thin stroke font rendering. Thin strokes are suitable
# for retina displays, but for non-retina you probably want this set to
# false.
# use_thin_strokes: true
# Should display the render timer
# render_timer: false
# custom_cursor_colors: true
cursor:
style:
blinking: Always
blink_interval: 500
blink_timeout: 0
# Colors (Tomorrow Night)
colors:
draw_bold_text_with_bright_colors: false
# Default colors
primary:
background: '0x101310'
foreground: '0xd6d6d6'
# Colors the cursor will use if `custom_cursor_colors` is true
cursor:
text: '0x0f640f'
cursor: '0x00ff00'
# style: 'Block'
# Normal colors
normal:
black: '0x282828'
red: '0xf78d8c'
green: '0xa8d4a9'
yellow: '0xffd479'
blue: '0x78aad6'
magenta: '0xd7acd6'
cyan: '0x76d4d6'
white: '0xeeeeee'
# Bright colors
bright:
black: '0x444444'
red: '0xff3334'
green: '0x9ec400'
yellow: '0xf0c674'
blue: '0x81a2be'
magenta: '0xb77ee0'
cyan: '0x54ced6'
white: '0xffffff'
transparent_background_colors: true
hints:
enabled:
[{ # prioritize explicit osc8 hyperlinks that I generate over anything else
command: "/Users/slu/util/alacritty-open-hint-file-link.sh",
hyperlinks: true,
post_processing: true,
mouse: {enabled: true, mods: "Shift"},
binding: {key: "L", mods: "Control|Shift"},
}, {
command: "/Users/slu/util/alacritty-open-hint-code-loc.sh",
regex: '(file://)?[-0-9a-z/\._]+:[0-9]+(:[0-9]+)?',
binding: {key: "V", mods: "Control|Shift"},
mouse: {enabled: true, mods: "Shift"}
}, { # This is the default plain url link handling
command: "open", # On Linux/BSD
post_processing: true,
persist: false,
mouse: {enabled: true, mods: "Shift"},
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{-}\\^⟨⟩`]+"
}]
# Visual Bell
#
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
# rung, the terminal background will be set to white and transition back to the
# default background color. You can control the rate of this transition by
# setting the `duration` property (represented in milliseconds). You can also
# configure the transition function by setting the `animation` property.
#
# Possible values for `animation`
# `Ease`
# `EaseOut`
# `EaseOutSine`
# `EaseOutQuad`
# `EaseOutCubic`
# `EaseOutQuart`
# `EaseOutQuint`
# `EaseOutExpo`
# `EaseOutCirc`
# `Linear`
#
# To completely disable the visual bell, set its duration to 0.
#
bell:
animation: EaseOutExpo
duration: 20
color: '0x101010'
# Mouse bindings
#
# Currently doesn't support modifiers. Both the `mouse` and `action` fields must
# be specified.
#
# Values for `mouse`:
# - Middle
# - Left
# - Right
# - Numeric identifier such as `5`
#
# Values for `action`:
# - Paste
# - PasteSelection
# - Copy (TODO)
mouse:
bindings:
- { mouse: Middle, action: PasteSelection }
## Ripping mouse binds out of macos alacritty config because almost never use mouse back/forward buttons there. That allows treesitter not to die horribly
# double_click:
# threshold: 300
# triple_click:
# threshold: 300
hide_when_typing: true
selection:
semantic_escape_chars: ",│`|:\"' ()[]{}<>"
save_to_clipboard: true
# Live config reload (changes require restart)
live_config_reload: true
scrolling:
# How many lines of scrollback to keep,
# '0' will disable scrolling.
history: 50000
multiplier: 3
# Shell
#
# You can set shell.program to the path of your favorite shell, e.g. /bin/fish.
# Entries in shell.args are passed unmodified as arguments to the shell.
# shell:
# program: /usr/local/bin/zsh
# args:
# - --login
# shell:
# program: login
# args: ["-fp", "slu"]
# Key bindings
#
# Each binding is defined as an object with some properties. Most of the
# properties are optional. All of the alphabetical keys should have a letter for
# the `key` value such as `V`. Function keys are probably what you would expect
# as well (F1, F2, ..). The number keys above the main keyboard are encoded as
# `Key1`, `Key2`, etc. Keys on the number pad are encoded `Number1`, `Number2`,
# etc. These all match the glutin::VirtualKeyCode variants.
#
# Possible values for `mods`
# `Command`, `Super` refer to the super/command/windows key
# `Control` for the control key
# `Shift` for the Shift key
# `Alt` and `Option` refer to alt/option
#
# mods may be combined with a `|`. For example, requiring control and shift
# looks like:
#
# mods: Control|Shift
#
# The parser is currently quite sensitive to whitespace and capitalization -
# capitalization must match exactly, and piped items must not have whitespace
# around them.
#
# Either an `action`, `chars`, or `command` field must be present.
# `action` must be one of `Paste`, `PasteSelection`, `Copy`, or `Quit`.
# `chars` writes the specified string every time that binding is activated.
# These should generally be escape sequences, but they can be configured to
# send arbitrary strings of bytes.
# `command` must be a map containing a `program` string, and `args` array of
# strings. For example:
# - { ... , command: { program: "alacritty", args: ["-e", "vttest"] } }
#
# Want to add a binding (e.g. "PageUp") but are unsure what the X sequence
# (e.g. "\x1b[5~") is? Open another terminal (like xterm) without tmux,
# then run `showkey -a` to get the sequence associated to a key combination.
keyboard:
bindings:
- { key: N, mods: Command, action: CreateNewWindow }
- { key: V, mods: Command, action: Paste }
- { key: C, mods: Command, action: Copy }
- { key: Key0, mods: Command, action: ResetFontSize }
- { key: Equals, mods: Command, action: IncreaseFontSize }
- { key: Minus, mods: Command, action: DecreaseFontSize }
- { key: Return, mods: Shift, chars: "\x1b\x0a" }
- { key: Comma, mods: Alt, chars: "\x1b," }
- { key: Comma, mods: Command, chars: "\x1b," }
- { key: Comma, mods: Control, chars: "\x1bcomma]" }
- { key: Period, mods: Alt, chars: "\x1b." }
- { key: Period, mods: Command, chars: "\x1b." }
- { key: Period, mods: Shift|Command, chars: "\x1b>" }
- { key: Key1, mods: Alt, chars: "\x1b1" }
- { key: Key2, mods: Alt, chars: "\x1b2" }
- { key: Key3, mods: Alt, chars: "\x1b3" }
- { key: Key4, mods: Alt, chars: "\x1b4" }
- { key: Key5, mods: Alt, chars: "\x1b5" }
- { key: Key6, mods: Alt, chars: "\x1b6" }
- { key: Key7, mods: Alt, chars: "\x1b7" }
- { key: Key8, mods: Alt, chars: "\x1b8" }
- { key: Key9, mods: Alt, chars: "\x1b9" }
- { key: Key0, mods: Alt, chars: "\x1b0" }
- { key: Key1, mods: Command, chars: "\x1b1" }
- { key: Key2, mods: Command, chars: "\x1b2" }
- { key: Key3, mods: Command, chars: "\x1b3" }
- { key: Key4, mods: Command, chars: "\x1b4" }
- { key: Key5, mods: Command, chars: "\x1b5" }
- { key: Key6, mods: Command, chars: "\x1b6" }
- { key: Key7, mods: Command, chars: "\x1b7" }
- { key: Key8, mods: Command, chars: "\x1b8" }
- { key: Key9, mods: Command, chars: "\x1b9" }
- { key: Key0, mods: Command, chars: "\x1b0" }
- { key: Numpad1, chars: "\x1b1" }
- { key: Numpad2, chars: "\x1b2" }
- { key: Numpad3, chars: "\x1b3" }
- { key: Numpad4, chars: "\x1b4" }
- { key: Numpad5, chars: "\x1b5" }
- { key: Numpad6, chars: "\x1b6" }
- { key: Numpad7, chars: "\x1b7" }
- { key: Numpad8, chars: "\x1b8" }
- { key: Numpad9, chars: "\x1b9" }
- { key: Numpad0, chars: "\x1b0" }
- { key: P, mods: Command, chars: "\x1bp" }
- { key: P, mods: Alt, chars: "\x1bp" }
- { key: B, mods: Command, chars: "\x1bb" }
- { key: B, mods: Alt, chars: "\x1bb" }
- { key: C, mods: Command, chars: "\x1bc" }
- { key: C, mods: Shift|Command, chars: "\x1bC" }
- { key: C, mods: Alt, chars: "\x1bc" }
- { key: C, mods: Shift|Alt, chars: "\x1bC" }
- { key: D, mods: Shift|Command, chars: "\x1bD" }
- { key: D, mods: Shift|Alt, chars: "\x1bD" }
- { key: D, mods: Command, chars: "\x1bd" }
- { key: D, mods: Alt, chars: "\x1bd" }
# specifically disabling this because it happens way too often when we got the OS window focus
# wrong and want to reload or search in another app.
# - { key: R, mods: Command, chars: "\x1br" }
- { key: R, mods: Alt, chars: "\x1br" }
# - { key: F, mods: Command, chars: "\x1bf" }
- { key: F, mods: Alt, chars: "\x1bf" }
- { key: S, mods: Command, chars: "\x1bs" }
- { key: S, mods: Alt, chars: "\x1bs" }
- { key: S, mods: Command|Control, chars: "\x1b\x13" }
- { key: U, mods: Command, chars: "\x1bu" }
- { key: I, mods: Command, chars: "\x1bi" }
- { key: U, mods: Alt, chars: "\x1bu" }
- { key: I, mods: Alt, chars: "\x1bi" }
- { key: H, mods: Command, chars: "\x1bh" }
- { key: H, mods: Alt, chars: "\x1bh" }
- { key: H, mods: Command|Control, chars: "\x1b\x08" }
- { key: H, mods: Command|Shift, chars: "\x1bH" }
- { key: H, mods: Alt|Shift, chars: "\x1bH" }
- { key: J, mods: Command, chars: "\x1bj" }
- { key: J, mods: Alt, chars: "\x1bj" }
- { key: J, mods: Command|Control, chars: "\x1b\x0A" }
- { key: J, mods: Command|Shift, chars: "\x1bJ" }
- { key: J, mods: Alt|Shift, chars: "\x1bJ" }
- { key: K, mods: Command, chars: "\x1bk" }
- { key: K, mods: Alt, chars: "\x1bk" }
- { key: K, mods: Command|Control, chars: "\x1b\x0B" }
- { key: K, mods: Command|Shift, chars: "\x1bK" }
- { key: K, mods: Alt|Shift, chars: "\x1bK" }
- { key: L, mods: Command, chars: "\x1bl" }
- { key: L, mods: Alt, chars: "\x1bl" }
- { key: L, mods: Command|Control, chars: "\x1b\x0C" }
- { key: L, mods: Command|Shift, chars: "\x1bL" }
- { key: L, mods: Alt|Shift, chars: "\x1bL" }
- { key: M, mods: Command, chars: "\x1bm" }
- { key: M, mods: Alt, chars: "\x1bm" }
- { key: M, mods: Command|Shift, chars: "\x1bM" }
- { key: O, mods: Command, chars: "\x1bo" }
- { key: O, mods: Alt, chars: "\x1bo" }
- { key: P, mods: Command|Shift, chars: "\x1bP" }
- { key: Q, mods: Alt, chars: "\x1bq" }
- { key: W, mods: Alt, chars: "\x1bw" }
- { key: W, mods: Command, chars: "\x1bw" }
- { key: Y, mods: Command, chars: "\x1by" }
- { key: Y, mods: Alt, chars: "\x1by" }
- { key: Z, mods: Alt, chars: "\x1bz" }
- { key: Z, mods: Alt|Shift, chars: "" }
- { key: Z, mods: Command, chars: "\x1bz" }
- { key: Tab, mods: Shift, chars: "\x1b[Z" }
- { key: Tab, mods: Control, chars: "\x1b[27;5;9~" }
- { key: Tab, mods: Control|Shift, chars: "\x1b[27;6;9~" }
- { key: Tab, mods: Alt, chars: "\x1b[27;5;9~" }
- { key: Tab, mods: Alt|Shift, chars: "\x1b[27;6;9~" }
- { key: Back, chars: "\x7f" }
- { key: Back, mods: Shift, chars: "\x7f" }
- { key: Back, mods: Alt, chars: "\x1b\x7f" }
- { key: Back, mods: Control, chars: "\x1b\x7f" }
- { key: Back, mods: Command, chars: "\x15" }
- { key: Insert, mods: Shift, action: Paste }
- { key: Insert, chars: "\x1b[2~" }
# - { key: Delete, chars: "\x1b[3~" }
# home
- { key: Left, mods: Command, chars: "\x1b[H" }
- { key: Left, mods: Command|Shift, chars: "\x1b[1;9D" }
- { key: Left, mods: Control|Alt, chars: "\x1b[1;7D" }
# - { key: Left, mods: Shift, chars: "\x1b[1;2D" }
# - { key: Left, mods: Control, chars: "\x1b[1;5D" }
# - { key: Left, mods: Control|Shift, chars: "\x1b[1;6D" }
# - { key: Left, mods: Alt, chars: "\x1b[1;3D" }
# end
- { key: Right, mods: Command, chars: "\x1b[F" }
- { key: Right, mods: Shift, chars: "\x1b[1;2C" }
- { key: Right, mods: Control, chars: "\x1b[1;5C" }
- { key: Right, mods: Control|Shift, chars: "\x1b[1;6C" }
- { key: Right, mods: Alt, chars: "\x1b[1;3C" }
- { key: Up, mods: Shift, chars: "\x1b[1;2A" }
- { key: Up, mods: Control, chars: "\x1b[1;5A" }
- { key: Up, mods: Control|Shift, chars: "\x1b[1;6A" }
- { key: Up, mods: Alt, chars: "\x1b[1;3A" }
# - { key: Up, mods: Command, chars: "\x1b[6~" }
- { key: Down, mods: Shift, chars: "\x1b[1;2B" }
- { key: Down, mods: Control, chars: "\x1b[1;5B" }
- { key: Down, mods: Control|Shift, chars: "\x1b[1;6B" }
- { key: Down, mods: Alt, chars: "\x1b[1;3B" }
# - { key: Down, mods: Command, chars: "\x1b[5~" }
- { key: F11, action: ToggleSimpleFullscreen }
# After reverting to defaults we see the modifiers work like this for F keys:
# Shift: ;2
# Alt: ;3
# Shift+Alt: ;4
# Ctrl: ;5
# Shift+Ctrl: ;6
# Ctrl+Alt is off limits due to virtual console, would be ;7
# Shift+Ctrl+Alt: ;8
# Super and combos are ignored, so we'll add:
# Super as ;9
# Shift+Super as ;10
# Ctrl+Super as ;11
# Alt+Super as ;12
# We can add more as necessary
- { key: F1, mods: Command, chars: "\x1b[1;3P" }
- { key: F2, mods: Command, chars: "\x1b[1;3Q" }
- { key: F3, mods: Command, chars: "\x1b[1;3R" }
- { key: F4, mods: Command, chars: "\x1b[1;3S" }
- { key: F5, mods: Command, chars: "\x1b[15;3~" }
- { key: F6, mods: Command, chars: "\x1b[17;3~" }
- { key: F7, mods: Command, chars: "\x1b[18;3~" }
- { key: F8, mods: Command, chars: "\x1b[19;3~" }
- { key: F9, mods: Command, chars: "\x1b[20;3~" }
- { key: F10, mods: Command, chars: "\x1b[21;3~" }
- { key: F11, mods: Command, chars: "\x1b[23;3~" }
- { key: F12, mods: Command, chars: "\x1b[24;3~" }
- { key: F1, mods: Command|Shift, chars: "\x1b[1;4P" }
- { key: F2, mods: Command|Shift, chars: "\x1b[1;4Q" }
- { key: F3, mods: Command|Shift, chars: "\x1b[1;4R" }
- { key: F4, mods: Command|Shift, chars: "\x1b[1;4S" }
- { key: F5, mods: Command|Shift, chars: "\x1b[15;4~" }
- { key: F6, mods: Command|Shift, chars: "\x1b[17;4~" }
- { key: F7, mods: Command|Shift, chars: "\x1b[18;4~" }
- { key: F8, mods: Command|Shift, chars: "\x1b[19;4~" }
- { key: F9, mods: Command|Shift, chars: "\x1b[20;4~" }
- { key: F10, mods: Command|Shift, chars: "\x1b[21;4~" }
- { key: F11, mods: Command|Shift, chars: "\x1b[23;4~" }
- { key: F12, mods: Command|Shift, chars: "\x1b[24;4~" }
- { key: Slash, mods: Alt, chars: "\x1b/" }
- { key: Slash, mods: Command, chars: "\x1b/" }
# The tab switch binds for BTT for macOS: bind to my (new!) contextual tab switch (I used to use F2/F3, but decided
# to free those up for more app specific use!)
- { key: '{', mods: Command|Shift, chars: "\x1b[Y" }
- { key: '}', mods: Command|Shift, chars: "\x1b[2Y" }
- { key: '[', mods: Command, chars: "\x1b]" }
- { key: ']', mods: Command, chars: "\x1b[" }
- { key: Return, mods: Command, action: ToggleSimpleFullscreen }
# - { key: F1, mods: Super|Control, chars: "\x1b[1;11P" }
# - { key: F2, mods: Super|Control, chars: "\x1b[1;11Q" }
# - { key: F3, mods: Super|Control, chars: "\x1b[1;11R" }
# - { key: F4, mods: Super|Control, chars: "\x1b[1;11S" }
# - { key: F5, mods: Super|Control, chars: "\x1b[15;11~" }
# - { key: F6, mods: Super|Control, chars: "\x1b[17;11~" }
# - { key: F7, mods: Super|Control, chars: "\x1b[18;11~" }
# - { key: F8, mods: Super|Control, chars: "\x1b[19;11~" }
# - { key: F9, mods: Super|Control, chars: "\x1b[20;11~" }
# - { key: F10, mods: Super|Control, chars: "\x1b[21;11~" }
# - { key: F11, mods: Super|Control, chars: "\x1b[23;11~" }
# - { key: F12, mods: Super|Control, chars: "\x1b[24;11~" }
# - { key: F1, mods: Super|Alt, chars: "\x1b[1;12P" }
# - { key: F2, mods: Super|Alt, chars: "\x1b[1;12Q" }
# - { key: F3, mods: Super|Alt, chars: "\x1b[1;12R" }
# - { key: F4, mods: Super|Alt, chars: "\x1b[1;12S" }
# - { key: F5, mods: Super|Alt, chars: "\x1b[15;12~" }
# - { key: F6, mods: Super|Alt, chars: "\x1b[17;12~" }
# - { key: F7, mods: Super|Alt, chars: "\x1b[18;12~" }
# - { key: F8, mods: Super|Alt, chars: "\x1b[19;12~" }
# - { key: F9, mods: Super|Alt, chars: "\x1b[20;12~" }
# - { key: F10, mods: Super|Alt, chars: "\x1b[21;12~" }
# - { key: F11, mods: Super|Alt, chars: "\x1b[23;12~" }
# - { key: F12, mods: Super|Alt, chars: "\x1b[24;12~" }