-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy path.tmux.conf
More file actions
91 lines (71 loc) · 2.1 KB
/
.tmux.conf
File metadata and controls
91 lines (71 loc) · 2.1 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
# Tmux Configuration File
# Change prefix from C-b to Alt-a
unbind C-b
set-option -g prefix M-a
bind-key M-a send-prefix
# Enable mouse mode
set -g mouse on
set -g default-terminal "xterm-256color"
set -as terminal-overrides ",*:Tc"
set -g window-style "bg=default"
set -g window-active-style "bg=default"
# Window and pane numbering
set -g base-index 1
setw -g pane-base-index 1
# Automatically renumber windows
set -g renumber-windows on
# install TPM if not already installed
if-shell '[ ! -d ~/.tmux/plugins/tpm ]' \
'run-shell "mkdir -p ~/.tmux/plugins && git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm"'
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'
run '~/.tmux/plugins/tpm/tpm'
# Window splitting
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# Pane navigation
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Resize panes
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
# Pane borders
set -g pane-border-style fg=colour238
set -g pane-active-border-style fg=colour154
# Activity monitoring
setw -g monitor-activity off
set -g visual-activity on
# History limit
set -g history-limit 10000
# Reload configuration
bind r source-file ~/.tmux.conf \; display-message "Config reloaded!"
# Kill current session
bind X confirm-before -p "Kill session #S? (y/n)" kill-session
# Vi mode
setw -g mode-keys vi
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-selection-and-cancel
# focus events
set -g focus-events on
# Escape time
set -sg escape-time 10
# New window in current directory
bind c new-window -c "#{pane_current_path}"
# Panel
set -g status-position top
set -g status-style "fg=#d8d8d8,bg=#3b3e47"
set -g status-left ""
set -g status-right "#[fg=#7d8088]#S "
set -g window-status-current-style "fg=#73c48f,bold"
# Window format
set -g window-status-format " #I:#W "
set -g window-status-current-format " #I:#W "