-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
79 lines (59 loc) · 2.75 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
set -g default-terminal "screen-256color"
set-option -g default-command "reattach-to-user-namespace -l zsh"
set -g mode-keys vi
setw -g monitor-activity on
set -g visual-activity off
set-option -g renumber-windows on
set -g prefix C-a
unbind C-b
bind-key a send-prefix
unbind ^A
bind ^A select-pane -t :.+
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"
unbind-key -T copy-mode-vi y
bind-key -T copy-mode-vi y send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"
unbind r
bind r source-file ~/.tmux.conf
set -g base-index 1
set-option -g status on
set-option -g status-interval 2
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 "#(~/.tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/.tmux-powerline/powerline.sh right)"
set-option -g status-bg "black"
set-window-option -g window-status-current-format "#[fg=green, bg=black]#[fg=colour255, bg=green]#I: #W #[fg=green, bg=black]"
setw -g window-status-format "#I: #W#F "
setw -g window-status-style fg=green,bg=black
setw -g window-status-activity-style fg=red,bg=black,bold
set -g pane-border-bg default
set -g pane-border-fg colour245
set -g pane-active-border-bg default
set -g pane-active-border-fg colour46
setw -g automatic-rename on
set -g bell-action any
set -g visual-bell off
setw -g mouse on
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
bind v split-window -c "#{pane_current_path}"
bind s split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
set -g history-limit 100000
# 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"
bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1
bind-key -T root PPage if-shell -F "#{alternate_on}" "send-keys PPage" "copy-mode -e; send-keys PPage"
bind-key -T copy-mode-vi PPage send-keys -X page-up
bind-key -T copy-mode-vi NPage send-keys -X page-down
bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
bind-key -T copy-mode-vi WheelUpPane send-keys -X halfpage-up
bind-key -T copy-mode-vi WheelDownPane send-keys -X halfpage-down