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