Tmux: The Invisible Multiplexer That Holds Everything Together
Why tmux became the glue layer between your terminal and your projects—persisting sessions, enabling parallel work, and removing the switching tax.
Tmux is invisible until you go without it.
I didn't understand that until I tried to work without it for a week. Within an hour I was hunting for a terminal window with a specific project's environment loaded. By hour three, I'd lost track of which SSH session was which. By end of day, I realized I'd rebuilt the same tmux session five times through context-switching instead of just attaching to it.
Tmux is a terminal multiplexer. That's the boring definition. The real definition is that it's the foundation layer that makes everything else in your Unix workflow actually work—i3, vim, fish, everything. It persists state so you can work across contexts without paying the switching tax every time.
The Problem Tmux Solves
Before tmux: you have one terminal window per project. Switch projects? Close it, open a new one. Reboot? Everything's gone—bash history, environment, running services, all of it. SSH to a server? Good luck if your connection drops; you can't resume that session.
With tmux: you have sessions. A session is a persistent workspace. You can detach from it (close the terminal, shut down your computer, whatever), and the session keeps running. Reattach to it later and everything is exactly where you left it—bash history, running processes, shell environment, open panes.
The other layers stack on top of that:
- Panes: Split your terminal into vertical and horizontal splits. I've got four panes open right now—one for builds, one for shell, one for logs, one for editor output.
- Windows: Tabs within a session. One window for backend work, one for frontend, one for infra, one for admin tasks. Switch with
Ctrl+Space(my prefix) + number. - Sessions: Separate isolated workspaces. One for this project, one for that service, one for random debugging. Attach and detach without killing anything.
Each layer lets you work in parallel without actually paying the context-switching tax.
Why the Default Setup Sucks
Tmux comes with Ctrl+B as the prefix. That's terrible. Your thumb is already on Ctrl for other commands. Ctrl+Space is better—it's a key you almost never use, and it's in a nicer position.
# My config: rebind prefix to C-Space
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix
# Keep C-b as a fallback for muscle memory
set -g prefix2 C-bDefault pane splitting is " (vertical) and % (horizontal). Those are the worst keys to remember. I rebind to | and - because they're visual—you can see what they do.
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %Default scroll history is 2,000 lines. I need 100,000 because I often need to scroll back through build logs.
set-option -g history-limit 100000The defaults were designed for 1980s servers. You're not on a 1980s server.
The Layer Stack
I built tmux to work with my other tools, not against them:
Fish shell as the default. It's faster and smarter than bash for interactive use.
set-option -g default-shell /usr/bin/fishAlacritty (the terminal emulator) supports true color and Wayland natively. Tmux needs to tell it how to handle colors:
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",alacritty:Tc"Vi mode keys everywhere. If i3 is keyboard-driven, tmux should be too. Copy mode uses vim bindings, and I can navigate the buffer without thinking.
setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe 'xclip -in -selection clipboard &> /dev/null'Mouse support. I know purists hate this, but I can resize panes and switch windows by clicking. That's not inefficient; that's just not fighting the tool.
set -g mouse onThe Plugins That Actually Matter
Most tmux plugins are noise. I use three:
tmux-sensible: Sets reasonable defaults. You should just run this.
tmux-open: Open URLs or files directly from your terminal. Select text in tmux, press your binding, and it opens in your default app.
tmux-floax: This one's important. It creates floating panes—a panel that sits on top of your layout and doesn't disrupt your grid. I use it for quick tasks: check a doc, run a command, dismiss it. Bound to P.
set -g @plugin 'omerxx/tmux-floax'
set -g @floax-bind-menu 'P'dracula theme: The default tmux status bar is boring. Dracula makes it readable and fast.
set -g @plugin 'dracula/tmux'
set -g @dracula-show-powerline true
set -g @dracula-plugins "network ssh-session"Anything else is probably making your config slower without making your work faster.
How I Actually Use It
Typical day:
-
Start the laptop. Tmux servers are already running from before the reboot (they were detached, still running in the background).
-
tmux attach-session -t backend— jump into the backend project. The panes are exactly where I left them. Build logs are scrolled to where I need them. -
Open a floating pane with
Ctrl+Space Pto check a service health endpoint while keeping my editor in view. -
Ctrl+Space + 2to switch to the infra window and check deployment status. -
Detach (
Ctrl+Space D). Close the terminal. The sessions are still running. -
Later:
tmux attach-session -t backend. Reattach. Everything's there.
The friction disappears. No rebuild, no re-context-loading, no "where was I" moment. Just attach and work.
Why This Matters for Unix
Unix is built around composable tools. Your text editor works with your shell which works with your build system which works with your deployment tooling. Tmux is the persistence layer that makes that composition work across time.
Without tmux, every terminal restart is a context wipe. Your environment variables are gone. Your build state is gone. You're starting over.
With tmux, the session persists. You close your laptop, you open it six hours later, you attach to the session, and you're exactly where you left off. That's not just convenience. That's how you actually work at Unix.
The Config
Full config lives in my dotfiles repo. Copy it, adapt the color scheme if dracula isn't your taste, and run:
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
cp tmux.conf ~/.tmux.conf
# In tmux, run: Ctrl+Space + I to install pluginsFive minutes of setup. Years of time saved from not context-switching.
Tmux + i3 + Alacritty + Fish = a terminal experience designed for actually getting work done, not fighting the tool.
That's the real reason I use it.