-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.tmux.conf
221 lines (195 loc) · 6.67 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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# Os specific settings.
if-shell -b '[ "$(uname -s)" = "Linux" ]' " \
set -g default-shell /usr/bin/zsh; \
set -g status-position top; \
"
if-shell -b '[ "$(uname -s)" = "Darwin" ]' " \
set -g default-shell /opt/homebrew/bin/zsh; \
set -g status-position bottom; \
"
set-window-option -g mode-keys emacs
set-option -g status-keys emacs
# Enable truecolors.
set -g default-terminal "xterm-256color"
set -g terminal-overrides ",xterm-256color:Tc"
# Edit tmux config and load it when done.
bind C-r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
bind C-h new-window 'htop'
bind C-p new-window 'ping 8.8.8.8'
bind C-d new-window 'dig google.com; sleep 4'
bind C-e new-window -n '~/.tmux.conf' 'emacsclient -a "" -c -t ~/.tmux.conf && tmux source ~/.tmux.conf && tmux display "~/.tmux.conf sourced"'
bind C-n command-prompt -p new-session 'new-session -A -s %%'
bind C-s set synchronize-panes
# Enable pane border.
#set-window-option -g pane-border-status top
# Auto auto windows ids.
set-option -g renumber-windows on
# Window titles.
set-option -g set-titles on
set-window-option -g automatic-rename off # Auto rename window/pane.
set-option -g allow-rename on
bind -n Home choose-tree
# Cycling windows.
bind -n S-right next
bind -n S-left prev
# Cycling sessions.
bind -n S-Up switch-client -p
bind -n S-Down switch-client -n
# Status bar.
set-option -g visual-activity on
set-window-option -g monitor-activity on
# Clock.
set-window-option -g clock-mode-style 12
bind-key = select-layout main-vertical
bind < resize-pane -L 25
bind > resize-pane -R 25
# Set status bar.
#set -g status-bg colour250
#set -g status-fg black
# Faster statusbar refresh.
set -g status-interval 15
# Messages should linger for more than 750ms.
set-option -g display-time 2500
setw -g aggressive-resize on
# Start window indexes at 1 instead of 0.
set -g base-index 1
# Mouse to scroll buffer.
set -g mouse on
# Default to current dir for now panes/windows.
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
set-option -g history-limit 50000
# Load powerline.
# run-shell "powerline-daemon -q"
# # Blue theme.
#
# # Status update interval
# set -g status-interval 1
#
# # Basic status bar colors
# set -g status-style fg=colour238,bg=colour233
#
# # Left side of status bar
# set -g status-left-style bg=colour233,fg=colour243
# #set -g status-left-length 100
# #set -g status-left "#[fg=colour232,bg=colour24,bold] #S #[fg=colour24,bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour233,nobold]"
#
# # Right side of status bar
# set -g status-right-style bg=colour233,fg=colour243
# #set -g status-right-length 150
# #set -g status-right "#[fg=colour235,bg=colour233]#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour24,bg=colour240]#[fg=colour232,bg=colour24,bold] #H "
#
# # Window status
# set -g window-status-format " #I:#W#F "
# set -g window-status-current-format "#[fg=colour233,bg=black]#[fg=colour33,nobold] #I:#P:#W#F #[fg=colour233,bg=black,nobold]"
#
# # Current window status
# set -g window-status-current-style bg=colour24,fg=colour233
#
# # Window with activity status
# set -g window-status-activity-style bg=colour233,fg=colour245
#
# # Window separator
# set -g window-status-separator ""
#
# # Window status alignment
# set -g status-justify centre
#
# # Pane border
# set -g pane-border-style bg=default,fg=colour238
#
# # Active pane border
# set -g pane-active-border-style bg=default,fg=colour24
#
# # Pane number indicator
# set -g display-panes-colour colour233
# set -g display-panes-active-colour colour245
#
# # Clock mode
# set -g clock-mode-colour colour24
# set -g clock-mode-style 24
#
# # Message
# set -g message-style bg=colour24,fg=black
#
# # Command message
# set -g message-command-style bg=colour233,fg=black
#
# # Mode
# set -g mode-style bg=colour24,fg=colour231
#
# ## ! Blue theme.
# ### theme settings ###
#
# # window separators
# set-option -wg window-status-separator ""
#
# # monitor window changes
# set-option -wg monitor-activity on
# set-option -wg monitor-bell on
#
# # set statusbar update interval
# set-option -g status-interval 1
#
# ### colorscheme ###
#
# # change window screen colors
# set-option -wg mode-style bg="#FE8019",fg="#3C3836"
#
# # default statusbar colors (terminal bg should be #282828)
# set-option -g status-style bg=terminal,fg="#A89984"
#
# # default window title colors
# set-option -wg window-status-style bg="#3C3836",fg="#7C6F64"
#
# # colors for windows with activity
# set-option -wg window-status-activity-style bg="#3C3836",fg="#A89984"
#
# # colors for windows with bells
# set-option -wg window-status-bell-style bg="#3C3836",fg="#FE8019"
#
# # active window title colors
# set-option -wg window-status-current-style bg="#FE8019",fg="#3C3836"
#
# # pane border
# set-option -g pane-active-border-style fg="#FE8019"
# set-option -g pane-border-style fg="#3C3836"
#
# # message info
# set-option -g message-style bg="#FE8019",fg="#3C3836"
#
# # writing commands inactive
# set-option -g message-command-style bg="#A89984",fg="#3C3836"
#
# # pane number display
# set-option -g display-panes-active-colour "#FE8019"
# set-option -g display-panes-colour "#3C3836"
#
# # clock
# set-option -wg clock-mode-colour "#FE8019"
#
# # copy mode highlighting
# %if #{>=:#{version},3.2}
# set-option -wg copy-mode-match-style "bg=#A89984,fg=#3C3836"
# set-option -wg copy-mode-current-match-style "bg=#FE8109,fg=#3C3836"
# %endif
#
# # statusbar formatting
# # "#fe8019" MUST be in lowercase here (conflicts with statusline alias otherwise)
# set-option -g status-left "#[bg=#A89984, fg=#3C3836]#{?client_prefix,#[bg=#fe8019],#[bg=#A89984]} #{session_name} "
# set-option -g status-right "#[bg=#3C3836, fg=#7C6F64] %Y-%m-%d %H:%M:%S #[bg=#A89984, fg=#3C3836]#{?client_prefix,#[bg=#fe8019],#[bg=#A89984]} #{host_short} "
#
# set-option -wg window-status-current-format "#{?window_zoomed_flag,#[fg=default bold],#[fg=default]} #{window_index} #{window_name} "
# set-option -wg window-status-format "#{?window_zoomed_flag,#[fg=default bold],#[fg=default]} #{window_index} #{window_name} "
#
# ## !Theme.
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'egel/tmux-gruvbox'
set -g @tmux-gruvbox 'dark' # or 'light'
# set -g @plugin "arcticicestudio/nord-tmux"
# set -g @plugin 'mattdavis90/base16-tmux'
# set -g @colors-base16 'monokai'
run '~/.tmux/plugins/tpm/tpm'
# Lookup the powerline path and load the tmux bindings.
run-shell "tmux source-file $(python3 -c 'import powerline; print(powerline.__path__[0])')/bindings/tmux/powerline.conf"