-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
47 lines (39 loc) · 1.63 KB
/
Copy path.tmux.conf
File metadata and controls
47 lines (39 loc) · 1.63 KB
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
# remap prefix from 'C-b' to 'C-s'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# Note: C-Tab may not work in all terminals as many capture it for tab switching
# If C-Tab doesn't work, consider using C-a or C-s instead
# split panes using prefix + v (vertical) and prefix + h (horizontal)
bind v split-window -h
bind h split-window -v
unbind '"'
unbind %
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# don't rename windows automatically
set-option -g allow-rename off
set -g set-clipboard on
# Cross-platform clipboard: pbcopy (macOS), wl-copy (Wayland), xclip (X11)
if-shell "uname | grep -q Darwin" {
set -s copy-command 'pbcopy'
bind -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'pbcopy'
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'pbcopy'
} {
if-shell "command -v wl-copy" {
set -s copy-command 'wl-copy'
bind -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'wl-copy'
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'wl-copy'
} {
set -s copy-command 'xclip -selection clipboard'
bind -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -selection clipboard'
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -selection clipboard'
}
}