Skip to content

Instantly share code, notes, and snippets.

@paulvictor
Created July 16, 2012 07:05
Show Gist options
  • Save paulvictor/3121279 to your computer and use it in GitHub Desktop.
Save paulvictor/3121279 to your computer and use it in GitHub Desktop.
tmux conf
# From http://alexyoung.org/2011/12/19/build-an-ide-with-tmux-and-vim/
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -rn C-h select-window -t :-
bind-key -rn C-l select-window -t :+
set -g default-terminal "screen-256color"
# From http://www.linuxized.com/2010/05/switching-from-gnu-screen-to-tmux/
# ` is an interesting key for a prefix
set-option -g prefix `
# set-option -g prefix C-a
unbind-key C-b
bind-key C-a last-window
bind-key ` last-window
bind-key a send-prefix
# we might need ` at some point, allow switching
# we can also send the prefix char with `-a
#bind-key F11 set-option -g prefix C-a
#bind-key F12 set-option -g prefix `
# 0 is too far from ` ;)
set -g base-index 1
# set-option -g default-terminal "screen-256color"
# set-option -g mouse-select-pane on
set-option -g status-keys vi
# set-option -g bell-action any
set-option -g set-titles on
set-option -g set-titles-string '#h:#S.#I.#P #W #T' # window number,program name,active (or not)
# set-option -g visual-bell on
setw -g mode-keys vi
setw -g mode-mouse on
setw -g monitor-activity on
#bind F1 previous-window
#bind F2 next-window
#bind j up-pane
#bind k down-pane
set-option -g status-utf8 on
# set-option -g status-justify centre
set-option -g status-justify left
set-option -g status-bg black
set-option -g status-fg white
set-option -g status-left-length 40
set-option -g pane-active-border-fg green
set-option -g pane-active-border-bg black
set-option -g pane-border-fg white
set-option -g pane-border-bg black
set-option -g message-fg black
set-option -g message-bg green
#setw -g mode-bg black
setw -g window-status-bg black
setw -g window-status-current-fg green
#setw -g window-status-alert-attr default
#setw -g window-status-alert-fg yellow
#
set-option -g default-command "reattach-to-user-namespace -l zsh"
set -g status-left '#[fg=red]#h#[fg=white]:#[fg=green]#I:#P #[fg=magenta]][#[default]'
# set -g status-right '#[fg=green]][#[fg=white] #T #[fg=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]'
set -g status-right '#[fg=magenta]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]'
set -g history-limit 8192
set -sg escape-time 0
# For copy-paste
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# `+r reloads the configuration, handy
bind r source-file ~/.tmux.conf
# hsplit
unbind %
bind \ split-window -h
# vsplit
unbind '"'
bind - split-window -v
# Resize
unbind M-Left
unbind M-Right
unbind M-Down
unbind M-Up
bind-key -rn M-Up resize-pane -U
bind-key -rn M-Down resize-pane -D
bind-key -rn M-Left resize-pane -L
bind-key -rn M-Right resize-pane -R
#### COLOUR
#
## default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
#
## default window title colors
set-window-option -g window-status-fg colour244
set-window-option -g window-status-bg default
set-window-option -g window-status-attr dim
#
## active window title colors
set-window-option -g window-status-current-fg colour166 #orange
set-window-option -g window-status-current-bg default
set-window-option -g window-status-current-attr bright
#
## pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
#
## message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange
#
## pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
#
## clock
set-window-option -g clock-mode-colour colour64 #green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment