Skip to content

Instantly share code, notes, and snippets.

@pung96
Created February 22, 2014 11:18
Show Gist options
  • Save pung96/9152255 to your computer and use it in GitHub Desktop.
Save pung96/9152255 to your computer and use it in GitHub Desktop.
pung96's tmux configuration
#==== Prefix Key : Make it use C-a, similar to screen ====#
unbind C-b
unbind l
set -g prefix C-a
bind-key C-a last-window
bind a send-prefix
#==== Toggle Sync Pane -> Send command to all panes ====#
bind-key s set-window-option synchronize-panes
#==== Toggle Mouse mode "m" ====#
unbind m
bind-key m if-shell 'tmux showw -gv mode-mouse|grep on' \
'set -g mode-mouse off ; set -g mouse-resize-pane off ; set -g mouse-select-pane off ; set -g mouse-select-window off ; display "Mouse: OFF"' \
'set -g mode-mouse on ; set -g mouse-resize-pane on ; set -g mouse-select-pane on ; set -g mouse-select-window on ; display "Mouse: on"' \
;
#==== PANE - navigation ====#
bind-key h selectp -L
bind-key j selectp -D
bind-key k selectp -U
bind-key l selectp -R
#==== Window Navigation ====#
bind-key Space next
bind-key BSpace prev
bind-key A command-prompt "rename-window '%%'"
#==== Reload conf ====#
bind r source-file ~/.tmux.conf
#==== ETC ====#
set -g default-terminal "xterm-256color"
set -g history-limit 10000
setw -g automatic-rename off
setw -g utf8 on
setw -g mode-keys vi
setw -g xterm-keys on
#==== THEME ====#
#set -g status-bg black
#set -g status-fg white
#set -g status-interval 60
#set -g status-left-length 30
#set -g status-left '#[fg=green](#S) #(whoami)@#H#[default]'
#set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=yellow]%H:%M#[default]'
# Default colors
set -g status-bg black
set -g status-fg white
#==== STATUS BAR ====#
# Left side of status bar
set -g status-left-length 20
set -g status-left '#[fg=green][#[bg=black,fg=cyan]#S#[bg=black,fg=blue,dim]:#H#[fg=green]]'
# Inactive windows in status bar
set-window-option -g window-status-format '#[fg=cyan,dim]#I#[fg=blue]:#[default]#W#[fg=grey,dim]#F'
# Current or active window in status bar
set-window-option -g window-status-current-format '#[bg=blue,fg=cyan,bold]#I#[bg=blue,fg=cyan]:#[fg=white]#W#[fg=dim]#F'
# Right side of status bar
set -g status-right '#[fg=green][#[fg=white]#T#[fg=green]][#[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]#[fg=green]]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment