]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - tmux.conf.in
tmux.conf: Use Tmux's working directory when creating new panes.
[config/dotfiles.git] / tmux.conf.in
1 # Tmux configuration file.
2
3 # Copyright (C) 2011-2012  Simon Ruderich
4 #
5 # This file is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This file is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this file.  If not, see <http://www.gnu.org/licenses/>.
17
18
19 # GENERAL
20
21 # Use a larger window history, in lines.
22 set-option -g history-limit 10000
23
24 # Display messages for three seconds.
25 set-option -g display-time 3000
26
27 # Open new windows with the current working directory used when Tmux was
28 # started, and not the working directory of the current pane.
29 set-option -g default-path "."
30
31
32 # TERMINAL
33
34 # Disable alternative screen feature. This way e.g. Vim's window content stays
35 # visible after quitting Vim. This is quite useful to copy data (needs tmux
36 # 1.5 to work (almost) completely).
37 set-window-option -g alternate-screen off
38
39 # Set title for outer terminal.
40 set-option -g set-titles on
41
42 # Don't rename windows to the currently running program, my zshrc does this
43 # for me (with some additional features).
44 set-window-option -g automatic-rename off
45
46
47 # STATUS LINE
48
49 # White text.
50 set-option -g status-fg white
51 # Bright blue background color (colour12).
52 set-option -g status-bg colour12
53
54 # Nothing left of window list.
55 set-option -g status-left ""
56 # Current load average and hostname on the right.
57 set-option -g status-right "#(uptime | sed 's/^.*load averages*: //; s/,//g') \
58                             #H"
59
60 # Format for windows in the window list in the status line. #I window index,
61 # #W window number, #F window flags.
62 set-window-option -g window-status-format         "#I #W#F"
63 set-window-option -g window-status-current-format "#I #W#F"
64
65 # Update status line commands (#(..)) only every minute.
66 set-option -g status-interval 60
67
68
69 # BINDINGS
70
71 # Use Vi(m) key bindings.
72 set-option        -g status-keys vi
73 set-window-option -g mode-keys vi
74
75 # Use Ctrl-A as escape binding, like in GNU screen.
76 set-option -g prefix C-a
77 # Ctrl-A a sends Ctrl-A to the process, like in GNU screen.
78 bind-key a send-prefix
79 unbind-key C-b
80
81 # GNU screen like bindings (with C-x).
82 bind-key C-c new-window
83 bind-key C-a last-window
84 bind-key C-n next-window
85 bind-key C-p previous-window
86 bind-key C-[ copy-mode
87 bind-key C-] paste-buffer
88
89 # Arrow-key replacements for tmux's prompt.
90 bind-key -t vi-edit C-n history-down
91 bind-key -t vi-edit C-p history-up
92
93 # Display date/time, similar to GNU screen's ^a ^t. Tmux's default ^a t just
94 # displays the current time, but I often want to know the current date.
95 bind-key C-t display-message
96
97 # Run urlview on the current screen content. Very useful to follow links.
98 # Thanks to Arch wiki (https://wiki.archlinux.org/index.php/Tmux) for the
99 # basic idea.
100 bind-key C-b capture-pane \; \
101              save-buffer ~/.tmp/tmux-urlview \; \
102              new-window "$SHELL -c 'urlview < ~/.tmp/tmux-urlview'"
103
104 # vim: ft=tmux