I have written before about using Alacritty as my terminal and I’ve configured it using YAML. I’ve been a general fan of YAML, I like the way the syntax looks and there aren’t too many brackets of any kind, if it had a line terminator, that’d be great. The downside is that it is indent dependent. But for the most part I’m comfortable with YAML and wherever an option is provided for using YAML, I pick it over TOML.

However, as of version 13 Alacritty is deprecating YAML in favor of TOML (they’re providing a alacritty migrate command that works very well). So I decided to just get with the program instead of delay adoption. This comes with the unexpected side benefit of being able to do imports of one configuration file into another. I discovered this because @benmo got me wondering how to change the theme of the terminal while in a remote SSH session.

The solution that TOML enable is to create a new configuration file which imports the standard configuration and then just overwrites (and/or adds) to the existing configuration. So I just made a new config file called alacritty-remote.toml:

1
2
3
4
5
import=["~/.config/alacritty/alacritty.toml"]

[colors.primary]
background = "0x333333"
foreground = "0xD8DEE9"

Then I created a function in zsh called remoteshh to start a new Alacritty shell window with this new config file:

1
2
3
function sshremote() {
        alacritty --config-file ~/.config/alacritty/alacritty-remote.toml -e ssh $1 & disown
}

Now when I connect to a remote server over SSH instead of typing ssh server I type sshremote server and I get window with a different background color (I’ll probably theme is more later).

After I told my friend about this whole YAML to TOML saga, he made this…

Distracted boyfriend meme format with girl in red dress labeled TOML, boyfriend labeled SHOM, and girlfriend labeld YAML
I feel like we've both unlocked a new level of nerd.