Skip to content

Instantly share code, notes, and snippets.

@tdkn
Created September 2, 2012 15:20
Show Gist options
  • Save tdkn/3600421 to your computer and use it in GitHub Desktop.
Save tdkn/3600421 to your computer and use it in GitHub Desktop.
tmux configuration file
## ----------------------------------------
## file: .tmux.conf
## author: tdkn
## create: 2012-08-30
## update: 2012-08-31
## ----------------------------------------
## ----------------------------------------
## key bind
## ----------------------------------------
# prefix key <C-z>
unbind-key C-b
set-option -g prefix C-z
bind-key C-z send-prefix
# reload config file <prefix> + r
unbind r
bind r source-file ~/.tmux.conf
# split windows like vim
# vim's definition of a horizontal/vertical split is reversed from tmux's
bind s split-window -v
bind v split-window -h
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize panes like vim
# feel free to change the "1" to however many lines you want to resize by, only
# one at a time can be slow
bind < resize-pane -L 1
bind > resize-pane -R 1
bind - resize-pane -D 1
bind + resize-pane -U 1
# bind : to command-prompt like vim
# this is the default in tmux already
bind : command-prompt
# vi-style controls for copy mode
setw -g mode-keys vi
## ----------------------------------------
## other settings
## ----------------------------------------
# mouse-selectable pane
set-option -g mouse-select-pane on
# default shell (z-shell)
set-option -g default-shell /bin/zsh
# status update interval (default: 15 sec)
set-option -g status-interval 5
#set-window-option -g xterm-keys on
# arrow key fix
set-option -g default-terminal "xterm"
# 256 color terminal
#set-option -g default-terminal "xterm-256color"
## ----------------------------------------
## status line
## ----------------------------------------
## status line format
#(command) shell command
#[attribute] (ex: #[fg=cyan,bright])
#H hostname
#I window number
#P pane number
#S session name
#T window title
#W window name
## "#" character
# black,red,green,yellow,blue,magenta,cyan,white
# colour0,colour1, ... colour255
# bright(bold), dim, underscore, blink,
# reverse, hidden, italics, default
set -g status-left-length 32
set -g status-right-length 150
set -g status-fg white
set -g status-bg colour234
set -g window-status-activity-attr bold
set -g pane-border-fg colour245
set -g pane-active-border-fg colour39
set -g message-fg colour16
set -g message-bg colour221
set -g message-attr bold
set -g status-left '#[fg=colour235,bg=colour252,bold] #H #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀'
set -g window-status-format "#[fg=white,bg=colour234] #I #W "
set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=colour25,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
set -g status-right '#[fg=colour241]⮃ #I:#P #[fg=colour31,bg=colour234,nobold]⮂#[fg=colour117,bg=colour31,bold] MEM:#(getMemUsage)%% #[fg=colour204,bg=colour31,nobold]⮂#[fg=colour161,bg=colour204,bold] LA:[#(loadaverage)] #[fg=white,bg=colour204,nobold]⮂#[fg=colour95,bg=white,bold] %Y/%m/%d(%a)%H:%M#[default]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment