-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
100 lines (77 loc) · 2.78 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
# Set the prefix to ^A.
unbind C-b
set -g prefix C-Space
bind Space send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# colors
set -g default-terminal "screen-256color"
# listen to alerts from all windows
set -g bell-action any
# focus events enabled for terminals that support them
set -g focus-events on
# rebind pane tiling
bind V split-window -h
bind H split-window
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# screen like window toggling
bind Tab last-window
bind Escape copy-mode
# vim movement bindings
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Smart pane switching with awareness of vim splits
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# vim select and copy
set-option -g default-command "reattach-to-user-namespace -l zsh"
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# copy mode
bind Space copy-mode
bind C-Space copy-mode
## Status Bar
# window format
set -g status-justify centre
setw -g window-status-current-format "|#I:#W|"
set-window-option -g automatic-rename off
# IP on the left
set -g status-left-length 35
set -g status-left "#[fg=green]: #h : #[fg=yellow]:#(ifconfig en0 | grep 'inet ' | awk '{print \"en0 \" $2}')"
# session, w&p nr, date on the right
set -g status-right-length 60
set -g status-right "#[fg=blue]#S #I:#P #[fg=yellow]: %d %b %Y #[fg=green]: %H:%M : #(date -u | awk '{print $4}') :"
## Colors
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour130 #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour33 #base0
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-fg colour196 #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour46 #base01
# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour196 #orange
# pane number display
set-option -g display-panes-active-colour colour20 #blue
set-option -g display-panes-colour colour196 #orange
# clock
set-window-option -g clock-mode-colour colour40 #green