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