Raveen Kumar

TMUX

The greatest samurai to ever exist?

TMUX plugins

GitHub - tmux-plugins/tpm: Tmux Plugin Manager

GitHub - tmux-plugins/tmux-urlview: Quickly open any url on your terminal window!

GitHub - tmux-plugins/tmux-resurrect: Persists tmux environment across system restarts.

To move a pane from another window to current window

join-pane -s target-window:target-pane

To use 256 colours in Tmux

256 colours in TMUX

You should set the default terminal in .tmux.conf to be screen-256color,

set -g default-terminal "screen-256color"

Hotkeys

Hotkeys Description
Ctrl-b + Space Change layout
Ctrl-b + n Next window
Ctrl-b + p Previous window
Ctrl-b + ! break pane into new window
Ctrl-b + " Horizontal split
Ctrl-b + % Vertical split
<prefix> s sessions
<prefix> w windows
<prefix> ? Help
<prefix>-, Rename tmux window

Don’t change window names

https://stackoverflow.com/questions/6041178/keep-the-windows-name-fixed-in-tmux

In ~/.tmux.conf,

set-option -g allow-rename off

Command line

tmux kill-window -t :1 tmux new -s

Save tmux buffer / pane history

https://burnicki.pl/en/2021/07/04/dump-tmux-pane-history-to-a-file.html

:capture-pane -S -83 :save-buffer ~/tmux.out

#Tmux #Linux #Command-Line #Terminal