I've been using an i3 + Alacritty + Vim setup for a while, and recently spent some time getting my tmux workflow organized again.
My setup is fairly simple:
i3
└── Alacritty
└── tmux
├── Vim
├── shell
├── SSH
└── other terminal work
tmux fits nicely into this setup because i3 handles the graphical windows while tmux handles the terminal environment.
tmux windows
I mostly use the standard tmux prefix:
Ctrl-b
followed by a command.
Some of the shortcuts I use regularly are:
Ctrl-b n next window
Ctrl-b p previous window
Ctrl-b l last window
Ctrl-b c create a window
Ctrl-b z zoom the current pane
Ctrl-b d detach
One small detail worth remembering is that these are two-key sequences, not simultaneous combinations.
For example:
Ctrl-b
release
z
zooms the current pane.
tmux sessions
The session functionality is particularly useful when working with several terminal environments.
Running:
tmux ls
shows the sessions currently running:
0: 5 windows
1: 1 windows
2: 1 windows
My regular environment is in session 0.
When already inside tmux, I can switch directly to it with:
tmux switch-client -t 0
rather than trying to attach another tmux client from inside the existing one.
Sessions can also be given meaningful names, which makes larger setups easier to manage.
Copying text
Another part of the setup is clipboard handling.
Locally, Vim has clipboard support, so I can use:
"+y
For remote Vim sessions over SSH, I use vim-oscyank and OSC 52 instead.
My remote Vim configuration uses Space as the leader:
let mapleader = " "
so copying with the OSC 52 mapping is:
Space + y
The text then travels through the terminal connection to the local clipboard.
The overall path looks like:
Remote Vim
↓
vim-oscyank
↓
OSC 52
↓
SSH
↓
local tmux
↓
Alacritty
↓
X11 clipboard
This means I can copy text from Vim on a remote machine and paste it directly into a local application without needing the remote machine to have access to my local X11 clipboard.
tmux copy mode
For text that is already displayed in the terminal, tmux's copy mode is useful.
That gives me two different clipboard workflows:
Text inside Vim
→ vim-oscyank → OSC 52 → local clipboard
Text in terminal output
→ tmux copy mode → local clipboard
This is particularly convenient for copying logs, command output, error messages, or text from an SSH session.
Keeping the setup simple
One thing I like about this setup is that each component has a fairly clear role:
i3 manages graphical windows.
Alacritty provides the terminal.
tmux manages terminal sessions, windows, and panes.
Vim handles editing.
SSH provides remote access.
vim-oscyank + OSC 52 handles clipboard forwarding from remote Vim.
There isn't much overlap between the tools, and tmux provides persistence without requiring me to keep multiple terminal windows open.
For a terminal-heavy workflow, this remains a useful combination, especially when working across local and remote machines.
Yorumlar