-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
80 lines (64 loc) · 2.56 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
# My Tmux configuration, based largely on the recommendations of Brian P. Hogan
# in his Tmux book, available from Pragmatic Press
# Author: Elija Sorensen
# Twitter, github, etc.: @WhiskeyTuesday
# Set tmux shell to whatever the current default shell is
set-option -g default-shell $SHELL
set -g default-terminal "tmux-256color"
# Technically this next line should be the commented "RGB" version
# below, as a 256color terminal only guaranties 16 bit support (RGB)
# rather than 24-bit (Tc or true color) but there don't seem to be
# appropriate TERM names for tc support so I set Tc whenever 256color
# is in the TERM name and just hope for the best
set -ga terminal-overrides ",*256col*:Tc"
# set -ga terminal-overrides ",*256col*:RGB"
# alacritty on the other hand sets TERM to alacritty, and definitely
# does support true color
set -ga terminal-overrides ",*alacritty*:Tc"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
# Set ^a as the prefix, unset ^b
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# set scrollback buffer size to be much larger
set-option -g history-limit 50000
# Set escape time to 0 so tmux doesn't interfere with vim mode switching
set -sg escape-time 0
# Set the base index to 1 for windows and panes
set -g base-index 1
setw -g pane-base-index 1
# Set sticky directory for new windows and panes
set-environment -g CHERE_INVOKING 1
bind-key c new-window -c "#{pane_current_path}"
bind-key v split-window -h -c "#{pane_current_path}" # vimmed version
bind-key s split-window -v -c "#{pane_current_path}" # vimmed version
# More vimness
# select panes with vim keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# select panes without prefix with alt and vim keys
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# resize panes with alt and yiuo
bind-key -n M-y resize-pane -L
bind-key -n M-u resize-pane -D
bind-key -n M-i resize-pane -U
bind-key -n M-o resize-pane -R
# Colours
set -g pane-border-style fg=white
set -g pane-active-border-style fg=white
set -g status-style bg=black,fg=white
set -g message-style bg=white,fg=black
set -g status on
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'aaronpowell/tmux-weather'
#set -g @plugin 'tmux-plugins/tmux-continuum'
# Initialise TMUX Plugin Manager
run '~/.tmux/plugins/tpm/tpm' # Must be last line