-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf.local
65 lines (47 loc) · 1.91 KB
/
tmux.conf.local
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
unbind C-b
set -g prefix C-g
bind-key -r C-g send-prefix
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded!"
# 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"
set-option -g default-terminal "screen-256color"
set-option -g status-keys "emacs"
# status bar colors
set -g status-bg '#F44647'
set -g status-fg '#F9F9F9'
# active | non-active pane colors
set -g pane-border-fg '#F9F9F9'
set -g pane-active-border-fg '#F44647'
set -g pane-active-border-bg default
set -g status-left-length 50
set-option -g status-right " #(battery -t) #(date '+%a, %b %d - %I:%M') "
bind-key - split-window -v -c '#{pane_current_path}'
bind-key \ split-window -h -c '#{pane_current_path}'
bind -n S-Left resize-pane -L 2
bind -n S-Right resize-pane -R 2
bind -n S-Down resize-pane -D 1
bind -n S-Up resize-pane -U 1
bind -n C-Left resize-pane -L 10
bind -n C-Right resize-pane -R 10
bind -n C-Down resize-pane -D 10
bind -n C-Up resize-pane -U 10
bind c new-window -c "#{pane_current_path}"
set-option -g base-index 1
set-option -g renumber-windows on
bind-key b break-pane -d
bind-key C-j choose-tree
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
set -g status-left "#S #P "
setw -g window-status-format "#S #P"