-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
153 lines (118 loc) · 3.72 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
# use 256 term for pretty colors
set -g default-terminal "xterm-256color"
set -g status-bg black
set -g status-fg green
set-window-option -g clock-mode-colour brightyellow
# increase scroll-back history
set -g history-limit 1000000
# use vim key bindings
#setw -g mode-keys vi
# enable mouse
set -g mouse on
# Enable mouse control (clickable windows, panes, resizable panes)
#set -g mouse-select-window on
#set -g mouse-select-pane on
#set -g mouse-resize-pane on
# decrease command delay (increases vim responsiveness)
set -sg escape-time 0
# increase repeat time for repeatable commands
set -g repeat-time 1000
# start window index at 1
set -g base-index 1
# start pane index at 1
setw -g pane-base-index 1
# highlight window when it has new activity
setw -g monitor-activity on
set -g visual-activity on
# re-number windows when one is closed
set -g renumber-windows on
# enable vi nav and v / V when in copy mode (space == yank)
set -g mode-keys vi
# enable pbcopy and pbpaste
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/blob/master/README.md
#set-option -g default-command "reattach-to-user-namespace -l zsh"
###########################
# Key Bindings
###########################
# tmux prefix
unbind C-b
set -g prefix C-a
bind-key C-a send-prefix
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
# bind y run-shell "reattach-to-user-namespace -l zsh -c 'tmux show-buffer | pbcopy'"
# copy
bind [ copy-mode
bind ] paste-buffer
# buffer
bind space choose-buffer
# window splitting
unbind %
bind | split-window -h -c "#{pane_current_path}"
unbind '"'
bind - split-window -v -c "#{pane_current_path}"
# resize panes
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
# create 25% lower split
unbind t
bind t split-window -v -c "#{pane_current_path}"
# quickly switch panes
unbind ^F
bind ^F select-pane -t :.
# navigate panes
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# zoom into one pane
unbind
bind \
new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\
swap-pane -s tmux-zoom.0 \;\
select-window -t tmux-zoom
unbind -
bind - \
last-window \;\
swap-pane -s tmux-zoom.0 \;\
kill-window -t tmux-zoom
# switch panes using Alt-arrow without prefix
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
# don't rename windows automatically
set-option -g allow-rename off
bind r source-file ~/.tmux.conf
######################
### DESIGN CHANGES ###
######################
# loud or quiet?
set -g visual-activity on
set -g visual-bell off
set -g visual-silence off
setw -g monitor-activity off
set -g bell-action none
# modes
setw -g clock-mode-colour colour5
setw -g mode-style 'fg=colour1 bg=colour18 bold'
# panes
set -g pane-border-style 'fg=colour19 bg=colour0'
set -g pane-active-border-style 'bg=colour0 fg=colour9'
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=colour18 fg=colour137 dim'
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour19] %d/%m #[fg=colour233,bg=colour8] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-style 'fg=colour1 bg=colour19 bold'
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-style 'fg=colour9 bg=colour18'
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
# messages
set -g message-style 'fg=colour232 bg=colour16 bold'