git clone https://github.com/tmux-plugins/tmux-logging.git
tmux new -s my_session : Create a new session.tmux attach : Attach to the last used session.tmux attach -t X : Attach to the tmux session with number X.tmux ls : List active tmux sessions.tmux split-window -dh "!!" : Run a command in a separate pane.tmux source-file ~/.tmux.conf : Reload config.
C-b w : List sessions/panes.C-b x : Close pane or session.
C-b d : Detach from the tmux session.C-b C-z : Hang session.C-b $ : Rename session.
C-b c : Open a new window.C-b n : Switch between windows/sessions.C-b , : Rename window.C-b X : Choose window with number X.C-b t : Display time in the window.
C-b " : Split into top/bottom panes.C-b % : Split into left/right panes.C-b o : Switch between panes.C-b C-o : Change the order of the panes.C-b arrows : Move between panes.C-b space : Switch layout.C-b ! : Break a pane into its own window.C-b z : Zoom on a pane.C-b & : Close all panes of a window.
C-b ? : See all key-bindings.
C-b [ : Scroll up/down (q or Enter to quit).
.tmux.conf this setting set -g mouse on.C-b to C-q (closer for AZERTY or QWERTY).- instead of ".C-b r : reloadC-b / : look up in manC-b s : sync between panes.C-b : : Pass a command to Tmux.setw synchronize-panes : (de)activate sync between panes.1# Put in your .tmux.conf - to bind "l" to open 4 SSH connections and sync between panes
2bind l new-window 'ssh server1' \; split-window 'ssh server2' \; split-window 'ssh server3' \; split-window 'ssh server4' \; rename-window LOGS \; select-layout tiled \; setw synchronize-panes
tmux source-file ~/.tmux.conf; : reload config.
1# Tmux functions, to put in the .bashrc
2function txh {
3 tmux split-window -dh "$*"
4}
5function txv {
6 tmux split-window -dv "$*"
7}
8#$ tmw watch uptime
9#$ tmw htop
10#$ tmw rsync -arvz source::mnt/location /home/tom/destination
11
12if [ -z "$TMUX" ]; then
13 tmux attach -t default || tmux new -s default
14fi
1set-option -g mouse on
2
3# List of plugins
4set -g @plugin 'tmux-plugins/tmux-sensible'
5set -g @plugin 'tmux-plugins/tmux-logging'
6set -g @plugin 'dracula/tmux'
7
8# Config Dracula Theme
9set -g @dracula-show-left-icon session
10set -g @dracula-plugins "git kubernetes-context cpu-usage ram-usage network-bandwidth"
11set -g @dracula-git-colors "green dark_gray"
12set -g @dracula-kubernetes-context-colors "cyan dark_gray"
13set -g @dracula-cpu-usage-colors "red dark_gray"
14set -g @dracula-ram-usage-colors "orange dark_gray"
15set -g @dracula-network-bandwidth-colors "yellow dark_gray"
16set -g @dracula-show-flags true
17set -g @dracula-show-empty-plugins false
18
19# switch panes using Alt-arrow without prefix
20bind -n M-Left select-pane -L
21bind -n M-Right select-pane -R
22bind -n M-Up select-pane -U
23bind -n M-Down select-pane -D
24
25# Set 256 colors
26set -s default-terminal 'tmux-256color'
27
28# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
29run -b ~/.tmux/plugins/tpm/tpm