-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_tmux.conf
104 lines (86 loc) · 3.71 KB
/
dot_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
# color
# set -g default-terminal "screen-256color"
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",*256color:Tc"
# options
set -g set-titles on
set -g status-interval 15
set -s escape-time 0
set -s set-clipboard on
# # COLOUR (Solarized dark)
#
## default statusbar colors
set-option -g status-style fg=cyan,bg=black
#
## default window title colors
set-window-option -g window-status-style fg=brightblue,bg=default #base0 and default
## active window title colors
set-window-option -g window-status-current-style fg=brightred,bg=default
## pane border
set-option -g pane-border-style fg=cyan,bg=black
set-option -g pane-active-border-style fg=black,bg=cyan
## message text
set-option -g message-style fg=magenta,bg=cyan
## pane number display
set-option -g display-panes-active-colour cyan
set-option -g display-panes-colour blue
## clock
set-window-option -g clock-mode-colour green
## bell
set-window-option -g window-status-bell-style fg=black,bg=red
# plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @split-statusbar-mode 'on'
set -g @split-statusbar-bindkey '-n F11'
set -g @split-status-hide-bindkey '-n F12'
run -b '~/.tmux/plugins/tpm/tpm'
# statusline
## pane
set -g pane-border-status bottom
set -g pane-border-format '#[reverse] #[default]'
set -ag pane-border-format '#[reverse,bg=yellow] #(direnv exec #{pane_current_path} gcloud config configurations list --format="value(name)" --filter="IS_ACTIVE=true") #[default]'
set -ag pane-border-format '|'
set -ag pane-border-format '#[reverse] #T '
set -ag pane-border-format '#[reverse] #(gitmux -cfg $HOME/.gitmux.conf #{pane_current_path})#[default]'
set -ag pane-border-format '#[reverse] #[default]'
set -ag pane-border-format '#[align=right] #I.#{pane_current_command}:#{b:pane_current_path} '
## statusline
set-option -g status 2
set -g status-left '[#{session_name}] '
set -g status-right ''
## window-status
set -g window-status-format '#[fg=yellow]#I.#{pane_current_command}:#[fg=blue,bright]#{b:pane_current_path}#F'
set -g window-status-current-format '#I.#{pane_current_command}:#{b:pane_current_path}#F'
## left
set -g status-format[1] '#[align=left]'
set -ag status-format[1] '#[fg=blue]⎈ #(kubectl config current-context) [#(kubectl config view --minify --output "jsonpath={..namespace}")]'
## right
set -ag status-format[1] '#[align=right]'
set -ag status-format[1] '#{prefix_highlight} '
set -ag status-format[1] '#[fg=white]#[fg=white]%Y/%m/%d %H:%M'
# keymap
## prefix
set -g prefix C-t
unbind C-b
bind r source-file ~/.tmux.conf \; display-message "Reload Config!!"
bind C-r source-file ~/.tmux.conf \; display-message "Reload Config!!"
bind ^k confirm-before -p "kill-window #W? (y/n)" kill-window
bind k confirm-before -p "kill-pane #W? (y/n)" kill-pane
bind C-\\ confirm-before -p "kill-session #W? (y/n)" kill-session
bind "'" choose-window
bind '"' choose-window
bind s split-window -v -c '#{pane_current_path}'
bind v split-window -h -c '#{pane_current_path}'
bind Space next-window
bind BSpace previous-window
bind C-p paste-buffer
##
bind c new-session -A -s local \; switch-client -T local \; set-option display-time 10000 \; display-message "[x] "
bind -T local Enter new-window
bind -T local Space new-window -c '#{pane_current_path}'
bind -T local x new-window -c '$HOME/repos'
## ssh
bind C-T new-session -A -s ssh \; switch-client -T ssh
bind -T ssh l new-window 'ssh localhost' \; set-option pane-active-border-style bg=magenta \; set-option pane-border-style bg=magenta \; set pane-border-format ' #I. ssh:localhost ' \; set window-status-format '#I. #[fg=yellow]ssh:#[fg=blue,bright]localhost' \; set window-status-current-format '#I. ssh:localhost'