Update to tmux 1.2
[~madcoder/dotfiles.git] / tmux.conf
1 # set the prefix to ^G
2
3 set  -g default-terminal screen-256color
4 set  -g history-limit 100000
5 set  -g mouse-select-pane on
6 setw -g mode-mouse on
7 set  -g status-keys     vi
8 setw -g mode-keys       vi
9 set  -s escape-time    100
10
11 unbind C-b
12 set -g prefix C-g
13 bind g   send-prefix
14 bind C-g send-prefix
15
16 bind -n F5 source ~/.tmux.conf
17 bind -n F9 set status
18 bind -n M-x command-prompt
19
20 bind d detach
21 bind -n C-\ detach
22
23 bind n   next-window
24 bind C-n next-window
25 bind p   previous-window
26 bind C-p previous-window
27 bind s   command-prompt "split-window -v '%%'"
28 bind S   command-prompt "split-window -v '%%'"
29 bind v   command-prompt "split-window -h '%%'"
30 bind C-v command-prompt "split-window -h '%%'"
31
32 bind Enter new-window
33 bind r command-prompt "new-window '%%'"
34 bind c confirm-before kill-pane
35 bind x confirm-before kill-pane
36 bind ! command-prompt -p Man: "split-window 'man %%'"
37 bind o break-pane
38
39 bind k up-pane
40 bind j down-pane
41 bind K swap-pane -U
42 bind J swap-pane -D
43 bind i display-message \; display-panes
44 set  -g display-panes-time 1500
45 set  -g display-time       1500
46
47 set  -g base-index 1
48 bind Tab choose-window
49 bind 1 select-window -t 1
50 bind 2 select-window -t 2
51 bind 3 select-window -t 3
52 bind 4 select-window -t 4
53 bind 5 select-window -t 5
54 bind 6 select-window -t 6
55 bind 7 select-window -t 7
56 bind 8 select-window -t 8
57 bind 9 select-window -t 9
58 bind 0 select-window -t 10
59
60 ##############################################################################
61 # Copy Mode
62 bind Escape copy-mode
63 bind C-' ' copy-mode
64 bind    -t vi-copy C-u    page-up
65 bind    -t vi-copy C-d    page-down
66 bind    -t vi-copy G      bottom-line
67 bind -n -t vi-copy Escape cancel
68
69 ##############################################################################
70 # Edit mode
71 bind -n -t vi-edit Escape switch-mode
72 bind -n -t vi-edit Up     history-up
73 bind -n -t vi-edit Down   history-down
74 bind -n -t vi-edit Left   cursor-left
75 bind -n -t vi-edit Right  cursor-right
76 bind -n -t vi-edit C-u    delete-line
77 bind -n -t vi-edit C-k    delete-end-of-line
78
79 bind -c -t vi-edit Escape cancel
80 bind -c -t vi-edit |      start-of-line
81
82 ##############################################################################
83 # Bells
84 set  -g visual-activity  on
85 set  -g visual-bell      off
86 set  -g bell-action      any
87 setw -g monitor-activity off
88
89 ##############################################################################
90 # Theme
91 set  -g status         on
92 set  -g status-attr    default
93 set  -g status-fg      white
94 set  -g status-bg      default
95 set  -g status-justify centre
96 set  -g status-utf8    on
97
98 set  -g status-left    "#[fg=green][ #[fg=blue,bold]%H:%M #[fg=green,nobold]]["
99 set  -g status-right   "#[fg=green]][ #[fg=blue,bold]#(cut -d' ' -f1-3 /proc/loadavg) #[fg=green,nobold]]"
100
101 # command/message line colors
102 set -g message-fg   white
103 set -g message-bg   red
104 set -g message-attr bright
105
106 # default window title colors
107 setw -g window-status-fg   white
108 setw -g window-status-bg   default
109 setw -g window-status-attr dim
110
111 setw -g window-status-format         '#I #W#F'
112 setw -g window-status-current-format '#[fg=red,nobold][#[fg=white,bold]#I #W#F#[fg=red,nobold]]'
113
114 set -g pane-border-bg default
115 set -g pane-border-fg default
116 set -g pane-active-border-bg default
117 set -g pane-active-border-fg red
118
119 # active window title colors
120 setw -g window-status-current-fg   white
121 setw -g window-status-current-bg   default
122 setw -g window-status-current-attr bright