Repository navigation
Expand file tree
/
Copy pathtmux.conf
More file actions
55 lines (47 loc) · 1.46 KB
/
Copy pathtmux.conf
File metadata and controls
55 lines (47 loc) · 1.46 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
48
49
50
51
52
53
54
55
# vim: ts=2 sw=2
set -s set-clipboard on
set -sg escape-time 0
set -g allow-rename on
set -g default-shell /bin/zsh
if-shell '[ -e /opt/homebrew/bin/zsh ]' {
set -g default-shell /opt/homebrew/bin/zsh
}
set -g default-terminal "screen-256color"
set -g display-time 4000
set -g focus-events on
set -g history-limit 50000
set -g mode-keys vi
set -g mouse on
set -g set-titles on
set -g set-titles-string "#W - #H"
set -g status-interval 5
set -g update-environment \
"SSH_AUTH_SOCK SSH_CLIENT SSH_CONNECTION SSH_TTY DISPLAY"
bind k kill-session
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config file
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
# mac clipboard support
if-shell '[ "$(uname -s)" = "Darwin" ]' {
bind -T copy-mode-vi y send-key -X copy-pipe-and-cancel pbcopy
bind -T copy-mode-vi Enter send-key -X copy-pipe-and-cancel pbcopy
bind -T copy-mode-vi MouseDragEnd1Pane send-key -X copy-pipe-and-cancel pbcopy
}
if-shell '[ -e /usr/bin/xsel ]' {
bind -T copy-mode-vi y send-key -X copy-pipe-and-cancel xsel -ib
bind -T copy-mode-vi Enter send-key -X copy-pipe-and-cancel xsel -ib
bind -T copy-mode-vi MouseDragEnd1Pane send-key -X copy-pipe-and-cancel xsel -ib
}