-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
110 lines (84 loc) · 3.61 KB
/
.tmux.conf
File metadata and controls
110 lines (84 loc) · 3.61 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
# reload config file
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# Remap prefix to C-Space
unbind-key C-b
set-option -g prefix 'C-Space'
bind-key 'C-Space' send-prefix
# Enable mouse control (clickable windows, panes, resizable panes)
set -g mouse on
# Enable system clipboard
set -g set-clipboard external
bind -T root MouseUp2Pane paste
# scrollback size
set -g history-limit 10000
# Start window & pane numbering from 1 instead of 0.
set -g base-index 1
setw -g pane-base-index 1
# Automatically re-number windows after one of them is closed.
set -g renumber-windows on
# Prevent Tmux from displaying the annoying Activity in window X messages:
set -g visual-activity off
# Disable the delay between an escape key press and subsequent characters.
set -sg escape-time 0
# don't rename windows automatically
set-option -g allow-rename off
# highlight window when it has new activity
setw -g monitor-activity on
set -g visual-activity on
# tell Tmux that outside terminal supports true color
# set 256 color
set -g default-terminal "tmux-256color"
# tell Tmux that outside terminal supports true color
set -ga terminal-overrides ",xterm-256color*:Tc"
set-option -ga terminal-overrides "alacritty:Tc"
#### START mrjones2014/smart-splits.nvim ####
# '@pane-is-vim' is a pane-local option that is set by the plugin on load,
# and unset when Neovim exits or suspends; note that this means you'll probably
# not want to lazy-load smart-splits.nvim, as the variable won't be set until
# the plugin is loaded
# Smart pane switching with awareness of Neovim splits.
bind-key -n C-h if -F "#{@pane-is-vim}" 'send-keys C-h' 'select-pane -L'
bind-key -n C-j if -F "#{@pane-is-vim}" 'send-keys C-j' 'select-pane -D'
bind-key -n C-k if -F "#{@pane-is-vim}" 'send-keys C-k' 'select-pane -U'
bind-key -n C-l if -F "#{@pane-is-vim}" 'send-keys C-l' 'select-pane -R'
# Smart pane resizing with awareness of Neovim splits.
bind-key -n M-h if -F "#{@pane-is-vim}" 'send-keys M-h' 'resize-pane -L 3'
bind-key -n M-j if -F "#{@pane-is-vim}" 'send-keys M-j' 'resize-pane -D 3'
bind-key -n M-k if -F "#{@pane-is-vim}" 'send-keys M-k' 'resize-pane -U 3'
bind-key -n M-l if -F "#{@pane-is-vim}" 'send-keys M-l' 'resize-pane -R 3'
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if -F \"#{@pane-is-vim}\" 'send-keys C-\\' 'select-pane -l'"
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if -F \"#{@pane-is-vim}\" 'send-keys C-\\\\' 'select-pane -l'"
bind-key -T copy-mode-vi 'C-h' select-pane -L
bind-key -T copy-mode-vi 'C-j' select-pane -D
bind-key -T copy-mode-vi 'C-k' select-pane -U
bind-key -T copy-mode-vi 'C-l' select-pane -R
bind-key -T copy-mode-vi 'C-\' select-pane -l
#### END mrjones2014/smart-splits.nvim ####
##################
## THEME CONFIG ##
##################
set-option -g status-style bg=default
set -g status-left ""
set -g status-right ""
set -g window-status-separator ' '
set -g window-status-format "#[fg=colour246,bg=colour239] #I: #W "
set -g window-status-current-format "#[fg=colour237,bg=colour108] #I: #W "
##################
## PLUGINS ##
##################
# set color of active pane
set -g pane-border-style fg=colour246
set -g pane-active-border-style fg=colour108
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'