-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
107 lines (80 loc) · 2.27 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
# Terminal
# ----------
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",$TERM:Tc"
# TPM
# ----------
## List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# General
# ----------
## Index number settings
set -g base-index 1
set -g pane-base-index 1
## Change prefix
set -g prefix C-t
unbind C-b
## Enable mouse
set -g mouse on
## keep the window's name fixed
## https://stackoverflow.com/questions/6041178/keep-the-windows-name-fixed-in-tmux
set -g allow-rename off
## Look up in a man-page
bind-key m command-prompt -p "Man:" "split-window 'man %%'"
# pane
# ----------
# Split window
bind | split-window -h -c "#{pane_current_path}"
# Virtual split window
bind - split-window -v -c "#{pane_current_path}"
## Move pane shortcuts
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
## Resize pane shortcuts
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
# Copy mode
# ----------
## Use vim keybindings in copy mode
setw -g mode-keys vi
## Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# Session
# ----------
## Restore settings
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-dir '~/.tmux-resurrect'
set -g @continuum-boot 'on'
set -g @continuum-restore 'on'
set -g @continuum-save-interval '1'
# Status bar
# ----------
set -g status on
set -g status-justify left
## Window status
set -g status-position top
set -g status-interval 1
set -g window-status-format "#I:#W"
setw -g window-status-current-style bright
setw -g window-status-style dim
## Left
set -g status-left-length 100
set -g status-left 'tmux #H [#P:#S] '
## Right
set -g status-right-length 100
set -g status-right '[%Y-%m-%d(%a) %H:%M] Auto save #{continuum_status} minutes'
# Load TPM
# ----------
## Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'