-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_tmux.conf.tmpl
More file actions
157 lines (116 loc) Β· 4.79 KB
/
dot_tmux.conf.tmpl
File metadata and controls
157 lines (116 loc) Β· 4.79 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
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
145
146
147
148
149
150
151
152
153
154
155
156
157
# -- general -------------------------------------------------------------------
set -g default-terminal "xterm-256color"
set -g terminal-overrides ',xterm-256color:RGB'
set -g default-shell $SHELL
set -g default-command $SHELL
setw -g xterm-keys on
set -s escape-time 10 # faster command sequences
set -sg repeat-time 300 # increase repeat timeout
set -s focus-events on
setw -g xterm-keys on
set -s focus-events on
# replace C-b by C-a instead of using both prefixes
set -gu prefix2
unbind C-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
set -q -g status-utf8 on # expect UTF-8 (tmux < 2.2)
setw -q -g utf8 on
set -g history-limit 5000 # boost history
# reload configuration
bind r run 'tmux source ~/.tmux.conf' \; display "~/.tmux.conf sourced"
# -- display -------------------------------------------------------------------
set -g base-index 1 # start windows numbering at 1
setw -g pane-base-index 1 # make pane numbering consistent with windows
setw -g automatic-rename on # rename window to reflect current program
set -g renumber-windows on # renumber windows when a window is closed
set -g set-titles on # set terminal title
set -g display-panes-time 800 # slightly longer pane indicators display time
set -g display-time 1000 # slightly longer status messages display time
# clear both screen and history
bind -n C-l send-keys C-l \; run 'sleep 0.2' \; clear-history
# activity
set -g monitor-activity on
set -g visual-activity off
# -- navigation ----------------------------------------------------------------
# create session
bind C-c new-session
# find session
bind C-f command-prompt -p find-session 'switch-client -t %%'
# session navigation
bind BTab switch-client -l # move to last session
# split current window horizontally
bind - split-window -v
unbind '"'
bind '"' split-window -v
# split current window vertically
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# new window
unbind c
bind c new-window
# kill window
unbind x
bind x kill-window
# pane navigation
bind -r h select-pane -L # move left
bind -r j select-pane -D # move down
bind -r k select-pane -U # move up
bind -r l select-pane -R # move right
bind > swap-pane -D # swap current pane with the next one
bind < swap-pane -U # swap current pane with the previous one
bind b break-pane # detach pane into new window
bind B break-pane -d # detach pane into new window in the background
# pane resizing
bind -r H resize-pane -L 2
bind -r J resize-pane -D 2
bind -r K resize-pane -U 2
bind -r L resize-pane -R 2
# window navigation
unbind n
unbind p
bind -r C-h previous-window # select previous window
bind -r C-l next-window # select next window
bind Tab last-window # move to last active window
# scratchpad window
bind -r C-i run-shell 'popuptmux'
bind -r C-o run-shell 'popuptmux'
# -- copy mode -----------------------------------------------------------------
bind Enter copy-mode # enter copy mode
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi C-v send -X rectangle-toggle
bind -T copy-mode-vi y send -X copy-selection-and-cancel
bind -T copy-mode-vi Escape send -X cancel
bind -T copy-mode-vi _ send -X start-of-line
bind -T copy-mode-vi β¬ send -X end-of-line
bind -T copy-mode-vi $ send -X end-of-line
bind -T copy-mode-vi Β€ send -X end-of-line
# -- plugins -------------------------------------------------------------------
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
# -- status line ----------------------------------------------------------------
set -g status-position bottom
set -g status-justify left
set -g status-interval 1
# default statusbar colors
# Icons: https://www.nerdfonts.com/cheat-sheet
#ββββββββββββββββββββββββββββββββ
set -g status-bg default
set -g status-fg default
set -g status-style bg=default,fg=colour244
set -g status-left-length 85
set -g status-left "#{?client_prefix,σ±€³,#{?window_zoomed_flag,ο±,ο}} #S "
set -g status-right "σ°° %Y-%m-%d %H:%M %p "
# Window status colors
set -g window-status-style bg=default,fg=colour244
set -g window-status-current-style bg=default,fg=colour202
set -g window-status-last-style bg=default,fg=colour244
set -g window-status-bell-style bg=default,fg=colour244
set -g window-status-activity-style bg=default,fg=colour244
set -g window-status-separator ''
set -g window-status-format "ξ
#[reverse] #{window_index} #[none]ξ #W "
set -g window-status-current-format "ξ
#[reverse] #{window_index} #[none]ξ #W "
# -- tpm -----------------------------------------------------------------------
run '~/.tmux/plugins/tpm/tpm'