-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
95 lines (68 loc) · 2.5 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-battery'
# TODO
# set -g @plugin 'thewtex/tmux-mem-cpu-load'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-online-status'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'fcsonline/tmux-thumbs'
run-shell ~/.tmux/plugins/tmux-thumbs/tmux-thumbs.tmux
if-shell "test -f ~/.tmux/tmuxline.conf" "source ~/.tmux/tmuxline.conf"
set -g default-terminal "screen-256color"
set -sa terminal-overrides ',screen-256color:RGB,*:U8=0'
set -g @continuum-restore 'on'
# Modfied prefix
set -g prefix C-s
# Unbind default prefix
unbind C-b
# Send C-w to push C-s*2.
bind C-s send-prefix
# Delay key stroke.
set -s escape-time 0
# Window index starts from 1
set -g base-index 1
# Pane index starts from 1
set -g pane-base-index 1
# increase scrollback buffer size
set -g history-limit 50000
set -g focus-events on
set -g update-environment " DISPLAY "
# Enable mouse
setw -g mouse on
set -g status-interval 10
set -g status-position top
set -g @urlview-key 'u'
# Reload configuration
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Split vertical
bind | split-window -h -c "#{pane_current_path}"
# Split horizontal
bind - split-window -v -c "#{pane_current_path}"
bind C-p previous-window
bind C-n next-window
# Resize pane
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
bind -r e setw synchronize-panes on
bind -r E setw synchronize-panes off
## Enable vi keybind
setw -g mode-keys vi
bind -T copy-mode-vi v send-keys -X begin-selection
if-shell "uname | grep -q Darwin" 'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"'
if-shell "uname | grep -q Darwin" 'bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"'
if-shell "uname | grep -q Darwin" 'set -g @thumbs-command "echo {} | pbcopy"'
if-shell "uname | grep -q Darwin" 'set -s copy-command "pbcopy"'
# if-shell 'type xsel' 'set -g @thumbs-command "echo {} | xsel -ip && xsel -op | xsel -ib"'
# if-shell 'type xsel' 'set -s copy-command "xsel -i"'
if-shell 'type xclip' 'set -g @thumbs-command "echo {} | xclip -selection clipboard"'
if-shell 'type xclip' 'set -s copy-command "xclip -selection clipboard"'
set -s set-clipboard off
set -g @thumbs-key f
bind ' ' select-layout -n
run -b '~/.tmux/plugins/tpm/tpm'