Skip to content

Instantly share code, notes, and snippets.

@mrmoneyc
Created October 24, 2011 15:19
Show Gist options
  • Save mrmoneyc/1309297 to your computer and use it in GitHub Desktop.
Save mrmoneyc/1309297 to your computer and use it in GitHub Desktop.
#------------------------------------------------------------
#
# tmux configure file
#
# Maintainer: Chun-Ping Chang (mrmoneyc) <moneyc.net -AT- gmail.com>
#
# Last modified: 2011-10-24 21:17:19
#
#------------------------------------------------------------
#------------------------------
# General setting
#------------------------------
# Set default terminal
set -g default-terminal "xterm-256color"
# Command history limit
#set -g history-limit 1000
# Fix putty/pietty function key problem
set -g terminal-overrides "xterm*:kf1=\e[11~:kf2=\e[12~:kf3=\e[13~:kf4=\e[14~:kf5=\e[15~:kf6=\e[17~:kf7=\e[18~:kf8=\e[19~"
#------------------------------
# Statusbar properties
#------------------------------
set -g display-time 5000
set -g repeat-time 1000
set -g status-keys emacs
set -g status-bg black
set -g status-fg white
set -g status-interval 5
set -g status-left-length 30
#set -g status-left "#[fg=white,bright,bg=blue] Session #[fg=yellow,bright,bg=blue]#S #[default] |"
set -g status-left "#[fg=green]#S#[default] |"
set -g status-right "#[fg=black,bright][#(uptime | cut -d ":" -f3- | sed 's/^ *//g' | sed s/,//g)]#[default] #[fg=yellow]%Y-%m-%d#[default] #[fg=magenta]%H:%M#[default]"
#set -g status-right "#[fg=white,bright]@#H#[default] #[fg=black,bright][#(uptime | cut -d ":" -f3- | sed 's/^ *//g' | sed s/,//g)]#[default] #[fg=yellow]%Y-%m-%d#[default] #[fg=magenta]%H:%M#[default]"
#------------------------------
# Window properties
#------------------------------
setw -g window-status-format "#[fg=green]#I #W#[default]"
setw -g window-status-current-format "#[fg=yellow,bright][#I #W]#[default]"
#setw -g window-status-current-bg yellow
#setw -g window-status-current-fg blue
#setw -g window-status-current-attr default
#------------------------------
# Binding 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
# Reload setting
bind r source-file ~/.tmux.conf
# Vertical/horizontal split window
unbind '"'
bind - splitw -v
unbind %
bind | splitw -h
# Select split window
bind k selectp -U
bind j selectp -D
bind h selectp -L
bind l selectp -R
#bind -n F2 up-pane
#bind -n F3 down-pane
# Resize split window
bind C-k resizep -U 3
bind C-j resizep -D 3
bind C-h resizep -L 3
bind C-l resizep -R 3
# Swap split window
bind C-u swapp -U
bind C-d swapp -D
# Lock screen
#bind L lock
# Tmux lock setting
#pass -c '$1$paKmPLrO$ql3QozwT9syFayuld/QDi0'
#new -s IRC irssi # create new session IRC, and execute irssi
#neww vim # open vim in new window
#selectw -t 2 # default switch to window 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment