-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_tmate.conf
101 lines (80 loc) · 2.8 KB
/
_tmate.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
# select, yank in vi mode
setw -g mode-keys vi
# tmate is a fork of tmux 2.4, so it needs old keybindings
bind-key -t vi-copy v begin-selection
unbind -t vi-copy C-j
# disable mouse
set -g mouse off
# decrease command delay (increases vim responsiveness)
set -sg escape-time 1
# increase repeat time for repeatable commands
set -g repeat-time 1000
# start window index at 1
set -g base-index 1
# start pane index at 1
setw -g pane-base-index 1
# renumber windows when one is closed
set -g renumber-windows on
set -g history-limit 200000
###########################
# Key Bindings
###########################
# tmux prefix
unbind C-b; set -g prefix C-Space
# resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# C-Space to quickly switch between panes
bind C-Space select-pane -t :.+
# @ to join a pane into the current one (opposite: ! to break)
bind-key @ command-prompt -p "create pane from:" "join-pane -s ':%%'"
# r to force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "~/.tmux.conf reloaded"
# Smart pane switching with awareness of vim splits
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?(g?(view|n?vim?x?)(diff)?)$'"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
###########################
# Status Bar
###########################
set -g status-interval 30
set -g status-left ""
setw -g window-status-format "#I:#W "
setw -g window-status-current-format "#I:#W "
###########################
# Colors
###########################
set -g status-bg colour235
set -g status-fg white
set -g window-status-style bg=colour235,fg=white
set -g window-status-current-style bg=green,fg=black
set -g pane-active-border-style bg=black,fg=green
set -g pane-border-style bg=black,fg=colour235
###########################
# Plugins
###########################
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @batt_icon_charge_tier8 '-'
set -g @batt_icon_charge_tier7 '-'
set -g @batt_icon_charge_tier6 '-'
set -g @batt_icon_charge_tier5 '-'
set -g @batt_icon_charge_tier4 '-'
set -g @batt_icon_charge_tier3 '-'
set -g @batt_icon_charge_tier2 '-'
set -g @batt_icon_charge_tier1 '-'
set -g @batt_icon_status_charged '+'
set -g @batt_icon_status_charging '+'
set -g @batt_icon_status_discharging '-'
set -g @batt_icon_attached '!'
set -g status-right "#{battery_icon}#{battery_percentage} %F %H:%M"
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-open'
set-environment -g PATH '/usr/local/bin:/bin:/usr/bin'
run '~/.tmux/plugins/tpm/tpm'