# TMUX

# Oh my .tmux.conf

Reference

Add CPU usage, find and add

set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'GROG/tmux-plugin-memory'
set -g @plugin 'tassaron/tmux-df'

Then <prefix> I to install it.

tmux_conf_theme_status_right=" #{prefix}#{mouse}#{pairing}#{synchronized}| CPU: #{cpu_icon} #{cpu_percentage} Mem: #{mem_percentage} Disk available #{df_avail} #{df_percent}     | %a %h-%d %H:%M|  #{username}#{root} | #{hostname} "

Then <prefix> r to reload the config.

# Example tmux configuration

Put following content into ~/.tmux.conf.

# ~/.tmux.conf

# unbind default prefix and set it to ctrl-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix

# make delay shorter
set -sg escape-time 0


### key bindings ###
bind r source-file ~/.tmux.conf \; display ".tmux.conf reloaded!"

# quickly open a new window
bind N new-window

# synchronize all panes in a window
bind y setw synchronize-panes

# pane movement shortcuts
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# enable mouse support for switching panes/windows
set -g mouse on
#### copy mode : vim ####
# set vi mode for copy mode
setw -g mode-keys vi
# copy mode using 'Esc'
unbind [
bind Escape copy-mode
# paste using 'p'
unbind p
bind p paste-buffer

set-option -g default-shell "/bin/zsh"

Add the following line to ~/.bashrc for attaching to the tmux session work.

work() { tmux new-session -A -s ${1:-work}; }