-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
109 lines (80 loc) · 3.14 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
101
102
103
104
105
106
107
108
# tmux config
set -g mode-keys vi
set -g mouse on
# /~https://github.com/tmux/tmux/issues/145#issuecomment-151098708
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
bind-key P command-prompt -p 'save history to filename:' -I '~/tmux.history' 'capture-pane -S -32768 ; save-buffer %1 ; delete-buffer'
# Set that stupid Esc-Wait off, so VI works again
set -sg escape-time 0
# All commands start with C-a
set -g prefix C-a
# Use 256 colors
set -g default-terminal "screen-256color"
# Disable delay when changing between panes
set-option -g repeat-time 0
# Start numbering at 1
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g allow-rename off
set -g history-limit 500000
# Bindings
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind _ split-window -v -c "#{pane_current_path}"
bind a setw synchronize-panes on
bind A setw synchronize-panes off
unbind [
bind Escape copy-mode
unbind p
bind p paste-buffer
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
bind-key -Tcopy-mode-vi 'V' send -X rectangle-toggle
bind-key -Tcopy-mode-vi Escape send -X cancel
bind C-a send-prefix
bind l last-window
# Smart pane switching with awareness of vim splits
#is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)(g?(view|n?vim?)(diff)?|git)$"'
#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 C-l send-keys 'C-l'
bind -n M-h previous-window
bind -n M-l next-window
bind -n M-Left previous-window
bind -n M-Right next-window
# Reload the config.
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
# Clear scroll buffer
bind k clear-history \; display "History cleared!"
# Set panel title
bind t command-prompt -p "Panel title:" "send-keys 'printf \"'\\033]2;%%\\033\\\\'\"' C-m"
# status bar
set -g status-style bg=color234,fg=white
setw -g window-status-current-style fg=brightwhite,bg=colour234
# pane border
set -g pane-border-style fg=colour231
set -g pane-active-border-style fg=red
# message text
set -g message-style bg=colour234,fg=brightblue
set -g message-command-style bg=colour3,fg=green
# monitor activity
setw -g monitor-activity on
set -g visual-activity off
set -g window-status-activity-style bold
setw -g window-status-activity-style bg=colour235,fg=brightblue
# mode colors
set -g mode-style bg="#c1ddff",fg=red
set -g window-status-format "#I:#W "
set -g window-status-current-format "#I:#W "
setw -g window-status-current-style fg=red,bold
set -g status-interval 2
set -g status-left-length 55
set -g status-right-length 150
set -g status-left '#[fg=brightwhite,bold]#S #[fg=brightblack]•#[fg=brightwhite,bold]'
#set -g status-right '#22T #[fg=blue]#(tmux-mem-cpu -i 2 --colors) %H:%M#[default]'
set -g status-right '#[fg=brightwhite,bold]%H:%M#[default]'
set -g display-panes-time 1500