-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
200 lines (172 loc) · 6.54 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
# -- general -------------------------------------------------------------------
#set -g default-terminal "screen-256color" # colors!
set -s escape-time 0 # fastest command sequences
# remap all the things!
set -g status-utf8 on #Expect UTF8
setw -g utf8 on
set -g history-limit 100000
# aggressive resize
setw -g aggressive-resize on
#Tmux by default will "take over" text selection with a mouse, and trigger its own internal selection for use with its own cut and paste.
#If you want to use the OS selection, so that you can use the OS cut and paste, hold down shift while selecting.
#Then cut and paste will work normally.
# -- display / windows -------------------------------------------------------------------
#Window Colors
#hardstatus string '%{= kG}[ %{G}%H %{g}[%{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'
set -g status on
set -g status-right '#7H | %F %s'
set -g status-fg white
#set -g status-right "#[fg=green] | #[fg=red]#(tmux-mem-cpu-load)#[fg=green] | #[fg=cyan,bold]%H:%M #[default]"
set -g status-left ' #[fg=#bd4242,bold]#H#[default]'
set -g status-right '#[fg=yellow,bold]#(cut -d " " -f 1-4 /proc/loadavg)#[default] #[fg=cyan,bold]%Y-%m-%d %H:%M:%S#[default] '
#Automatically set window Title
set-option -g set-titles on
setw -g automatic-rename
set-option -g default-command "reattach-to-user-namespace -l bash"
#set-option -g set-titles-string '#H:#S.#I.#P #W #T' # window number,program name,active (or not)
# Show performance counters in statusbar
# Requires https://github.com/thewtex/tmux-mem-cpu-load/
set -g status-interval 1
set status-right '"#22T" %H:%M:%S %d-%b-%y'
set -g status-right '#[fg=yellow]#(uptime | egrep -o "[0-9]+ users?, +load.*"|perl -pe "s| averages?||"), %H:%M'
set-option -g status-right '#[fg=colour245]%R %d %b #[fg=colour254,bg=colour234,bold]#[fg=colour16,bg=colour254,bold] #h '
# alignment settings
set-option -g status-justify left
# highlight active window
set -g status-bg blue
setw -g window-status-current-bg red
setw -g window-status-current-attr bold
setw -g window-status-content-fg white
#set-option -g window-status-format "#[fg=white,bg=colour234] #I #W "
#set-option -g window-status-current-format "#[fg=red,bg=colour39]#[fg=colour16,bg=colour39,noreverse,bold] #I #W #[fg=colour39,bg=colour234,nobold]"
# start tmux with a login shell otherwise rvm will complain
set -g default-command "$SHELL --login"
# use your normal shell with tmux
set -g default-shell $SHELL
# window title manipulation
#set-option -g set-titles-string "..."
set -g status-left-length 30
#set -g status-left "#S:#I.#P | %e %b %Y , %I:%M %p | foo, bar, baz"
# Maximize and restore a pane
#unbind Up bind Up new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
unbind Down
bind Down last-window \; swap-pane -s tmp.1 \; kill-window -t tmp
# 24 hour clock
set-window-option -g clock-mode-style 24
set-window-option -g clock-mode-colour cyan
# activity
set -g monitor-activity on
set -g visual-activity off
# -- navigation ----------------------------------------------------------------
# remap prefix to ^a ... 'cause I've been using screen way too long and the B key is too far away
unbind-key C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# in case we find ourself in a nested scenario
bind-key a send-prefix
# quick "last active window" toggle, a la screen
bind-key C-a last-window
#
unbind-key &
bind-key K kill-window
# panes
unbind-key %
unbind-key '"'
bind-key | split-window -h
bind-key _ split-window -v
# redisplay (default key in tmux is 'r')
bind-key C-r refresh-client
#bind-key l refresh-client
bind-key r refresh-client
# choose window/session
bind-key "'" choose-window
bind-key '"' choose-session
# function keys
bind-key -n F2 choose-session
bind-key -n F3 split-window -v
bind-key -n F4 kill-pane
bind-key -n F5 split-window -h
bind-key -n F6 select-pane -t :.+
bind-key -n F7 detach
bind-key -n F8 kill-window
bind-key -n F9 command-prompt "rename-window %%"
bind-key -n F10 previous-window
bind-key -n F11 next-window
bind-key -n F12 new-window
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# h = display cheatsheet
bind h run "cat ~/.tmux_cheatsheet"
# Set ability to capture on start and restore on exit window data when running an application
setw -g alternate-screen on
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access.
set -s escape-time 50
#Mouse turned on give ability to click on pane
set -g mode-mouse on
setw -g mode-keys vi
set-window-option -g mode-keys vi
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
#display 'Mouse: ON'
#Copy mode
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
set -g status-bg blue
#setw -g window-status-current-bg red
setw -g window-status-current-attr bold
setw -g window-status-content-fg white
#Border
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg blue
set -g pane-active-border-bg yellow
set -g status on
set -g status-right '#7H | %F %s'
set -g status-fg white
# Show performance counters in statusbar
# # Requires https://github.com/thewtex/tmux-mem-cpu-load/
set -g status-interval 4
set -g status-right "#[fg=green] | #[fg=white]#(tmux-mem-cpu-load)#[fg=green] | #[fg=cyan]%H:%M #[default]"
new-session -s stuff
resize-pane -Z
new-window -n asm-dns01 "ssh asm-dns01.meyer.local"
resize-pane -Z
new-window -n asm-sql01 "ssh asm-sql01.meyer.local"
resize-pane -Z
new-window -n asm-haplb01 "ssh asm-haplb01.meyer.local"
resize-pane -Z
new-window -n asm-web01 "ssh asm-web01.meyer.local"
resize-pane -Z
new-window -n asm-freebsd01 "ssh asm-freebsd01.meyer.local"
resize-pane -Z
new-window -n asm-rancid01 "ssh asm-rancid01.meyer.local"
resize-pane -Z
new-window -n asm-monitoring01 "ssh 10.150.10.101"
resize-pane -Z
new-window -n asm-monitoring02 "ssh 10.150.10.67"
resize-pane -Z
new-window -n asm-monitoring03 "ssh 10.150.10.68"
resize-pane -Z
new-window -n asm-redis01 "ssh asm-redis01.meyer.local"
resize-pane -Z
new-window -n asm-redis02 "ssh asm-redis02.meyer.local"
resize-pane -Z
new-window -n asm-automation01 "ssh asm-automation01.meyer.local"
resize-pane -Z
new-window -n asm-console "ssh asm-console01.meyer.local"
resize-pane -Z
new-window -n asm-raspi3 "ssh [email protected]"
resize-pane -Z
new-window -n asm-raspi2 "ssh 10.150.1.190"
resize-pane -Z
new-window -n asm-tv-pc02 "ssh [email protected]"
resize-pane -Z
new-window -n pss-console01 "ssh [email protected]"
resize-pane -Z