-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
115 lines (98 loc) · 3.94 KB
/
.tmux.conf
File metadata and controls
115 lines (98 loc) · 3.94 KB
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
# Default Command Key change B to O
unbind-key ^B
unbind-key ^O
set -g prefix ^O
# General Options
set -ga terminal-overrides ",xterm-256color:Tc"
set -g default-shell $SHELL
set -g set-titles on
set -g set-titles-string '#H:#S.#I.#P #W #T' # window number,program name,active (or not)
set -g history-limit 100000
set -g bell-action any
set -g visual-bell off
setw -g monitor-activity on
set -g base-index 1
setw -g pane-base-index 1
set -g xterm-keys on
set -s escape-time 50
# General keymap
bind-key ^D detach-client
bind-key ^C new-window
set -g status-keys vi
setw -g mode-keys vi
unbind r
bind-key r source-file ~/.tmux.conf \; display-message "Reloaded!"
if-shell "tmux -V | awk '{exit !($2 >= \"2.4\")}'" \
'bind-key -T copy-mode-vi C-b send-keys -X page-up'
# Window management
bind-key -n M-, previous-window
bind-key -n M-. next-window
bind-key -n M-/ last-window
bind-key -T copy-mode-vi M-, previous-window
bind-key -T copy-mode-vi M-. next-window
bind-key -T copy-mode-vi M-/ last-window
# Pane management
bind v split-window -h -c '#{pane_current_path}'
bind h split-window -v -c '#{pane_current_path}'
bind -n ^H select-pane -L
bind -n ^L select-pane -R
bind -n ^K select-pane -U
bind -n ^J select-pane -D
bind -n WheelUpPane copy-mode
bind s setw synchronize-panes on
bind S setw synchronize-panes off
bind j command-prompt -p "join pane from:" "join-pane -s ':%%'"
bind J break-pane
# Scrollback vim-style copy/paste
unbind [
bind-key [ copy-mode
bind-key C-[ copy-mode
unbind p
bind ] paste-buffer
set-window-option -g mode-keys vi
if-shell "tmux -V | awk '{exit !($2 >= \"2.4\")}'" \
'bind-key -Tcopy-mode-vi v send -X begin-selection; bind-key -Tcopy-mode-vi y send -X copy-selection-and-cancel; bind-key -Tcopy-mode-vi [ send -X copy-selection; bind-key -Tcopy-mode-vi Escape send -X cancel'
if-shell "tmux -V | awk '{exit !($2 < \"2.4\")}'" \
'bind-key -t vi-copy v begin-selection; bind-key -t vi-copy y copy-selection; bind-key -t vi-copy [ copy-selection; bind-key -t vi-copy Escape cancel'
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
if-shell "tmux -V | awk '{exit !($2 >= \"2.4\")}'" \
'bind-key -Tcopy-mode-vi C-WheelUpPane send -X halfpage-up; bind-key -Tcopy-mode-vi C-WheelDownPane send -X halfpage-down'
if-shell "tmux -V | awk '{exit !($2 < \"2.4\")}'" \
'bind-key -t vi-copy C-WheelUpPane halfpage-up; bind-key -t vi-copy C-WheelDownPane halfpage-down'
bind m set -g mouse on;
bind M set -g mouse off;
# Status bar
if-shell "tmux -V | awk '{exit !($2 < \"2.2\")}'" \
'set-option -g status-utf8 on'
set -g status-justify left
set -g status-left-length 40
set -g status-right-length 80
set -g status-bg "#002b36"
setw -g window-status-format "#[bg=colour249,fg=colour30] #I #[bg=colour30,fg=colour249] #W "
setw -g window-status-current-format "#[bg=#eee8d5,fg=#002b36,bold]#[bg=#eee8d5,fg=#2aa198,nobold] #I #[bg=#2aa198,fg=#eee8d5,bold]#[bg=#2aa198,fg=#eee8d5,nobold] #W #[bg=#002b36,fg=#2aa198,bold]"
setw -g pane-active-border-style fg="#2aa198"
setw -g pane-border-style fg="#073642"
setw -g mode-style fg="#eee8d5",bg="#2aa198"
setw -g message-style fg="#eee8d5"
bind f setw allow-rename off
bind F setw allow-rename on
set -g allow-rename on
set -g automatic-rename on
set -g status-left ""
set -g status-right "#[fg=#2aa198,nobold]%Y-%m-%d #[fg=#859900,bold]%H:%M"
set -g status-interval 60
# Plugins (TPM)
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Resurrect settings
set -g @resurrect-capture-pane-contents 'on'
# Continuum settings
set -g @continuum-restore 'on'
set -g @continuum-save-interval '5'
# Local config
if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local'
# Initialize TPM (must be at the very bottom)
run '~/.tmux/plugins/tpm/tpm'