Alacritty config

In my previous post about WSL setup I mentioned that Alacritty gave me some glitches in the LF file manager. Here I will explain how I finally configured Alacritty and made it my main terminal emulator.

Why did I want to change wsltty?

Maybe it is good to explain my motivation to change wsltty to another emulator. Yes, I really like wsltty and I would recommend it to anyone but I missed some capabilities of more flexible configuration there, especially configuration of the fonts rendering where I can fine tune distance between lines, between characters and adjust positions of glyphs.

And I wanted to have something new, more flexible but yet simpler to configure.

Why Alacritty?

I like Alacritty preliminary because of its rendering quality and simple configuration. It supports UTF-8 fully, but does not have good support of Emojies. Configuration is made via simple “YAML” file.

Because I almost never use emojis in my texts and terminal, I gave it up for better support of Nerd Fonts with all special glyphicons. It allows me to use icons for LF file manager and utilities like ls deluxe.

If you are using digraphs, then Alacritty might not be for you. At least on Windows for the WSL. wsltty can display almost all digraphs from he VIM digraphs table, while Alacritty does not show all Asian and some other symbols.

Alacritty setup

Fonts

The key to correct work of Alacritty is a font. I tried all Nerd Fonts and finally found one which fits me the most. Here is the list of fonts I found the best for me in the preferential order:

  1. Cousine Nerd Font
  2. Hack Nerd Font
  3. Meslo Nerd Font
  4. Mononoki Nerd Font
  5. DroidSansMono Nerd Font

I finally selected Cousine Nerd Font as my main font.

Configuration file

Then comes the easiest part - Alacritty configuration. Just follow the guide and make your own file.

Here is mine (I removed all strings which I don’t setup):

 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
window:
  decorations: full
  startup_mode: Maximized
  title: My Home LenovoYoga
font:
  normal:
    family: Cousine NF
  size: 12.0
  offset:
   x: 0
   y: 2
  glyph_offset:
   x: -1
   y: 0
draw_bold_text_with_bright_colors: false
colors:
  primary:
   background: '#000000'
   foreground: '#FFFFFF'
  #### { My theme
  #
  normal:
   black:   '#000000'
   red:     '#ff6060'
   green:   '#60ff60'
   yellow:  '#ffff36'
   blue:    '#1296be'
   magenta: '#ff4dff'
   cyan:    '#54ccef'
   white:   '#ffffff'
  
  bright:
   black:   '#363636'
   red:     '#ff8080'
   green:   '#18ed93'
   yellow:  '#ffff80'
   blue:    '#1bbae9'
   magenta: '#ff80ff'
   cyan:    '#8eddf4'
   white:   '#ffffff'
  #
  #### } End of my theme (MobaXterm B/W theme)
background_opacity: 1.0
live_config_reload: true
shell:
  program: wsl
  args:
   - "~"
winpty_backend: false
key_bindings:
  # (Windows, Linux, and BSD only)
  - { key: V,        mods: Control|Shift, action: Paste            }
  - { key: C,        mods: Control|Shift, action: Copy             }
  - { key: Insert,   mods: Shift,         action: PasteSelection   }
  - { key: Key0,     mods: Control,       action: ResetFontSize    }
  - { key: Equals,   mods: Control,       action: IncreaseFontSize }
  - { key: Add,      mods: Control,       action: IncreaseFontSize }
  - { key: Subtract, mods: Control,       action: DecreaseFontSize }
  - { key: Minus,    mods: Control,       action: DecreaseFontSize }
  # (Windows only)
  - { key: Return,   mods: Alt,           action: ToggleFullscreen }

Full default configuration you can find here.

Screenshots

Here are screenshots of how Allacrity looks on my home PC.

Alacritty Screenshot 1

Alacritty Screenshot 1

Alacritty Screenshot 2

Alacritty Screenshot 2

Alacritty Screenshot 2

Alacritty Screenshot 3