-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf.ubuntu_vagrant
130 lines (113 loc) · 3.98 KB
/
.tmux.conf.ubuntu_vagrant
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
# --------------
# bind
# --------------
# prefix
unbind C-b
set -g prefix C-s
# reloading command
unbind r
bind C-r source-file ~/.tmux.conf \; display-message "reloaded"
# resize pane
bind -r H resize-pane -L 10
bind -r J resize-pane -D 10
bind -r K resize-pane -U 10
bind -r L resize-pane -R 10
# monitor
bind C-s run "tmux last-pane || tmux last-window || tmux new-window"
#set-window-option -g monitor-activity on
setw -g mode-keys vi
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel -bi"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -bi"
bind 'C' new-window -c "#{pane_current_path}";
bind '%' split-window -h -c "#{pane_current_path}";
bind '"' split-window -v -c "#{pane_current_path}";
# move pane
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# unzen pane
bind-key a run "tmux last-pane && tmux resize-pane -Z"
# ---------
# general
# ---------
# set -sg escape-time 0
set -g status-interval 30
set -g base-index 1
set -g pane-base-index 1
set-option -g renumber-windows on;
set-option -g history-limit 10000000
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# set-option -g terminal-overrides "xterm-color:khome=\033[1~"
# set-option -g default-terminal "screen-256color"
set-option -g default-terminal screen-256color
set-option -ga terminal-overrides ',xterm-256color:Tc'
# --------------
# status
# --------------
set -g status-position top
set -g status-style fg=white,bg=colour235
set -g status-left '[#[fg=cyan,bold]#(whoami)#[default]] '
set -g status-left-length 30
set -g status-right-length 220
set -g status-right-style bg=colour235
set -g status-right \
"#{?client_prefix,#[reverse],}"\
"#[fg=green][#(${HOME}/dotfiles/bin/echo-kubens) | #(${HOME}/dotfiles/bin/echo-kubectx)] "\
"#[fg=white][%Y/%m/%d (%a) %H:%M]"\
"#[default]"
#"#[fg=white] [#(${HOME}/dotfiles/bin/git-echo-username-and-email)] "\
#"#[fg=green][#(${HOME}/dotfiles/bin/sh-echo-current-wifi-network)]#[default] "\
# --------------
# pane-status
# --------------
set-option -g pane-border-status bottom
set-option -g pane-border-format "#[bg=black] #[fg=black,bg=white] #P #[bg=black] #(~/dotfiles/bin/tmux-pane-border '#{pane_current_path}')#[bg=black] #[default]"
# --------------
# window
# --------------
set -g automatic-rename on
set -g window-status-format '#I:#{?#{m:#W,zsh},#(basename #{pane_current_path}),#W}#F'
set -g window-status-current-format '#I:#{?#{m:#W,zsh},#(basename #{pane_current_path}),#W}#F'
set -g window-status-current-style fg=black,bg=white
# set-window-option -g allow-rename off
# set-window-option -g window-status-format " #I: #(basename $PWD) "
# set-window-option -g window-status-current-format "#[fg=colour255,bg=colour27,bold] #I: #(${HOME}/dotfiles/bin/sh-echo-current-dir) #[default]"
# set -g visual-activity on
# setw -g monitor-activity on
# set -g visual-silence on
# setw -g monitor-silence 30
# --------------
# pane
# --------------
set -g pane-active-border-style fg=blue,fg=black,bg=cyan
set -g pane-border-style fg=colour023,fg=white,bg=black
# --------------
# mouse
# --------------
set -g mouse on
bind-key -T edit-mode-vi WheelUpPane send-keys -X scroll-up
bind-key -T edit-mode-vi WheelDownPane send-keys -X scroll-down
# --------------
# UTF8 Support
# --------------
# setw -g utf8 on
# --------------
# TPM
# --------------
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @resurrect-save 'S'
set -g @resurrect-restore 'U'
# set -g @plugin 'tmux-plugins/tmux-continuum'
# set -g @continuum-restore 'on'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'