-
Notifications
You must be signed in to change notification settings - Fork 4
/
tmux.conf
162 lines (138 loc) · 4.69 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
# | |_ _ __ ___ _ ___ __ #
# | __| '_ ` _ \| | | \ \/ / #
# | |_| | | | | | |_| |> < #
# \__|_| |_| |_|\__,_/_/\_\ #
# 1 0 | VIM | 2:bash 20:04
# [ Reset Prefix ] {{{1
set -g prefix C-a
bind a send-prefix # for nested tmux sessions
# }}}
# [ Global Options ] {{{1
set-option -g history-limit 15000 # Longer history
set -s escape-time 1
set -g base-index 1 # Windows start at 1
set -g pane-base-index 1 # Panes start at 1
set-window-option -g xterm-keys on # for VIM!
set-window-option -g mode-keys vi # vi key
set-window-option -g monitor-activity on
setw -g automatic-rename # Automatically set window title
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# [ Mouse ] {{{2
# use mouse # More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
set-option -g mouse on
# }}}
# [ Colors ] {{{2
setw -g mode-style bg=black
set-option -g default-terminal "screen-256color" #"xterm-256color" # "screen-256color"
# Panes Currently All White
#set-option -g pane-active-border-fg red
set -g pane-active-border-style fg=red
set -g pane-border-style fg=white
set-window-option -g clock-mode-colour colour250 # Clock Color
set-window-option -g clock-mode-style 24
# }}}
# }}}
# [ Status Bar ] {{{
set-option -g status-interval 5
set-option -g visual-activity on
# Default Window Title Colors
set-option -g status-bg colour233
set-option -g status-fg colour240
# Active Window Title Colors
set-window-option -g window-status-current-fg colour220
set-window-option -g window-status-current-bg colour233
set-window-option -g window-status-current-fg white
setw -g window-status-current-attr default
# New Activity Title Colors
set-option -gw window-status-activity-bg colour233
set-option -gw window-status-activity-fg red
# Left Status
set-option -g status-left-length 30
set-option -g status-left-bg colour233
set-option -g status-left-fg colour220
#set-option -g status-left '#S #[fg=colour220]#I #[fg=colour220]#P'
#set-option -g status-left '#[bg=colour178] #[default] '
#set-option -g status-left ''
set-option -g status-left '#[fg=colour220]#I #[fg=colour220]#P'
# Window Status
set-option -g status-justify centre
setw -g window-status-current-format "#[fg=colour220]|#[default] #W #[fg=colour220]|#[default]"
# Right Status
set-option -g status-right '#[fg=colour250]%R #[default]'
# Titles (window number, program name, active (or not)
set-option -g set-titles on
set-option -g set-titles-string '#H:#S.#I.#P #W #T'
# message text
set-option -g message-bg colour233
set-option -g message-fg colour220
# }}}
# [ Unbindings ] {{{1
#unbind [ # copy mode bound to escape key
unbind j
unbind C-b # unbind default leader key
unbind '"' # unbind horizontal split
unbind % # unbind vertical split
# }}}
# [ Bindings ] {{{1
# reload tmux conf
bind R source-file ~/.tmux.conf \; display-message "Config reloaded..."
#bind Escape copy-mode
bind - split-window -v # split pane horizontally
bind \ split-window -h # split pane vertically
# list panes
bind Space list-panes
# join-pane [-dhv] [-l size | -p percentage] [-s src-pane]
# [-t:dst-window.dst-pane] (destination window (dot) destination pane
# (alias: joinp)
#
#bind j command-prompt "joinp -t:0"
#bind Space command-prompt "joinp -t:%%" # %% = prompt for window.pane [-V|H] # vert|hor split
# }}}
# [ Windows ] {{{1
bind C-j previous-window
bind C-k next-window
bind C-a last-window # C-a C-a for last active window
bind w command-prompt "rename-window %%"
bind S command-prompt "rename-session %%"
# By default, all windows in a session are constrained to the size of the
# smallest client connected to that session,
# even if both clients are looking at different windows.
# It seems that in this particular case, Screen has the better default
# where a window is only constrained in size if a smaller client
# is actively looking at it.
setw -g aggressive-resize on
# }}}
# [ Panes ] {{{1
# [ Navigation ] {{{2
# use the vim motion keys to move between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
## pane movement
bind j command-prompt -p "join pane from:" "join-pane -s '%%'"
bind b command-prompt -p "send pane to:" "join-pane -t '%%'"
# }}}
# [ Resizing ] {{{2
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
bind -r Y resize-pane -L 1
bind -r U resize-pane -D 1
bind -r I resize-pane -U 1
bind -r O resize-pane -R 1
# }}}
# [ Layouts ] {{{2
bind o select-layout "active-only"
bind M-- select-layout "even-vertical"
bind M-\ select-layout "even-horizontal"
bind M-r rotate-window
# }}}
# }}}
# [ Extras ] {{{1
# vi movement keys
# set-option -g status-keys vi
set-option -g default-shell /bin/zsh
# }}}
# vim: set foldmethod=marker: