-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
83 lines (64 loc) · 2.28 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
set-option -g prefix C-Space
# Reload tmux conf
bind r source-file ~/.tmux.conf
# Vim mode
set-window-option -g mode-keys vi
# Set default shell
set -g default-shell $SHELL
# Copy mode
bind-key v copy-mode
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
# Pane resizing
bind -r C-k resize-pane -U
bind -r C-j resize-pane -D
bind -r C-h resize-pane -L
# Go to previous window
bind -r O switch-client -l
bind -r o last-window
bind -r ^ switch-client -l
# Go to previous window
bind -r N switch-client -n
bind -r P switch-client -p
# Enable mouse
set -g mouse on
# Vim like pane splitting
bind H split-window -v
bind V split-window -h
# Undercurl
set -g default-terminal "${TERM}"
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
# Appareance
set-option -g status-style bg=default # to keep background status bar transparent
set-option -g status-position top # status bar position, also can be: bottom
# Setup tmux theme
set -g @tokyo-night-tmux_window_id_style fsquare
set -g @tokyo-night-tmux_pane_id_style hsquare
set -g @tokyo-night-tmux_zoom_id_style dsquare
# Start windows and panes at 1 and not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on
# Open the new panes in the current path
bind v split-window -v -c "#{pane_current_path}"
bind h split-window -h -c "#{pane_current_path}"
# Toggle tmux status bar
bind '\' set status
if-shell "[[ $(tmux lsw | wc -l) -le 1 ]]" 'set -g status'
set -g status on
# List of plugins
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'wfxr/tmux-fzf-url'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'nikolovlazar/tokyo-night-tmux'
set -g @resurrect-capture-pane-contents 'on'
set -g @continuum-restore 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'