-
Notifications
You must be signed in to change notification settings - Fork 67
/
.tmux.conf
68 lines (58 loc) · 2.01 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
# Colours
tm_yellow=colour03
tm_gray=colour08
tm_purple=colour05
tm_black=colour00
tm_green=colour10
# General
set -g prefix C-Space
set -g base-index 1
set -g pane-base-index 1
set -g renumber-windows on
set -g allow-rename off
set -g status-justify right
set -g status-position bottom
# Keyboard
set-window-option -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key , command-prompt "rename-window '%%'"
bind-key & command-prompt "kill-window"
# Status settings
set -g status-bg default
set -g status-right ""
set -g @prefix_highlight_fg 'black'
set -g @prefix_highlight_bg 'yellow'
tm_session_name="#[fg=$tm_gray]Session #S"
tm_prefix="#{prefix_highlight}"
set -g status-left $tm_prefix' '$tm_session_name
# Pane colours
set -g pane-border-fg $tm_gray
set -g pane-active-border-fg $tm_purple
# Message colours
set -g message-bg $tm_green
set -g message-fg $tm_black
# Pane border settings
set -g display-panes-active-colour $tm_yellow
set -g display-panes-colour $tm_gray
# Inactive window colours and settings
set-window-option -g window-status-fg $tm_gray
set-window-option -g window-status-bg default
set -g window-status-format "#W"
# Active window settings
set-window-option -g window-status-current-fg $tm_yellow
set-window-option -g window-status-current-bg default
set-window-option -g window-status-current-format "#[bold]#W"
# Vim Tmux Navigator
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(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"
# Tmux Plugin Manager
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
run '~/.tmux/plugins/tpm/tpm'