-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
89 lines (66 loc) · 1.83 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
# Gerard Marull-Paretas <[email protected]>
# SPDX-License-Identifier: MIT
# general
## use zsh
set-option -g default-shell /bin/zsh
## prefix to C-a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
## vi cursor movement
setw -g mode-keys vi
## delay between prefix and command
set -sg escape-time 1
## terminal color support
set -g default-terminal "screen-256color"
## activity alerts
setw -g monitor-activity on
set -g visual-activity on
## mouse
set -g mouse on
# windows and panes
## index to 1
set -g base-index 1
set -g pane-base-index 1
## split
bind | split-window -h
bind - split-window -v
## move
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
## cycle
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
## resize
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
# appearance
set -g status-bg black
set -g status-fg white
set -g status-justify centre
set -g window-status-current-style fg=black,bg=white,bold
set -g status-interval 60
set -g status-left-length 30
set -g status-left '#(whoami)'
if-shell 'uname | grep -q Darwin' {
set -g status-right '#[fg=yellow]#(sysctl -n vm.loadavg | cut -d " " -f 2-4)#[default] #[fg=white]%H:%M#[default]'
}
if-shell 'uname | grep -q Linux' {
set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg)#[default] #[fg=white]%H:%M#[default]'
}
# clipboard
set -g set-clipboard off
if-shell 'uname | grep -q Linux' {
set -s copy-command 'wl-copy'
}
if-shell 'uname | grep -q Darwin' {
set -s copy-command 'pbcopy'
}
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi V send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel