forked from heretekk/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf.osx
143 lines (128 loc) · 4.25 KB
/
.tmux.conf.osx
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
# --------------
# 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 Enter send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
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 -g terminal-overrides 'xterm*:smcup@:rmcup@'
set-option -g renumber-windows on;
set-option -g history-limit 10000000
set-option -g terminal-overrides "xterm-color:khome=\033[1~"
set-option -g default-terminal "screen-256color"
# --------------
# 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 120
set -g status-right-style bg=colour235
set -g status-right \
"#{?client_prefix,#[reverse],}"\
"#[fg=red]["\
"#[fg=red]#(${HOME}/dotfiles/bin/echo-kubens)"\
"#[fg=red] | "\
"#[fg=red]#(${HOME}/dotfiles/bin/echo-kubectx)"\
"#[fg=red]]"\
"#[fg=white] [#(${HOME}/dotfiles/bin/git-echo-username-and-email)] "\
"#[fg=green][#(${HOME}/dotfiles/bin/sh-echo-current-wifi-network)]#[default] "\
"#[fg=cyan][%Y/%m/%d (%a) %H:%M]#[default]"
# "#[fg=yellow]#(${HOME}/dotfiles/bin/git-echo-branch-tmux-current-pane)"\
# set -g status-right '#[fg=white][%Y/%m/%d(%a)%H:%M]#[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
# --------------
# pane-active-border
# set -g pane-active-border-fg white
# set -g pane-active-border-bg black
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-window-option -g mode-mouse on
# mode-mouse
#bind m \
# set -g mode-mouse on \; \
# display "Mouse: ON"
#bind M \
# set -g mode-mouse off \; \
# display "Mouse: OFF"
# --------------
# 256色ターミナル
# --------------
# set -g default-terminal screen
# --------------
# UTF8 Support
# --------------
# setw -g utf8 on
# --------------
# TPM
# --------------
## # List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
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'