-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
137 lines (107 loc) · 4.22 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
set -g default-terminal "screen-256color"
# should fix slow key presses
set-option -s escape-time 10
# Reduce repeat time
set-option -g repeat-time 100
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-fg colour166 #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour green #green
# Statusline
set-option -g status-left ''
set-option -g status-right ''
set-option -ag status-right '#(./statusline)'
set -g status-right-length 100
set -g status-bg default
setw -g window-status-format '#[fg=colour236,bold,bg=colour180] #I #[fg=colour180,bold,bg=colour236] #W '
setw -g window-status-current-format '#[fg=colour180,bold,bg=colour236] #I #[fg=colour236,bold,bg=colour180] #W '
# Prefix
## C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
bind-key C-a last-window
# Let me have C-a back!
bind a send-prefix
# Start numbering at 1
set -g base-index 1
# Allows us to use C-a a <command> to send commands to a TMUX session inside
# another TMUX session
bind-key a send-prefix
# Activity monitoring
setw -g monitor-activity on
set -g visual-activity on
# 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"
# Bind ']' to use pbpaste
bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
# reload config
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# easy pane resizing
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r H resize-pane -L 5
bind -r L resize-pane -R 5
# auto window rename
set-window-option -g automatic-rename
# 3.x
# setw -g automatic-rename on
# setw -g automatic-rename-format "#{pane_current_command}"
# mouse
set -g mouse on
# https://github.com/edkolev/dots/blob/master/tmux.conf
# Updates for tmux 1.9's current pane splitting paths.
if-shell "[[ `tmux -V` == *1.9* ]]" 'unbind c; bind c new-window -c "#{pane_current_path}"'
if-shell "[[ `tmux -V` == *1.9* ]]" 'unbind s; bind s split-window -v -c "#{pane_current_path}"'
if-shell "[[ `tmux -V` == *1.9* ]]" "unbind '\"'; bind '\"' split-window -v -c '#{pane_current_path}'"
if-shell "[[ `tmux -V` == *1.9* ]]" 'unbind v; bind v split-window -h -c "#{pane_current_path}"'
if-shell "[[ `tmux -V` == *1.9* ]]" 'unbind %; bind % split-window -h -c "#{pane_current_path}"'
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Switch panes with PageUp/Down (which I never use anyway)
bind -n PageUp select-pane -U
bind -n PageDown select-pane -D
# auto restore tmux sessions
set -g @continuum-restore 'on'
# List of plugins
# Plugin Manager
set -g @plugin 'tmux-plugins/tpm'
# Sensible defaults
set -g @plugin 'tmux-plugins/tmux-sensible'
# Restore to same condition
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Session management
set -g @plugin 'tmux-plugins/tmux-sessionist'
# Pane bindings
set -g @plugin 'tmux-plugins/tmux-pain-control'
# Painless vim/tmux pane navigation
set -g @plugin 'christoomey/vim-tmux-navigator'
# Initializes TMUX plugin manager.
run '~/.tmux/plugins/tpm/tpm'