-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
173 lines (122 loc) · 4.29 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
# Global Configuration {{{
# reset the default prefix
set -g prefix C-a # set the prefix to a
bind a send-prefix # pass through to nested tmux sessions
# keep a large history
set -g history-limit 20000
# really nice combination with shell C-l
bind -n C-k clear-history
# monitor acitivity in windows
setw -g monitor-activity on
# use vim motion keys while in copy mode
setw -g mode-keys vi
# set base window and pane indices to 1
set -g base-index 1
setw -g pane-base-index 1
# my terminal has all these colors!
set -g default-terminal "tmux-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
# renumber windows when one is closed
set -g renumber-windows on
# preserve setting of window names
set -g allow-rename off
# shorten command delay
set -sg escape-time 0
# make window resizing better between multiple clients
setw -g aggressive-resize on
# }}}
# Misc Bindings {{{
# reload tmux configuration with r
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf."
# new split (horizontal / vertical)
bind - split-window -v # split pane horizontally
bind '\' split-window -h # split pane vertically
# new split in current pane (horizontal / vertical)
bind _ split-window -v -c '#{pane_current_path}' # split pane horizontally
bind | split-window -h -c '#{pane_current_path}' # split pane vertically
bind Space list-panes # list panes
bind Enter break-pane # break-pane
# }}}
# Session Bindings {{{
# cap S to rename sessions
bind S command-prompt -I "#S" "rename-session '%%'"
# }}}
# Window Bindings {{{
# Rebind c to use the current path in a new window
bind c neww
# Bind C to use the current path in a new window
bind C neww -c '#{pane_current_path}'
# C-a C-a for last active window
bind C-a last-window
# cap A to rename the active window
bind A command-prompt "rename-window %%"
# cap K to kill active window, but ask first
bind K confirm-before -p "kill-window #W? (y/n)" kill-window
# }}}
# Pane Bindings {{{
# use vim-like keybindings to navigate panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# cap P to kill active pane, but ask first
bind P confirm-before -p "kill-pane #P? (y/n)" kill-pane
# }}}
# Resizing Bindings {{{
# use vim-like keybindings to resize panes
bind -r C-h resize-pane -L
bind -r C-j resize-pane -D
bind -r C-k resize-pane -U
bind -r C-l resize-pane -R
# }}}
# Unbindings {{{
unbind C-b # unbind default prefix key
unbind '"' # unbind default horizontal split
unbind % # unbind default vertical split
unbind '$' # unbind default rename-session
unbind & # unbind default kill-window
unbind x # unbind default kill-pane
unbind M-1 # unbind default select-layout even-horizontal
unbind M-2 # unbind default select-layout even-vertical
unbind M-3 # unbind default select-layout main-horizontal
unbind M-4 # unbind default select-layout main-vertical
unbind M-5 # unbind default select-layout tiled
# }}}
# Layouts {{{
# Reorder panes with a particular layout
bind M-= select-layout "tiled"
bind M-- select-layout "even-vertical"
bind M-'\' select-layout "even-horizontal"
bind M-r rotate-window
# }}}
# Status Colors {{{
set -g status-style "fg=colour230,bg=colour235,dim"
# }}}
# Window Colors {{{
setw -g window-status-style "fg=colour230,bg=colour235,dim"
setw -g window-status-current-style "fg=colour235,bg=colour230"
# change color if a window has activity in it
setw -g window-status-activity-style "fg=colour235,bg=colour214"
# }}}
# Pane Colors {{{
set -g pane-border-style "fg=colour230"
set -g pane-active-border-style "fg=colour214,bg=default"
# }}}
# Misc Status {{{
# turn the status bar on
set -g status on
# window status format
setw -g window-status-format "#[fg=colour214]#[bg=colour234] #I #[bg=colour235]#[fg=colour230] #W "
setw -g window-status-current-format "#[fg=colour214]#[bg=colour234] #I #[bg=colour230]#[fg=colour235,bold] #W "
# update the status bar more frequently
set -g status-interval 1
# }}}
# Left Status {{{
set -g status-left-length 60
set -g status-left "λ #[fg=colour214][#[fg=colour230]#S#[fg=colour214]]"
# }}}
# Right Status {{{
set -g status-right-length 80
set -g status-right '#(whoami)@#(hostname --fqdn) #[fg=colour214]|#[fg=colour230] #(cut -d " " -f 1-3 /proc/loadavg) #[fg=colour214]|#[fg=colour230] #(date +"%a %Y-%m-%d %T %Z")'
# }}}
# vim:foldmethod=marker:foldlevel=0