Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: personal
Nate Jones March 05, 2014
file 85 lines (63 sloc) 2.492 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
# shared amongst all tmux

# VI keybindings please
setw -g mode-keys vi

set -g default-terminal "screen-256color"

# more VI-like copy/paste (http://jasonwryan.com/blog/2011/06/07/copy-and-paste-in-tmux/)
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

# when sharing a session, don't lock entire session to shared screen size
setw -g aggressive-resize on

# VI for splitting
bind s split-window -v
bind v split-window -h

# VI for switching between
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# make it easy to grab a pane and put it into the current window
bind-key @ command-prompt -p "create pane from:" "join-pane -s ':%%'"

# remotecopy the most recent buffer
bind-key y save-buffer ~/.tmux-buffer \; run-shell "remotecopy foo || true" \; command-prompt -p "secret:" "run-shell \"cat ~/.tmux-buffer | remotecopy -s %%\""
bind-key ] select-layout even-horizontal \; resize-pane -t 1 -x 80

# binding to clear activity alerts
bind-key C run-shell tmux-clear-activity

# easily toggle synchronization (mnemonic: e is for echo)
bind e setw synchronize-panes on
bind E setw synchronize-panes off

# switch " over to selecting windows
unbind '"'
bind-key '"' choose-window

# use ' to switch between sessions
bind-key "'" choose-session

# number windows from 1
set -g base-index 1

# don't wait after escape
set -s escape-time 0

## setting up status bar
## mostly horked from http://www.linuxized.com/2010/05/switching-from-gnu-screen-to-tmux/

set-option -g status-utf8 on
# set-option -g status-justify centre
set-option -g status-justify left
set-option -g status-bg colour16
set-option -g status-fg white
set-option -g status-left-length 40

setw -g window-status-bg colour16
setw -g window-status-fg white
setw -g window-status-current-fg colour46

setw -g window-status-activity-attr default
setw -g window-status-activity-fg colour192
setw -g window-status-activity-bg colour16

# monitor activity
setw -g monitor-activity on
set -g visual-activity off

bind m setw monitor-activity off
bind M setw monitor-activity on

set -g status-left '#[fg=green][ #[fg=red]#H#[fg=green]:#[fg=white]#S #[fg=green]][#[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=green]][ #[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default]'
set -g status-right '#[fg=green]]'
Something went wrong with that request. Please try again.