Below are some terminal emulators that I used across platforms.
Operating System | Terminal Emulators |
---|---|
MacOS | Terminal, iTerm2 |
Windows | Command Prompt, Powershell, Cygwin, Windows Terminal |
Ubuntu | Gnome Terminal, Tilix |
All the above emulators are good, but one issue is each has its settings. You can export settings and keep them in dotfiles, but I was looking for one terminal emulator you can use across all the platforms.
You can accomplish this with Alacritty terminal emulator. It’s lightweight and cross-platform with an OpenGL terminal emulator. Another one is kitty, but kitty does not support windows.
Please note that Alacritty is not like iTerm2 - which provides tabs, split screens, synchronized panes & triggers, etc. All this can be accomplished by terminal multiplexer - tmux. I wrote a separate post that goes through how to setup tmux
Installation
For both macOS and Windows, there are pre-built binaries from Alacritty releases. For Linux, you can follow the instructions listed here
Configuration
You can use the sample configuration which is listed in Alacritty release page
For Mac and OS, the configuration is at ~/.config/alacritty/alacritty.yml
. For Windows, the configuration is at
C:/Users/<username>/AppData/Roaming/alacritty/alacritty.yml
. Below is the configuration I am using for Alacritty.
window:
dynamic_padding: false
decorations: buttonless
font:
size: 16
normal:
family: MesloLGSDZ Nerd Font
colors:
name: Pulp
author: ""
primary:
background: "#000000"
foreground: "#ffffff"
cursor:
text: "#000000"
cursor: "#ffffff"
normal:
black: "#86817e"
red: "#d75756"
green: "#688c7d"
yellow: "#ffb365"
blue: "#68778c"
magenta: "#fdb3b2"
cyan: "#86abd9"
white: "#f7f8f2"
bright:
black: "#86817e"
red: "#a63a3a"
green: "#688c7d"
yellow: "#ffb365"
blue: "#68778c"
magenta: "#8c686a"
cyan: "#86abd9"
white: "#f7f8f2"
You can quickly preview themes using alacritty-themes
Install alacritty-themes npm i -g alacritty-themes
. And then use alacritty-themes
to get a fuzzy search of themes as you navigate
the alacritty theme is applied and changed.
Note: For comments visibility in terminal, better choose themes like Bleh
, Erebus
, Gutterslob lightwhite
, Pulp
, Jelly beans
,
Muzieoco pastel white
Fonts
For font installation,
MacOS
brew tap homebrew/cask-fonts
brew install --cask font-meslo-lg-nerd-font
Windows
Download fonts from ryanoasis nert fonts
and copy ttf files to C:\Windows\Fonts
Linux
Installing fonts on Ubuntu
https://github.com/ryanoasis/nerd-fonts/tags
$ sudo apt install fontconfig
$ cd ~
$ wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/Meslo.zip
$ mkdir -p .local/share/fonts
$ unzip Meslo.zip -d .local/share/fonts
$ cd .local/share/fonts
$ rm *Windows*
$ cd ~
$ rm Meslo.zip
$ fc-cache -fv
Custom key bindings
For macOS, alt keys might not work correctly, have below keybindings listed in alacritty.yml
key_bindings:
- { key: A, mods: Alt, chars: "\ea" }
- { key: B, mods: Alt, chars: "\eb" }
- { key: C, mods: Alt, chars: "\ec" }
- { key: D, mods: Alt, chars: "\ed" }
- { key: E, mods: Alt, chars: "\ee" }
- { key: F, mods: Alt, chars: "\ef" }
- { key: G, mods: Alt, chars: "\eg" }
- { key: H, mods: Alt, chars: "\eh" }
- { key: I, mods: Alt, chars: "\ei" }
- { key: J, mods: Alt, chars: "\ej" }
- { key: K, mods: Alt, chars: "\ek" }
- { key: L, mods: Alt, chars: "\el" }
- { key: M, mods: Alt, chars: "\em" }
- { key: N, mods: Alt, chars: "\en" }
- { key: O, mods: Alt, chars: "\eo" }
- { key: P, mods: Alt, chars: "\ep" }
- { key: Q, mods: Alt, chars: "\eq" }
- { key: R, mods: Alt, chars: "\er" }
- { key: S, mods: Alt, chars: "\es" }
- { key: T, mods: Alt, chars: "\et" }
- { key: U, mods: Alt, chars: "\eu" }
- { key: V, mods: Alt, chars: "\ev" }
- { key: W, mods: Alt, chars: "\ew" }
- { key: X, mods: Alt, chars: "\ex" }
- { key: Y, mods: Alt, chars: "\ey" }
- { key: Z, mods: Alt, chars: "\ez" }
- { key: A, mods: Alt|Shift, chars: "\eA" }
- { key: B, mods: Alt|Shift, chars: "\eB" }
- { key: C, mods: Alt|Shift, chars: "\eC" }
- { key: D, mods: Alt|Shift, chars: "\eD" }
- { key: E, mods: Alt|Shift, chars: "\eE" }
- { key: F, mods: Alt|Shift, chars: "\eF" }
- { key: G, mods: Alt|Shift, chars: "\eG" }
- { key: H, mods: Alt|Shift, chars: "\eH" }
- { key: I, mods: Alt|Shift, chars: "\eI" }
- { key: J, mods: Alt|Shift, chars: "\eJ" }
- { key: K, mods: Alt|Shift, chars: "\eK" }
- { key: L, mods: Alt|Shift, chars: "\eL" }
- { key: M, mods: Alt|Shift, chars: "\eM" }
- { key: N, mods: Alt|Shift, chars: "\eN" }
- { key: O, mods: Alt|Shift, chars: "\eO" }
- { key: P, mods: Alt|Shift, chars: "\eP" }
- { key: Q, mods: Alt|Shift, chars: "\eQ" }
- { key: R, mods: Alt|Shift, chars: "\eR" }
- { key: S, mods: Alt|Shift, chars: "\eS" }
- { key: T, mods: Alt|Shift, chars: "\eT" }
- { key: U, mods: Alt|Shift, chars: "\eU" }
- { key: V, mods: Alt|Shift, chars: "\eV" }
- { key: W, mods: Alt|Shift, chars: "\eW" }
- { key: X, mods: Alt|Shift, chars: "\eX" }
- { key: Y, mods: Alt|Shift, chars: "\eY" }
- { key: Z, mods: Alt|Shift, chars: "\eZ" }
- { key: Key1, mods: Alt, chars: "\e1" }
- { key: Key2, mods: Alt, chars: "\e2" }
- { key: Key3, mods: Alt, chars: "\e3" }
- { key: Key4, mods: Alt, chars: "\e4" }
- { key: Key5, mods: Alt, chars: "\e5" }
- { key: Key6, mods: Alt, chars: "\e6" }
- { key: Key7, mods: Alt, chars: "\e7" }
- { key: Key8, mods: Alt, chars: "\e8" }
- { key: Key9, mods: Alt, chars: "\e9" }
- { key: Key0, mods: Alt, chars: "\e0" }
- { key: Space, mods: Control, chars: "\0" }
# Ctrl + Space
- { key: Grave, mods: Alt, chars: "\e`" }
# Alt + `
- { key: Grave, mods: Alt|Shift, chars: "\e~" }
# Alt + ~
- { key: Period, mods: Alt, chars: "\e." }
# Alt + .
- { key: Key8, mods: Alt|Shift, chars: "\e*" }
# Alt + *
- { key: Key3, mods: Alt|Shift, chars: "\e#" }
# Alt + #
- { key: Period, mods: Alt|Shift, chars: "\e>" }
# Alt + >
- { key: Comma, mods: Alt|Shift, chars: "\e<" }
# Alt + <
- { key: Minus, mods: Alt|Shift, chars: "\e_" }
# Alt + _
- { key: Key5, mods: Alt|Shift, chars: "\e%" }
# Alt + %
- { key: Key6, mods: Alt|Shift, chars: "\e^" }
# Alt + ^
- { key: Backslash, mods: Alt, chars: "\e\\" }
# Alt + \
- { key: Backslash, mods: Alt|Shift, chars: "\e|" }
# Alt + |
Conclusion
If you are looking for a cross-platform terminal emulator, check Alacritty. You can refer to my configuration here. Another terminal emulator also good is kitty. You can refer my kitty config file here (location of kitty conf is ~/.config/kitty/kitty.conf) – RC
Comments