-
Notifications
You must be signed in to change notification settings - Fork 5
/
dot_tmux.conf
78 lines (57 loc) · 2.08 KB
/
dot_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
# Remap binding from C-b to C-a
unbind C-a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Split panes
bind C-v split-window -h -c "#{pane_current_path}"
bind C-h split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
# Mouse
set -g mouse on
# Use wl-copy
set -s copy-command 'wl-copy'
# Fix slow escape time
set -s escape-time 0
# Send focus events
set -g focus-events on
# 256 colours
set-option -g default-terminal "xterm-256color"
# Reload tmux config on the fly
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# Quickly open tmux config file
bind-key M split-window -h "vim ~/.tmux.conf"
# Switch between panes without using prefix
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D
# Reorder tmux windows
bind-key -n S-Left swap-window -t -1 -d
bind-key -n S-Right swap-window -t +1 -d
# don't rename windows automatically
set-option -g allow-rename off
# Make sure window indexes remain sequential
set-option -g renumber-windows on
# Distinguish the active pane more clearly
set -g pane-border-style 'fg=#666666,bg=default'
set -g pane-active-border-style 'fg=#84C318,bg=default'
# Start windows and panes at 2 not 0
set -g base-index 1
setw -g pane-base-index 1
# Prompt to set window name on creation
bind-key c command-prompt -p "window name:" "new-window; rename-window '%%'"
# Undercurl https://github.com/folke/tokyonight.nvim#making-undercurls-work-properly-in-tmux
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
set -g status-interval 1
set -g @onedark_widgets "#(focus status)"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'odedlaz/tmux-onedark-theme'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'