TMUX Configuration

~/.tmux.conf

The configuration below is quite similar to the GNU Screen Configuration in remapping the escape key to Ctrl+z. Tmux has itself been very nice to preserve most of screen’s commands, and below are a few enhancements.

  • Coloured tab bar.
  • Alt+, and Alt+. to switch tabs.
  • Alt+1, Alt+2, … , Alt+5 to directly jump to the i-th tab.
  • Display load average and time on the right corner of the status bar (bottom).
unbind C-b
set -g prefix C-z

set -g history-limit 10000
set -g base-index 1

# Standard Gnu-screen alt+ switching windows
bind-key -n M-, previous-window
bind-key -n M-. next-window

# New and easy alt+<num> shifting windows
bind-key -n M-1 select-window -t 1
bind-key -n M-2 select-window -t 2
bind-key -n M-3 select-window -t 3
bind-key -n M-4 select-window -t 4
bind-key -n M-5 select-window -t 5

# Status Bar
set -g status-bg black
set -g status-fg white
set -g window-status-current-bg red
set -g status-interval 5
set -g status-left '#[fg=green]#S#[default]'
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-4 /proc/loadavg)#[default] #[fg=cyan,bold]%Y-%m-%d %H:%M:%S#[default]'

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>