forked from henricavalcante/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
189 lines (149 loc) · 5.46 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# List of plugins
run '~/.tmux/plugins/tpm/tpm'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'samoshkin/tmux-plugin-sysstat'
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
set-option -g history-limit 50000
set-window-option -g mode-keys vi
bind -n C-k clear-history
# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1
#######################
######## THEME ########
######################
# set the pane border colors
set -g pane-border-style fg="colour250",bg="default"
# panes
set -g pane-active-border-style fg=brightred,bg=default
## Status bar design
# status line
# set -g status-utf8 on
set -g status-justify left
set -g status-bg default
set -g status-fg colour12
set -g status-interval 2
# messaging
set -g message-style fg=black,bg=yellow
set -g message-command-style fg=blue,bg=black
#window mode
setw -g mode-style fg=colour0,bg=colour6
# window status
#setw -g window-status-format " #F#I:#W#F "
#setw -g window-status-current-format " #F#I:#W#F "
# Info on left (I don't have a session display for now)
set -g status-left ''
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity on
set-option -g bell-action none
set -g default-terminal "screen-256color"
# The modes {
setw -g clock-mode-colour colour135
setw -g mode-style fg=colour196,bg=colour238,bold
# }
# The panes {
#set -g pane-border-bg colour235
#set -g pane-border-fg colour238
#set -g pane-active-border-bg colour236
#set -g pane-active-border-fg colour51
# }
# The statusbar {
set -g status-position top
set -g status-style bg=colour234,fg=colour137,dim
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
#set -g status-right-length 200
#set -g status-left-length 200
setw -g window-status-current-style fg=colour81,bg=colour238,bold
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50] #F '
setw -g window-status-style fg=colour138,bg=default,dim
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244] #F '
setw -g window-status-bell-style fg=colour3,bg=default,bold
setw -g window-status-activity-style fg=colour3,bg=default,bold
# }
# The messages {
set -g message-style fg=colour232,bg=colour166,bold
# }
setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock
set-option -g status on
set-option -g status-interval 2
#set-option -g status-justify "centre"
set-option -g status-left-length 60
set-option -g status-right-length 91
# =====================================
# === Theme ===
# =====================================
# Feel free to NOT use this variables at all (remove, rename)
# this are named colors, just for convenience
color_orange="colour166" # 208, 166
color_purple="colour134" # 135, 134
color_green="colour076" # 070
color_blue="colour39"
color_yellow="colour220"
color_red="colour160"
color_black="colour232"
color_white="white" # 015
# This is a theme CONTRACT, you are required to define variables below
# Change values, but not remove/rename variables itself
color_dark="$color_black"
color_light="$color_white"
color_session_text="$color_blue"
color_status_text="colour245"
color_main="$color_orange"
color_secondary="$color_purple"
color_level_ok="$color_green"
color_level_warn="$color_yellow"
color_level_stress="$color_red"
color_window_off_indicator="colour088"
color_window_off_status_bg="colour238"
color_window_off_status_current_bg="colour254"
bind-key -n M-1 select-window -t 1
bind-key -n M-2 select-window -t 2
bind-key -n M-3 select-window -t 3
bind-key -n M-4 select-window -t 4
bind-key -n M-5 select-window -t 5
bind-key -n M-6 select-window -t 6
bind-key -n M-7 select-window -t 7
bind-key -n M-8 select-window -t 8
bind-key -n M-9 select-window -t 9
bind -T off M-1 select-window -t 1
bind -T off M-2 select-window -t 2
bind -T off M-3 select-window -t 3
bind -T off M-4 select-window -t 4
bind -T off M-5 select-window -t 5
bind -T off M-6 select-window -t 6
bind -T off M-7 select-window -t 7
bind -T off M-8 select-window -t 8
bind -T off M-9 select-window -t 9
bind -T root C-q \
set prefix None \;\
set key-table off \;\
set status-style "fg=$color_status_text,bg=$color_window_off_status_bg" \;\
set window-status-current-format "#[fg=$color_window_off_status_bg,bg=$color_window_off_status_current_bg]$separator_powerline_right#[default] #I:#W# #[fg=$color_window_off_status_current_bg,bg=$color_window_off_status_bg]$separator_powerline_right#[default]" \;\
set window-status-current-style "fg=$color_dark,bold,bg=$color_window_off_status_current_bg" \;\
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
refresh-client -S \;\
bind -T off C-q \
set -u prefix \;\
set -u key-table \;\
set -u status-style \;\
set -u window-status-current-style \;\
set -u window-status-current-format \;\
refresh-client -S
bind-key -T copy-mode-vi "y" send -X copy-pipe "xclip -in -selection clipboard"
wg_is_keys_off="#[fg=$color_light,bg=$color_window_off_indicator]#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'OFF')#[default]"
set -g status-right "$wg_is_keys_off #{sysstat_cpu} | #{sysstat_mem} | #{sysstat_loadavg} | %b %d - %H:%M:%S "
run '~/.tmux/plugins/tpm/tpm'