-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
65 lines (51 loc) · 1.86 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
# Initial setup
set -g default-terminal xterm-256color
set -g utf8
set-window-option -g utf8 on
set prefix C-a
unbind-key C-b
bind-key C-a send-prefix
# Easy config reload
bind-key r source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
# Set easier window split keys
bind-key v split-window -h
bind-key h split-window -v
# set-option -g mouse on
bind -n WheelUpPane copy-mode
# Set the base-index to 1 rather than 0
set -g base-index 1
set-window-option -g pane-base-index 1
set-option -g pane-border-fg white
set-option -g pane-active-border-fg red
# Resize pane
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# Synchronize panes
bind S set-window-option synchronize-panes
set -g mouse-utf8 on
set -g mouse on
set-option -g allow-rename off
# Status Bar
set-option -g status-bg colour88
# set-option -g status-fg white
# set-option -g message-bg yellow
# set-option -g message-fg black
set-window-option -g window-status-current-bg white
set-option -g status on
set-option -g status-interval 0
set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 60
set-option -g status-right-length 90
set-option -g status-left "#(~/Development/tmux/tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/Development/tmux/tmux-powerline/powerline.sh right)"
set-option -g default-command "reattach-to-user-namespace -l zsh"
# 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"