-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
45 lines (37 loc) · 1.47 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
#### bindings
# 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"
# prefix
unbind-key C-b
set -g prefix 'C-\'
bind-key 'C-\' send-prefix
# resizing
bind h resize-pane -L 10
bind j resize-pane -D 10
bind k resize-pane -U 10
bind l resize-pane -R 10
# handling tmux
bind | split-window -h
bind - split-window -v
bind X confirm-before kill-session
set-window-option -g xterm-keys on
### settings
set -g default-terminal "screen-256color"
set -s escape-time 0
# status bar
set-option -g status on
set-option -g status-justify "centre"
set-window-option -g window-status-current-format " #I: #W "
# set ip on bar
set -g status-left-length 100
set -g status-left "#[fg=green]: #h : #[fg=brightblue]#(curl icanhazip.com) #[fg=yellow]#(ifconfig en0 | grep 'inet ' | awk '{print \"en0 \" $2}') #(ifconfig en1 | grep 'inet ' | awk '{print \"en1 \" $2}') #[fg=red]#(ifconfig tun0 | grep 'inet ' | awk '{print \"vpn \" $2}') #{pane_current_path}"
# colors
set-option -g status-bg black
set-option -g status-fg yellow
set-option -g pane-border-fg colour235
set-option -g pane-active-border-fg colour240