-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
81 lines (61 loc) · 2.97 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
set-option -g focus-events on
set-option -sa terminal-overrides ',XXX:RGB'
# enable vi mode
set -g mode-keys vi
# set the leader
set -g prefix C-s
# move through panes like vim
unbind k
bind-key k select-pane -U
unbind j
bind-key j select-pane -D
unbind h
bind-key h select-pane -L
unbind l
bind-key l select-pane -R
unbind v
## better copy mode handling, note xclip used here loads selection into all paste buffers
# vim mode for visual select in copy mode
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "xclip"
# Stay in copy mode on drag end.
unbind-key -T copy-mode-vi MouseDragEnd1Pane
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "xclip"
# Scroll 3 lines at a time instead of default 5; don't extend dragged selections.
bind-key -T copy-mode-vi WheelUpPane select-pane\; send-keys -t'{mouse}' -X clear-selection\; send-keys -t'{mouse}' -X -N 3 scroll-up
bind-key -T copy-mode-vi WheelDownPane select-pane\; send-keys -t'{mouse}' -X clear-selection\; send-keys -t'{mouse}' -X -N 3 scroll-down
# Make double and triple click work outside of copy mode
bind-key -T root DoubleClick1Pane if-shell -Ft'{mouse}' '#{alternate_on}' "send-keys -M" "copy-mode -t'{mouse}'; send-keys -t'{mouse}' -X select-word"
bind-key -T root TripleClick1Pane if-shell -Ft'{mouse}' '#{alternate_on}' "send-keys -M" "copy-mode -t'{mouse}'; send-keys -t'{mouse}' -X select-line"
# Don't exit copy mode on double or triple click.
bind-key -T copy-mode-vi DoubleClick1Pane if-shell -Ft'{mouse}' '#{alternate_on}' "send-keys -M" "copy-mode -t'{mouse}'; send-keys -t'{mouse}' -X select-word"
bind-key -T copy-mode-vi TripleClick1Pane if-shell -Ft'{mouse}' '#{alternate_on}' "send-keys -M" "copy-mode -t'{mouse}'; send-keys -t'{mouse}' -X select-line"
# For those times when C-c and q are not enough.
bind-key -T copy-mode-vi Escape send-keys -X cancel
# Setting the delay between prefix and command
set -s escape-time 5
# Set bind key to reload configuration file
bind r source-file ~/.tmux.conf \; display "✅ Reloaded!"
# Enable mouse support
set -g mouse on
set -s set-clipboard on
# set copy color
set -g mode-style fg=black,bg=brightyellow
# Set vi as the default editor
set -g status-keys vi
# setup the status line
set -g status-position top
set -g status-style fg=default,bg=default
set -g message-style bg=green,fg=white
set -g status-left "#[bg=brightblack fg=white] #[bold]#{=7:host} #[bg=default fg=brightblack]"
set -g window-status-current-format "#[fg=white] 裡 #I#[bold] #{=20:pane_title}"
set -g window-status-format "#[fg=brightblack] 裡 #I #{=20:pane_title}"
set -g status-right "#[bg=default fg=brightblack]#[bg=brightblack fg=white] #[bold] %l:%M "
# set the divider color
set -g pane-active-border-style bg=default,fg=blue
set -g pane-border-indicators both
# Start window and pane numbering at 1, (0 is too hard to reach).
set-option -g base-index 1
set-option -g pane-base-index 1
# set title
set -g set-titles on