Set TERMINFO before calling tput.
[profile.git] / .tmux.conf
1 ################################################################################
2 # Options.
3 ################################################################################
4 # Use vi keys for scrolling etc.
5 # Use lsk -t vi|emacs-<table> to see binds in table choice, copy or edit.
6 setw -g mode-keys vi
7 set -g status-keys vi
8
9 # Don't wait so long to parse escape sequences.
10 set -s escape-time 100
11
12 # Clock.
13 setw -g clock-mode-colour white
14 setw -g clock-mode-style 24
15
16 ################################################################################
17 # Screen compatibility.
18 ################################################################################
19 set -g prefix C-p
20 unbind C-b
21 bind C-p last-window
22 bind C-l refresh-client
23 bind l refresh-client
24 bind S split-window -v
25 bind | split-window -h
26 bind C-[ copy-mode
27 bind ] paste-buffer
28 bind C-] paste-buffer
29 bind _ setw monitor-activity
30 bind * list-clients
31 bind < command-prompt -p "Load buffer from file:" 'load-buffer %1'
32 bind > command-prompt -p "Save buffer to file:" 'save-buffer %1'
33
34 ################################################################################
35 # Hotkeys.
36 ################################################################################
37 # Up and down like Vim.
38 bind j select-pane -D
39 bind C-j select-pane -D
40 bind k select-pane -U
41 bind C-k select-pane -U
42 # Previous and next window kinda like Vim.
43 bind h previous-window
44 bind C-h previous-window
45 bind l next-window
46 bind C-l next-window
47 # And for panes.
48 bind H select-pane -L
49 bind L select-pane -R
50 # Top and bottom.
51 bind J select-pane -t bottom
52 bind K select-pane -t top
53 # Swap panes.
54 bind w swap-pane
55 # Show panes.
56 bind = display-panes
57 # Move the current pane into a separate window.
58 bind b break-pane
59 # Split another pane into this window.
60 bind B command-prompt -p "Select [<window>.]<pane> to join:" 'join-pane -s %1'
61 # Next pane.
62 bind i select-pane -t :.+
63 bind C-i select-pane -t :.+
64 bind I select-pane -t :.-
65 # Layouts.
66 bind . select-layout even-vertical
67 bind , select-layout tiled
68 # Simulate maximising the window.
69 bind / select-layout even-vertical \; swap-pane -s top \; resize-pane -D 9999
70 # Show windows
71 bind - list-windows
72 # Set current window title.
73 bind t command-prompt -p "Set window's title to:" 'rename-window %1'
74 # Show clock.
75 bind T clock-mode
76 # Monitor window for a particular string.
77 bind m command-prompt -p "Monitor:" 'setw monitor-content %1'
78 bind M setw monitor-content ""
79 # Synchronise input.
80 bind \; setw synchronize-panes
81 # Choose buffer to paste.
82 bind } choose-buffer 'paste-buffer -b %%'
83 # Enter copy-mode and scroll up.
84 bind { copy-mode -u
85 # Choose buffer to show.
86 # XXX: As of tmux 1.3 this doesn't work.
87 #bind '"' choose-buffer 'show-buffer -b %%'
88 bind '"' list-buffers \; command-prompt -p "Choose buffer to show:" 'show-buffer -b %1'
89 bind "'" show-buffer
90
91 ################################################################################
92 # Fix missing binds in Vi modes.
93 ################################################################################
94 # Command prompt.
95 bind -t vi-edit C-u delete-line
96 # We can't delete a word so ^w can clear the whole line for now.
97 bind -t vi-edit C-w delete-line
98 bind -t vi-edit Up history-up
99 bind -t vi-edit Down history-down
100 bind -t vi-edit Left cursor-left
101 bind -t vi-edit Right cursor-right
102 # Copy mode.
103 bind -t vi-copy y copy-selection
104
105 ################################################################################
106 # Terminal settings.
107 ################################################################################
108 set -g default-terminal 'screen-256color'
109 # PuTTY needs help to set bold colours.
110 set -g terminal-overrides 'putty-256color:C8'
111
112 ################################################################################
113 # Window and pane settings.
114 ################################################################################
115 set -g display-panes-time 1000
116 set -g display-panes-active-colour white
117 set -g display-panes-colour colour17
118 # Command entry.
119 set -g message-bg colour90
120 set -g message-fg white
121 # Active pane
122 set -g pane-active-border-bg default
123 set -g pane-active-border-fg white
124 # Inactive pane.
125 set -g pane-border-bg default
126 set -g pane-border-fg colour17
127 # Messages.
128 setw -g mode-bg blue
129 setw -g mode-fg white
130 # Monitored windows (in reverse video).
131 setw -g window-status-alert-bg red
132 setw -g window-status-alert-fg white
133
134 ################################################################################
135 # Caption settings.
136 ################################################################################
137 # Don't update the title bar.
138 set -g set-titles off
139 # Status line black on white.
140 set -g status-attr none
141 set -g status-bg white
142 set -g status-fg black
143 # Current window white on blue.
144 setw -g window-status-current-attr none
145 setw -g window-status-current-bg colour17
146 setw -g window-status-current-fg white
147 # No border.
148 set -g status-left ''
149 set -g status-right '#[fg=white,bg=colour8][#H:#S]'
150 # Window flags.
151 setw -g window-status-current-format '[#I.#P#F #W]'
152 setw -g window-status-format ' #I.#P#F #W '
153 # Don't set window name.  XXX: Issue with PROMPT_COMMAND.
154 #setw -g automatic-rename off