-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf.symlink
199 lines (165 loc) · 6.2 KB
/
tmux.conf.symlink
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
######################¬
### GENERAL CHANGES ##¬
######################¬
set -s escape-time 0
# Start at #1, 0 is so far away from the other numbers
set -g base-index 1
setw -g pane-base-index 1
######################¬
### KEY CHANGES ###¬
######################¬
# zoom this pane to full screen
bind ] \
new-window -d -n tmux-zoom \;\
swap-pane -s tmux-zoom.0 \;\
select-window -t tmux-zoom
# restore this pane
bind [ \
last-window \;\
swap-pane -s tmux-zoom.0 \;\
kill-window -t tmux-zoom
# rename windows
set-window-option -g automatic-rename on
set-window-option -g mode-keys vi
set-option -g allow-rename on
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf\; display-message "tmux config reloaded";
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
set-option -g history-limit 1000000
# switch panes using Alt-arrow without prefix
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
bind a send-prefix
# Set generic keybindings
#bind-key : command-nd-key space next-window
bind-key bspace previous-window
#bind-key enter next-layoutprompt
# Set vi selection modes
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
# use vim-like keys for splits, windows and resize
bind-key v split-window -h
bind-key s split-window -v
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key -r H resize-pane -L 2
bind-key -r J resize-pane -D 2
bind-key -r K resize-pane -U 2
bind-key -r L resize-pane -R 2
# Enable focus-events for neovim integration
set-option -g focus-events on
# Enable rich colors
set-option -g default-terminal "screen-256color"
set-option -sa terminal-overrides ',xterm-256color:RGB'
# smart pane switching with awareness of vim splits
#bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-h) || tmux select-pane -L"
#bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-j) || tmux select-pane -D"
#bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-k) || tmux select-pane -U"
#bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-l) || tmux select-pane -R"
#bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys 'C-\\') || tmux select-pane -l"
#bind C-l send-keys 'C-l'
bind u copy-mode -u
######################
### MOUSE CHANGES ###
######################
# disable mouse control by default - change 'off' to 'on' to enable by default.
setw -g mouse off
#set-option -g mouse-resize-pane off
#set-option -g mouse-select-pane off
#set-option -g mouse-select-window off
# toggle mouse mode to allow mouse copy/paste
# set mouse on with prefix m
bind m \
set -g mouse on \;\
display "Mouse: ON";
# set mouse off with prefix M
bind M \
set -g mouse off \;\
display "Mouse: OFF";
######################
### DESIGN CHANGES ###
######################
# panes
set -g pane-border-style 'fg=black'
set -g pane-active-border-style 'fg=brightred'
## Status bar design
# status line
#set -g status-utf8 on
set -g status-justify left
set -g status-interval 2
# messaging
set -g message-style 'fg=black,bg=yellow'
set -g message-command-style 'fg=blue,bg=black'
#window mode
setw -g mode-style 'bg=colour6,fg=colour0'
# window status
setw -g window-status-format " #F#I:#W#F "
setw -g window-status-current-format " #F#I:#W#F "
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
# i colour-fil setw -g window-status-current-bg colour0
# i colour-fil setw -g window-status-current-fg colour11
# i colour-fil setw -g window-status-current-attr dim
# i colour-fil setw -g window-status-bg green
# i colour-fil setw -g window-status-fg black
# i colour-fil setw -g window-status-attr reverse
# Info on left (I don't have a session display for now)
set -g status-left ''
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
set -g default-terminal "xterm-256color"
# set -g default-terminal "screen"
# solarized color scheme
source-file ~/.dotfiles/tmux/tmuxcolors-256.conf
# The modes {
setw -g clock-mode-colour colour135
#setw -g mode-attr bold
#setw -g mode-fg colour196
#setw -g mode-bg colour238
# }
# The panes {
# i colour-fil set -g pane-border-bg colour235
# i colour-fil set -g pane-border-fg colour238
# i colour-fil set -g pane-active-border-bg colour236
# i colour-fil set -g pane-active-border-fg colour51
# }
# The statusbar {
set -g status-position bottom
# i colour-fil set -g status-bg colour234
# i colour-fil set -g status-fg colour137
# i colour-fil set -g status-attr dim
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
# i colour-fil setw -g window-status-current-fg colour81
# i colour-fil setw -g window-status-current-bg colour238
setw -g window-status-current-style bold
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
# i colour-fil setw -g window-status-fg colour138
# i colour-fil setw -g window-status-bg colour235
setw -g window-status-style none
setw -g window-status-format '#I#[fg=colour237]:#[fg=colour250]#{pane_current_path}:#W#[fg=colour244]'
#setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#{pane_current_path}.#W#[fg=colour244]#F '
#setw -g window-status-format "#{pane_current_path}".
set -g window-status-bell-style 'bg=colour0,fg=colour250'
set -g message-style bold
# i colour-fil set -g message-fg colour232
# i colour-fil set -g message-bg colour166