-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
79 lines (64 loc) · 2 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
# make tmux display things in 256 colors
set -g default-terminal "xterm-256color"
set -ag terminal-overrides ",alacritty:RGB"
# set scrollback history to 10000 (10k)
set -g history-limit 10000
# set Ctrl-q as the default prefix key combination
# and unbind C-b to free it up
set -g prefix C-q
unbind C-b
# shorten command delay
set -sg escape-time 1
# disable status bar
set -g status off
# reload ~/.tmux.conf using PREFIX r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Smart pane switching with awareness of Vim splits.
%hidden is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind h if-shell "$is_vim" 'send-keys C-q h' 'select-pane -L'
bind j if-shell "$is_vim" 'send-keys C-q j' 'select-pane -D'
bind k if-shell "$is_vim" 'send-keys C-q k' 'select-pane -U'
bind l if-shell "$is_vim" 'send-keys C-q l' 'select-pane -R'
# resize panes using PREFIX H, J, K, L
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# window selection
set -g base-index 1
set -g renumber-windows on
bind -n M-1 select-window -t 1
bind -n M-2 select-window -t 2
bind -n M-3 select-window -t 3
bind -n M-4 select-window -t 4
bind -n M-5 select-window -t 5
bind -n M-6 select-window -t 6
bind -n M-7 select-window -t 7
bind -n M-8 select-window -t 8
bind -n M-9 select-window -t 9
unbind 0
unbind 1
unbind 2
unbind 3
unbind 4
unbind 5
unbind 6
unbind 7
unbind 8
unbind 9
setw -g mode-style "bg=#264f78"
# use vim keybindings in copy mode
setw -g mode-keys vi
bind P paste-buffer
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-selection
bind -T copy-mode-vi r send-keys -X rectangle-toggle
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'schasse/tmux-jump'
set -g @jump-key 'g'
set -g @plugin 'fcsonline/tmux-thumbs'
run-shell ~/.tmux/plugins/tmux-thumbs/tmux-thumbs.tmux
set -g @thumbs-command 'echo -n {} | xclip -sel clip'
set -g @thumbs-unique enabled
run '~/.tmux/plugins/tpm/tpm'