-
Notifications
You must be signed in to change notification settings - Fork 2
/
.tmux.conf
59 lines (40 loc) · 1.75 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
source-file ~/.tmux.colors.conf
set -g base-index 1
set -g renumber-windows on
set -g default-terminal "st-24bit"
set -g terminal-overrides "st-24bit:Tc"
#set -g default-terminal "rxvt-unicode-256color"
#set -g terminal-overrides "rxvt-unicode-256color:Tc"
#set -g default-terminal "xterm-256color"
#set -g terminal-overrides "xterm-256color:Tc"
set -g escape-time 1
set -g status-right "#T"
set -g status-right-length 1024
set -g allow-rename off
set -g visual-activity on
setw -g monitor-activity on
bind | split-window -c "#{pane_current_path}" -h
bind - split-window -c "#{pane_current_path}" -v
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind -r C-j select-window -t :-
bind -r C-k select-window -t :+
set -g mode-keys vi
bind p paste-buffer
bind escape copy-mode
bind-key -T copy-mode-vi 'v' send-keys -X 'begin-selection'
bind-key -T copy-mode-vi 'y' send-keys -X 'copy-selection'
bind C-c run "/usr/bin/tmux save-buffer - | /usr/bin/xclip -i -sel clipboard >/dev/null"
bind C-v run "/usr/bin/tmux set-buffer \"$(/usr/bin/xclip -o -sel clipboard)\"; /usr/bin/tmux paste-buffer"
bind C-q kill-session
bind C-s set-window-option synchronize-panes
bind r source-file ~/.tmux.conf \; display "~/.tmux.conf reloaded"
bind P pipe-pane -o "cat >>~/#S:#W.#P.log" \; display "logging to ~/#S:#W.#P.log"