Alacritty is my new terminal emulator

Inspired by Julia Evans’ recent blog posts about terminal emulators, I decided to rethink my use of rxvt-unicode. I’ve been using rxvt-unicode as my terminal emulator since 2013, when I switched from XTerm. XTerm served me well, but it lacked modern features like clickable URLs.

Over the years I have been looking for an alternative to rxvt-unicode due to two issues:

After reading Julia’s posts, I felt it was a good time to look for a replacement. I initially considered st, because it’s a minimalist suckless project, but it was too limited for my own requirements: I couldn’t create a new terminal with a custom font size using an option or set the font size on the fly.

Alacritty has been on my radar, but I disliked its YAML configuration file and never tried it. In 2023 Alacritty switched to the TOML format for its configuration, so I gave it a shot and was pleasantly surprised. It has a minimalist philosophy, while still having all the quality-of-life features I wanted, like URL clicking.

Alacritty’s performance is excellent. It has measurably lower latency than most modern terminal emulators. While I hadn’t noticed rxvt-unicode’s latency before, using them side-by-side, Alacritty feels faster.

Alacritty is easy to pilot thanks to the command alacritty msg that lets you interact with it programmatically. Another nice feature: Alacritty automatically reloads its configuration when modified, eliminating the need to start a new terminal to test the new configuration.

I want to change the font of my terminal emulator to a few preset sizes quickly with the shortcut Ctrl+Alt+{1,2,3}. To change the font size with rxvt-unicode, I have the following in my .Xresources file:

URxvt.keysym.M-C-1: command:\033]710;xft:Terminus:pixelsize=18\007\033]711;xft:Terminus:pixelsize=18\007
URxvt.keysym.M-C-2: command:\033]710;xft:Terminus:pixelsize=24\007\033]711;xft:Terminus:pixelsize=24\007
URxvt.keysym.M-C-3: command:\033]710;xft:Terminus:pixelsize=32\007\033]711;xft:Terminus:pixelsize=32\007

While this works, the syntax is obscure. rxvt-unicode relies on escape codes to set the font size, and I can’t remember why I had to specify the font and size twice with different escape codes.

When doing the same with Alacritty, it was straightforward to write. Here is the TOML configuration to switch the font size dynamically:

[keyboard]
bindings = [
  {
    key = "1",
    mods = "Control | Alt",
    command = { program = "alacritty", args = ["msg", "config", "font.size=14"]}
  },
  {
    key = "2",
    mods = "Control | Alt",
    command = { program = "alacritty", args = ["msg", "config", "font.size=18"]}
  },
  {
    key = "3",
    mods = "Control | Alt",
    command = { program = "alacritty", args = ["msg", "config", "font.size=24"]}
  },
]

This is cleaner and more maintainable. It took me just 10 minutes to write, and it’s obvious how it works.

After using Alacritty for several weeks, the switch has been worthwhile. The combination of better performance, clearer configuration, and quality-of-life features like auto-reload make it a superior choice for me.