-
Notifications
You must be signed in to change notification settings - Fork 5
/
tmux.conf
144 lines (116 loc) · 3.46 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# address vim mode switching delay (http://superuser.com/a/252717/65504)
set -s escape-time 0
# increase scrollback buffer size
set -g history-limit 10000
# tmux messages are displayed for 4 seconds
set -g display-time 2000
# refresh 'status-left' and 'status-right' more often
set -g status-interval 5
# enable mouse features for terminals that support it
set-option -g mouse on
# emacs key bindings in tmux command prompt (prefix + :) are better than
# vi keys, even for vim users
set -g status-keys emacs
# --- </sensible>
# Use C-s as a prefix
set -g prefix C-s
unbind C-b
bind C-s send-prefix
# Relax!
set -sg escape-time 0
set -sg repeat-time 600
# Make pbcopy and pbpaste work properly
set -g default-command "/bin/fish"
# Less stretching to get to the first item.
set -g base-index 1
setw -g pane-base-index 1
# Reload the config.
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
# Saner splitting.
bind v split-window -h -c '#{pane_current_path}'
bind s split-window -v
bind S choose-session
# Pane movement
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# DVTM style pane selection
bind 1 select-pane -t 1
bind 2 select-pane -t 2
bind 3 select-pane -t 3
bind 4 select-pane -t 4
bind 5 select-pane -t 5
bind 6 select-pane -t 6
bind 7 select-pane -t 7
bind 8 select-pane -t 8
bind 9 select-pane -t 9
# Pane resizing
bind -r C-h resize-pane -L 5
bind -r C-j resize-pane -D 5
bind -r C-k resize-pane -U 5
bind -r C-l resize-pane -R 5
bind -r b select-window -t :-
bind -r n select-window -t :+
# 256 colors please
set -g default-terminal "screen-256color"
# Custom status bar
# Powerline symbols: ⮂ ⮃ ⮀ ⮁ ⭤
set -g status-left-length 32
set -g status-right-length 150
# Status reference
# ----------------
# #(shell-command) First line of the command's output
# #[attributes] Colour or attribute change
# #H Hostname of local host
# #h Hostname of local host without the domain name
# #F Current window flag
# #I Current window index
# #P Current pane index
# #S Session name
# #T Current pane title
# #W Current window name
# ## A literal `#'
#
# Solarized reference
# -------------------
# base03 234
# base02 235
# base01 240
# base00 241
# base0 244
# base1 245
# base2 254
# base3 230
# yellow 136
# orange 166
# red 160
# magenta 125
# violet 61
# blue 33
# cyan 37
# green 64
set -g status-bg colour8
set -g window-status-activity-attr bold
set -g status-left '#[fg=colour16,bg=colour14,bold] #S #[fg=colour254,bg=colour16,nobold]'
set -g status-right '#[fg=colour245]#(itunes status) | %R | %d %b #[fg=colour254,bg=colour8,nobold]'
set -g window-status-format "#[fg=colour14,bg=colour8] #I #W "
set -g window-status-current-format "#[fg=colour16,bg=colour33,noreverse,bold] #I #W #[fg=colour33,bg=colour234,nobold]"
# Activity
setw -g monitor-activity on
set -g visual-activity off
# Autorename sanely.
setw -g automatic-rename on
# Better name management
bind c new-window -c '#{pane_current_path}' \; command-prompt "rename-window '%%'"
bind C new-window -c '#{pane_current_path}'
bind , command-prompt "rename-window '%%'"
# Copy mode
setw -g mode-keys vi
bind ` copy-mode
unbind [
unbind p
bind p paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-pipe "xsel --clipboard --input"
bind -t vi-copy Escape cancel