-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
70 lines (56 loc) · 2.48 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
unbind C-b
set-option -g prefix M-j
set -g base-index 1
set -g default-terminal "xterm"
set-option -g set-clipboard off
# -- mouse options --
set-option -g mouse on
bind-key -n F2 run-shell "tmux set-option -g mouse off"
bind-key -n F3 run-shell "tmux set-option -g mouse on"
bind-key -n F4 run-shell "tmux show-buffer | xclip -sel clip -i > /dev/null 2>&1"
# select bindings
#bind-key -T copy-mode-vi MouseUp1Pane send -X cancel
bind-key -T copy-mode-vi MouseDragEnd1Pane send -X stop-selection \; send -X copy-pipe "xclip -in -selection clipboard > /dev/null 2>&1"
bind-key -T copy-mode-vi MouseDown2Pane run "tmux send-keys -X cancel ; tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
bind-key -T copy-mode-vi MouseDown3Pane run "tmux send-keys -X cancel ; tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
bind-key -n MouseDown2Pane run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
bind-key -n MouseDown3Pane run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
# Double LMB Select & Copy (Word)
bind-key -T copy-mode-vi DoubleClick1Pane \
select-pane \; \
send-keys -X select-word-no-clear \; \
send-keys -X copy-pipe-no-clear "xclip -in -sel clipboard"
bind-key -n DoubleClick1Pane \
select-pane \; \
copy-mode -M \; \
send-keys -X select-word \; \
send-keys -X copy-pipe-no-clear "xclip -in -sel clipboard"
# Triple LMB Select & Copy (Line)
bind-key -T copy-mode-vi TripleClick1Pane \
select-pane \; \
send-keys -X select-line \; \
send-keys -X copy-pipe-no-clear "xclip -in -sel clipboard"
bind-key -n TripleClick1Pane \
select-pane \; \
copy-mode -M \; \
send-keys -X select-line \; \
send-keys -X copy-pipe-no-clear "xclip -in -sel clipboard"
# -- statusbar --
set -g status-style bg='#44475a',fg='#bd93f9'
set -g window-status-style fg='#bd93f9',bg=default
set -g window-status-current-style fg='#ff79c6',bg='#282a36'
# override home and end key usage
bind-key -n Home send-keys C-a
bind-key -n End send-keys C-e
# -- keyboard shortcuts --
# vi mode ftw
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-pipe "xclip -sel clip -i > /dev/null 2>&1"
# easier window switch
bind-key -n C-Left previous-window
bind-key -n C-Right next-window
#bind-key -n C-T new-window
#bind-key -n C-X kill-window
set -s escape-time 0
#set -g status-right '#(/home/ms/bin/ltceur.pl) "#{=21:pane_title}" %H:%M %d-%b-%y'