As I wrote about recently, I’ve been pretty satisfied with kitty, but I thought I’d revisit the Alacritty + tmux combo I used before. I installed the latest versions of both, deleted my old configuration files, and started setting up fresh ones.
tmux is a terminal multiplexer, and it offers sessions (effectively instances), windows (kind of like tabs), and panes. Within a given session you “activate” it with the
ctrl-b prefix by default, something many—myself included—remap to
ctrl-a to appease old habits from GNU Screen days. That means that, for example, creating a new window is achieved by pressing
ctrl-a followed by
c. I used this prefix probably tens or hundreds of times per day for many years.
One thing you sometimes want to do is rename a window, to distinguish it from others. By default tmux uses the active command for the window name, so it often ends up being your shell or editor. You can see them on the status line at the bottom of the window here:
I prefer to name each something more specific when I have a multi-window session, which is almost always the case:
The tmux command to do this is
rename-window, which means that you press the prefix and then type
:rename-window new name goes here, which is a tiny bit clumsy for a frequently performed operation. When I first did that this morning, I remembered I used to have a shortcut—prefix then single key—but I couldn’t find a mapping in my old config. I decided to look into it more in a little bit, then maximized the terminal window and started opening tmux windows and panes to match what I used to set up for writing on my site back in the day. Reflexively, my fingers on their own pressed the prefix and comma and I was renaming the window.
I wish I could’ve seen my own face as I realized what had just happened. 🤯