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