Skip to content

Instantly share code, notes, and snippets.

@bollovan
Created August 24, 2011 12:16
Show Gist options
  • Save bollovan/1167933 to your computer and use it in GitHub Desktop.
Save bollovan/1167933 to your computer and use it in GitHub Desktop.
# file: ~/.tmux.conf
# description: Configuration file for tmux,the terminal multiplexer
# credits: milomouse from arch linux bbs
# command prefix:
set-option -g prefix C-a
bind-key C-a send-prefix
bind-key b set-option status
bind-key K confirm kill-server
# reload tmux.conf:
bind-key R source-file ~/.tmux.conf
# basic global settings:
set-option -g status-keys vi
set-option -g default-shell /bin/zsh
set-window-option -g mode-keys vi
set-window-option -g utf8 on
set-window-option -g mode-mouse off
set-option -g mouse-select-pane off
set-option -g history-limit 4000
# Start window listing from 1 rather than 0
set-option -g base-index 1
# copy mode to escape key:
unbind-key [
bind-key Escape copy-mode
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# copy tmux buffer to clipboard
bind-key Y save-buffer ~/.tmux/buffer \; run-shell "xclip -i /home/derp/.tmux/buffer && rm ~/.tmux/buffer"
# current window navigation:
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# moving and swapping:
bind-key N swap-pane -D
bind-key P swap-pane -U
# resizing:
bind-key -r C-h resize-pane -L
bind-key -r C-j resize-pane -D
bind-key -r C-k resize-pane -U
bind-key -r C-l resize-pane -R
# new window with return
unbind c
bind-key Enter new-window
# splitting and cycling:
unbind %
bind - split-window -v
unbind '"'
bind | split-window -h
bind-key Tab last-window
bind-key -n C-l next-window
bind-key -n C-h previous-window
# window title:
set-option -g set-titles on
set-option -g set-titles-string 'tmux: [#W]'
set-window-option -g automatic-rename on
# messages:
set-window-option -g mode-bg magenta
set-window-option -g mode-fg black
set-option -g message-bg magenta
set-option -g message-fg black
# panes:
set-option -g pane-border-fg colour238
set-option -g pane-border-bg default
set-option -g pane-active-border-fg colour110
set-option -g pane-active-border-bg default
# status bar:
set-option -g status-utf8 on
set-option -g status-justify right
set-option -g status-bg black
set-option -g status-fg cyan
set-option -g status-interval 5
set-option -g status-left-length 60
set-option -g status-left '#[fg=green,bold]> #[fg=colour68,nobold]tmux: #[fg=blue,bold]#T#[default]'
set-option -g status-right '#[fg=magenta]>> #[fg=black,bold]###[fg=blue,bold]#S#[fg=black];#[fg=blue,bold]#P#[fg=cyan,nobold]|#[fg=magenta]%a,%m-%d#[fg=cyan]|#[fg=black,bold]%j#[fg=cyan,nobold]|#[fg=blue,bold]%R#[default]'
set-option -g visual-activity on
set-window-option -g monitor-activity on
set-window-option -g window-status-current-bg black
set-window-option -g window-status-current-fg blue
set-window-option -g window-status-current-attr bold
set-window-option -g window-status-bg black
set-window-option -g window-status-fg colour247
# clock:
set-window-option -g clock-mode-colour cyan
set-window-option -g clock-mode-style 24
# external commands:
bind-key m command-prompt "split-window -v 'exec man %%'"
# vim: ft=tmux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment