Tmux
Table of Contents
1. Keybindings
Prefix C-b
C-zsuspend the clinet
1.1. Panes
"(spiltp) split pane horizontally%split pane vertically<arrow>change paneonext pane in current window;previously active paneC-orotate forwardM-1, …,M-5preset layoutSPCnext preset layoutC-<arrow>resize by one cell,M-<arrow>resize by five cells{,}swap current pane with previous or next panemmark current paneztoggle maximization of current panex(kill-pane) kill current pane
1.2. Windows
c(new-window) create new window'select by window index0, …,9select windown,pnext and previous windowlpreviously selected winodw&(kill-window) kill current window,rename current window
1.3. Sessions
d(detach-client) detach
Session is stored in RAM, so they do not survive reboot. For session to persist:
- Set up sessions on startup via tmux command.
- Use
tmux-resurrectpackage from TPM (Tmux Package Manager).
2. Commands
Command can be executed within a client by entering the command prompt
with :, or give command directly to the command line via tmux <command>.
set-option OPTION VAR VAL(aliasset)- Scope:
-gglobal,-ssession,-wwindow,-ppane prefixthe prefix key (C-ais a common rebinding)
- Scope:
bind-key KEY FUNC,unbind-key KEYthe keys are given in the Emacs format
3. Configuration
Tmux commands are used in the config files: in the order of precedence,
~/.tmux.conf$XDG_CONFIG_HOME/tmux/tmux.conf~/.config/tmux/tmux.conf/etc/tmux.conf