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