-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy path.tmux.conf
80 lines (63 loc) · 2.65 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
### Settings ###
set -g default-command "reattach-to-user-namespace -l bash"
set -g default-terminal screen-256color
set -s escape-time 0
set -g focus-events on
setw -g mode-keys vi
setw -g status-keys vi
set -g base-index 1
setw -g pane-base-index 1
setw -g renumber-windows on
bind 0 selectw -t:10
### Bindings ###
set -g prefix C-a
unbind C-b
bind C-a send-prefix
bind C-r source "$HOME/.tmux.conf" \; display-message " #S > source config: done"
bind C-m set mouse \; display-message " #S > toggle mouse: #{?mouse,on,off}"
unbind -t vi-copy Enter
unbind -t vi-copy Space
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
bind -n M-H select-pane -L
bind -n M-J select-pane -D
bind -n M-K select-pane -U
bind -n M-L select-pane -R
bind -n M-P select-pane -l
bind -n M-{ resize-pane -L
bind -n M-} resize-pane -R
bind -n M-( resize-pane -D
bind -n M-) resize-pane -U
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n M-H if-shell "$is_vim" "send-keys M-H" "select-pane -L"
bind-key -n M-J if-shell "$is_vim" "send-keys M-J" "select-pane -D"
bind-key -n M-K if-shell "$is_vim" "send-keys M-K" "select-pane -U"
bind-key -n M-L if-shell "$is_vim" "send-keys M-L" "select-pane -R"
bind-key -n M-P if-shell "$is_vim" "send-keys M-P" "select-pane -l"
### Styles ###
TMUX_WIDGETS="$HOME/bin/tmux"
set -g status-style "bg=colour248,fg=colour236"
set -g status-left-style "bg=blue"
set -g status-left " #S "
set -g status-right-length 100
set -g status-right-style "fg=colour239"
set -g status-right "#{?mouse,#[fg=colour029],#[fg=colour243]}⦺#[default] "
set -ga status-right "#($TMUX_WIDGETS/getoutdated.sh) "
set -ga status-right "#($TMUX_WIDGETS/getmedia.sh) "
set -ga status-right "#(rainbarf --datfile='/tmp/rainbarf.dat')"
set -ga status-right "#($TMUX_WIDGETS/getsmc.sh) "
set -ga status-right "#[bg=colour240,fg=colour249] #($TMUX_WIDGETS/getio.sh #{status-interval}) "
set -ga status-right "#($TMUX_WIDGETS/getdisk.sh)"
set -ga status-right "#[bg=colour238,fg=colour247] #($TMUX_WIDGETS/getnet.sh #{status-interval}) "
set -ga status-right "#[bg=colour236,fg=colour246] #($TMUX_WIDGETS/getweather.sh)"
set -g window-status-separator ""
set -g window-status-format " #I #{=4:window_name}#F "
set -g window-status-current-format " #I #{=4:window_name}#F "
set -g window-status-current-style "reverse"
set -g window-status-activity-style "bg=colour065,fg=colour251"
set -g window-status-bell-style "bg=red,fg=colour250"
setw -g pane-border-style "fg=colour236"
setw -g pane-active-border-style "fg=colour066"
set -g message-command-style "bg=blue,fg=colour236"
set -g message-style "bg=blue,fg=colour236"