-
Notifications
You must be signed in to change notification settings - Fork 32
/
tmux.conf
122 lines (86 loc) · 3.49 KB
/
tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
##### Basic Usage #####
# First things first: Remap the prefix key to reduce conflicts with Emacs!
unbind C-b
# By default, we'll use Control-backslash as the prefix key.
set -g prefix 'C-\' ; bind 'C-\' send-prefix
# However, some people complain about this, so we'll also add a few
# bindings that let you quickly select the binding you want.
# You can add your own to ~/.tmux.conf.local (see bottom of file).
#
# These lines take the form:
# bind A set -g prefix 'C-a' \; bind 'C-a' send-prefix
# \_________________/ \____________________/
# The first command sets C-a as the prefix.
# The second command allows the prefix keystroke to be sent to the
# active pane (in case the binding overrides something that was useful).
bind A set -g prefix 'C-a' \; bind 'C-a' send-prefix
bind T set -g prefix 'C-t' \; bind 'C-t' send-prefix
bind \ set -g prefix 'C-\' \; bind 'C-\' send-prefix
# Reload tmux config so we can pick up changes to this file without needing to restart tmux
bind r source-file ~/.tmux.conf \; display "Reloaded tmux configuration!"
# Index windows from 1, not 0, so they line up a little better
# with the order of the number keys on the keyboard
set -g base-index 1
setw -g pane-base-index 1
# Reduce the command delay time to something a bit shorter
set -sg escape-time 1
# Extend the repeat interval for repeatable commands (e.g., resize-pane)
set -sg repeat-time 1000
##### Mouse Support (or lack thereof) #####
# No mouse for you!
# (Note: turning on mouse support seems to make it impossible to use the
# mouse to copy text into the system clipboard. Surely there's a way
# around this if I ever feel like shaving that yak. -JW)
setw -g mode-mouse off
##### Scrollback Navigation #####
# Use vi-style navigation in Copy mode (which is also scrollback mode)
setw -g mode-keys vi
##### Window/Pane Management #####
# Split windows more intuitively (except for the fact that tmux doesn't
# understand that a horizontal split means the pane should be split down the
# middle horizontally, and likewise for a vertical split).
bind | split-window -h # horizontal columns
bind - split-window -v # vertical rows
# Navigate panes vim-style!
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# And windows too!
bind -r C-l select-window -t :+
bind -r C-h select-window -t :-
# Quickly jump between two windows
bind i last-window
# Resizing panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Renumber windows
bind m command-prompt -p "move window to:" "move-window -t '%%'"
##### Colors #####
# Ensure we're using 256 colors
set -g default-terminal "screen-256color"
# Status bar
set -g status-style bg="#333333",fg=white
# Window list
setw -g window-status-style bg="#333333",fg=green
setw -g window-status-current-style bg=brightgreen,fg=black
setw -g window-status-activity-style bg=brightblue,fg=black
# Pane borders
set -g pane-border-style bg=black,fg=green
set -g pane-active-border-style bg=yellow,fg=green
# Command line
set -g message-style bright,bg=black,fg=white
# Status Bar Items
set -g status-utf8 on
set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=green]#P"
set -g status-right "#[fg=yellow]%d %b %R #[fg=green]#(wemux status_users)"
set -g status-justify centre
set -g status-interval 15
# Monitor windows for activity
setw -g monitor-activity on
set -g visual-activity on
##### Local settings (if any) #####
source-file -q ~/.tmux.conf.local