-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdot.tmux.conf
75 lines (60 loc) · 2.16 KB
/
dot.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
# Remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Set TERM and key bindings
set -g default-terminal "screen-256color"
set -g status-keys emacs
setw -g xterm-keys on
# Start window and pane indexing at 1
set -g renumber-windows on
set -g base-index 1
setw -g pane-base-index 1
# Misc options
set -g monitor-activity on
setw -g automatic-rename on
setw -g aggressive-resize on
# Vim-like copy behavior
unbind-key -T copy-mode-vi Space
unbind-key -T copy-mode-vi Enter
unbind-key -T copy-mode-vi C-v
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
# Lots of history!
setw -g history-limit 50000
# Don't delay the escape key
set -sg escape-time 0
# Split panes using \ and -
unbind '"'
unbind %
bind '\' split-window -h
bind - split-window -v
# Switch panes using Alt-hjkl without prefix
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D
# Switch windows with Ctrl-Alt-Z/X
bind-key -n M-C-z previous-window
bind-key -n M-C-x next-window
# Ctrl-a + a switches to last window
bind-key a last-window
# Prefix + r to reload tmux.conf
unbind r
bind r source-file ~/.tmux.conf \;\
display 'Reloaded tmux config'
# Theme
set -g set-titles-string '[#S:#I] #W'
set -g status-style bg=colour0,fg=colour12
set -g status-left-length 41
set -g status-left '#[fg=colour15]#{?client_prefix,#[bg=colour2],#[bg=colour12]} #S #[bg=colour0]#{?client_prefix,#[fg=colour8],#[fg=colour12]}'
set -g status-right-style bg=colour0,fg=colour12
set -g status-right-length 100
set -g status-right '#[bg=colour12]#[fg=colour7] #H '
set -g window-status-current-style bg=colour11,fg=colour0
set -g window-status-activity-style bg=colour11,fg=colour0
set -g window-status-current-format '#[fg=colour0]#[bg=colour11] #[fg=colour7]#I:#W#F #[bg=colour0]#[fg=colour11]'
set -g window-status-format ' #I:#W#F '