1 # Tmux configuration file.
5 # - To swap/renumber windows (like GNU screen's :number command) use
6 # :swap-window -t <number>.
8 # Copyright (C) 2011-2013 Simon Ruderich
10 # This file is free software: you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation, either version 3 of the License, or
13 # (at your option) any later version.
15 # This file is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this file. If not, see <http://www.gnu.org/licenses/>.
26 # Use Zsh as shell. Tmux does not display a warning if the shell isn't
28 set-option -g default-shell "/bin/zsh"
30 # Use a larger window history, in lines.
31 set-option -g history-limit 50000
33 # Display Tmux messages for a longer time, in milliseconds.
34 set-option -g display-time 3000
36 # Open new windows with the current working directory used when Tmux was
37 # started, and not the working directory of the current pane.
38 set-option -g default-path "."
43 # Enable 256 color mode.
44 set-option -g default-terminal "screen-256color"
46 # Disable alternative screen feature. This way e.g. Vim's window content stays
47 # visible after quitting Vim. This is quite useful to copy data (needs tmux
48 # 1.5 to work (almost) completely).
49 set-window-option -g alternate-screen off
51 # Set title for outer terminal.
52 set-option -g set-titles on
54 # Don't rename windows to the currently running program, my zshrc does this
55 # for me (with some additional features).
56 set-window-option -g automatic-rename off
62 set-option -g status-fg white
63 # Bright blue background color (colour12).
64 set-option -g status-bg colour12
66 # Nothing left of window list.
67 set-option -g status-left ""
68 # Current load average and hostname (#H) on the right.
69 set-option -g status-right "#(uptime | sed 's/^.*load averages*: //; s/,//g') \
72 # Format for windows in the window list in the status line. #I window index,
73 # #W window number, #F window flags.
74 set-window-option -g window-status-format "#I #W#F"
75 set-window-option -g window-status-current-format "#I #W#F"
77 # Update status line commands (#(..)) only every minute.
78 set-option -g status-interval 60
83 # Use Vi(m) key bindings.
84 set-option -g status-keys vi
85 set-window-option -g mode-keys vi
87 # Use Ctrl-A as escape binding, like in GNU screen.
88 set-option -g prefix C-a
89 # Ctrl-A a sends Ctrl-A to the process, like in GNU screen.
90 bind-key a send-prefix
93 # GNU screen like bindings (with C-x).
94 bind-key C-c new-window
95 bind-key C-a last-window
96 bind-key C-n next-window
97 bind-key C-p previous-window
98 bind-key C-[ copy-mode
99 bind-key C-] paste-buffer
101 # Arrow-key replacements for tmux's prompt.
102 bind-key -t vi-edit C-n history-down
103 bind-key -t vi-edit C-p history-up
105 # Display date/time, similar to GNU screen's ^a ^t. Tmux's default ^a t just
106 # displays the current time, but I often want to know the current date.
107 bind-key C-t display-message
109 # Run urlview on the current screen content. Very useful to follow links.
110 # Thanks to Arch wiki (https://wiki.archlinux.org/index.php/Tmux) for the
111 # basic idea how to enable this in tmux.
112 bind-key C-b capture-pane \; \
113 save-buffer ~/.tmp/tmux-urlview \; \
114 new-window "$SHELL -c 'urlview < ~/.tmp/tmux-urlview'"
116 # Binding for fast switching to windows 10 to 29 (and more if necessary).
117 # Thanks to Kays in #irssi on Freenode (2012-10-18 16:25 CEST) for reminding
118 # me of this issue in Tmux. See tmux-windows.pl for details how it works.
119 bind-key \; source-file "TMUX_WINDOW_PATH"