Apologies for the clickbaity title but since I have your attention now: in this post I describe my terminal setup in a little greater detail. I’m using a combination of tmux + Alacritty + Fish shell (tAF for short) and here’s how I’ve got it configured. I’m pragmatic about the setup, so if you think kitty is the best terminal, if you are into
screen, if you are convinced the only shell worth using is
zsh or Oil then I have one thing for you: YOU’RE WELCOME TO USE WHATEVER YOU LIKE. You do you and I do …
The terminal: Alacritty
Let’s start with the basics: the terminal. I’ve been using
iTerm2 for many years and there’s nothing wrong with it per se, just a little much. I wanted a lightweight terminal with declarative configuration I can version and apply across architectures and machines. Then, when getting more into Rust, I stumbled upon Alacritty and I’m not gonna lie, they had me at GPU support.
Many sessions: tmux
No matter if local of remote sessions, I have dedicated environments with multiple windows I can switch between, zoom in and out, open and close using keyboard shortcuts. Thanks to tmux-resurrect I can nuke the whole setup at any time and it will restore everything—besides local environment variables, which I consider a good thing—exactly to the state it was.
A friendly shell: Fish
Having a modern shell with auto-complete, sane history, and again declarative config is just nice. Enter Fish. I was worried concerning the scripts (let’s be honest, 99% of the scripts are Bash) but this turns out not to be a problem. It was a tiny bit of a learning curve, especially letting go of (bad) habits, but overall it took me maybe a month to get used to
Overview of all my sessions in
tmux looks as follows:
A couple of notes on my setup and flow:
- A new terminal pane is just a
CAPS LOCK + |(vertical split) or a
CAPS LOCK + -(horizontal split) away. And
:qis mapped to closing a pane, guess why? ;)
- Listing sessions (
CAPS LOCK + s) and toggle a pane(
CAPS LOCK + z) to zoom in/out is fast.
- One trick I’m using to be a little more efficient is re-mapping the, usually under-utilized,
CAPS LOCKkey: in order for
tmuxand Alacritty to play together nicely, I tell
tmuxthat its trigger is the function key
F11and then I use Karabiner Elements to map
F11. I haven’t found a more direct way to make this work without upsetting one of the involved players, happy to learn otherwise.
- There are a few more things I’m doing to make
vi(really, Neovim) play nicely with
tmuxbut that’s gonna be the subject of a future blog post.
Have fun experimenting to find your optimal terminal setup and please do share tips and tricks either here or via Twitter!
— — —
For reference, here’s the complete setup, that is, configuration files for
tmux, Alacritty, and Fish (config & prompt):