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 …

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.

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.

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:

My tmux session list. Note the status line including current AWS region and CLI version.

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 :q is 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 LOCK key: in order for tmux and Alacritty to play together nicely, I tell tmux that its trigger is the function key F11 and then I use Karabiner Elements to map CAPS LOCK to 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 tmux but 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):

Principal Open Source Product Developer Advocate, AWS | observability | service meshes

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store