-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
220 lines (175 loc) · 6.12 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
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
#
#------------------------------------------------------------------------------
# DEFAULT CONFIGURATION
#------------------------------------------------------------------------------
# default colors configuration (needed for vim)
# set-environment -g CHERE_INVOKING 1
# set -g default-terminal "screen-256color"
set -g default-terminal "xterm-256color"
# set -g default-terminal "screen-256color"
set -s escape-time 0
set -g display-panes-time 5000
# unicode
# set-window-option -g utf8 on
# Set screensaver on timeout
set -g lock-after-time 3000
set -g lock-command /usr/bin/cmatrix
# not sure what this setting is for
#set-option -g status-keys vi
# start window index on 1 instead of 0
set -g base-index 1
# # start panes at 1 instead of 0
setw -g pane-base-index 1
# display messages for a second
set -g display-time 1000
# prevent tmux to rename windows
set -g set-titles on
setw -g automatic-rename on
# Set window notifications
#set-window-option -g monitor-activity on
#set -g visual-activity on
set -g history-limit 10000000
#------------------------------------------------------------------------------
# SHORTCUT
#------------------------------------------------------------------------------
# Use vim keybindings in copy mode
setw -g mode-keys vi
unbind [
bind [ copy-mode
unbind ]
bind ] paste-buffer
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'y' copy-selection
# bind -t vi-copy 'V' rectangle-toggle
# bind -t vi-copy Escape cancel
# Sync panes - send what you're typing to other panes.
# bind C-s set-window-option synchronize-panes
# move tmux copy buffer into x clipboard
# bind-key C-y run "tmux save-buffer - | xclip -i -selection clipboard"
#
# Repeat the command multiple times
bind -r p select-window -t :-
bind -r n select-window -t :+
#bind-key -n S-F1 select-pane -t :.+ # next pane
#bind-key -n S-F2 select-window -t :- # previous window
#bind-key -n S-F3 select-window -t :+ # next window
# changing default prefix to CTRL+x
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# changine default window split
# unbind %
#bind '"' split-window -h -c "#{pane_current_path}"
#bind % split-window -v -c "#{pane_current_path}"
# better defaults
#bind | split-window -h -c "#{pane_current_path}"
#bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
# reload .tmux.conf
bind-key r source-file ~/.tmux.conf \; display-message "Configuration reloaded master"
# ctrl+left/right cycles thru windows
bind-key -n C-right next
bind-key -n C-left prev
# select panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# alt+directions navigates through panes
bind-key -n M-left select-pane -L
bind-key -n M-right select-pane -R
bind-key -n M-up select-pane -U
bind-key -n M-down select-pane -D
# Moye between panes on mac os
# with shift/left,right
bind -n S-Right next-window
bind -n S-Left previous-window
# quit tmux
bind \ kill-server
bind-key P display-panes
#------------------------------------------------------------------------------
# COLOURS
#------------------------------------------------------------------------------
# color0 == black
# color15 == white
# color124 == red
# color240 == gray
# color250 == lightgray
# Show all colors in tmux :for i in {0..255} ; do printf "\x1b[38;5;${i}mcolour${i}\n"; done
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# PANE
#------------------------------------------------------------------------------
# not active pane separator
set -g pane-border-fg colour244
set -g pane-border-bg default
# active pane separator
set -g pane-active-border-fg colour124
set -g pane-active-border-bg default
#------------------------------------------------------------------------------
# STATUSBAR
#------------------------------------------------------------------------------
# UTF-8 character support in the status bar
# set-option -g status-utf8 on
# refresh the status bar every 1 second.
set-option -g status-interval 1000
# statusbar colors
set-option -g status-fg white
set-option -g status-bg black
set-option -g status-attr default
# window title colors; non active
set-window-option -g window-status-fg cyan
set-window-option -g window-status-bg default
set-window-option -g window-status-attr dim
# window title colors; active
set-window-option -g window-status-current-fg white#font
set-window-option -g window-status-current-bg red#boarder
set-window-option -g window-status-current-attr bright
# command/message line colors NEW
set-option -g message-fg white
set-option -g message-bg black
set-option -g message-attr bright
# LEFT SIDE
# in the status bar.
set -g status-justify centre
set -g status-left-length 40
set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
# RIGHT SIDE
# use "man date" to set the clock to your liking
set -g status-right "#[fg=blue]#(~/battery Discharging) | #[fg=cyan]%a %D %l:%M:%p"
# status bar options
set-option -g status-justify centre # alignment of windows
set-window-option -g window-status-format ' #W ' # Inactive windows in status bar
#------------------------------------------------------------------------------
# BINDINGS
#------------------------------------------------------------------------------
#bind-key K new-window -n work -c $HOME \; \
#send-keys 'clear && figlet BoogY' 'Enter' \; \
#split-window -v -p 30 -t 1 \; \
#send-keys 'ranger ~/scripts' 'Enter' \; \
#split-window -h -p 25 -t 1 \; \
#send-keys 'tty-clock' 'Enter' \; \
#split-window -v -p 50 -t 3 \; \
#send-keys 'cmatrix' 'Enter' \; \
#select-pane -t 1
## synchronize panes on
bind s \
set -g synchronize-panes on \;\
display 'Synchronized panes ON'
## synchronize panes off
bind S \
set -g synchronize-panes off \;\
display 'Synchronized panes OFF'
## Toggle mouse on with ^B m
bind m \
set -g mouse on \;\
display 'Mouse: ON'
## Toggle mouse off with ^B M
bind M \
set -g mouse off \;\
display 'Mouse: OFF'
## Switch between panes and zoom
bind O \
select-pane -t :.+ \;\
resize-pane -Z
# EOF