-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
102 lines (85 loc) · 3.51 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
# the tmux default is 750, tmux-sensible uses 4000
set-option -g display-time 2500
# For true color support, enable the Tc terminal capability for the outer
# terminal (to which tmux is attached) by setting the terminal-overrides
# option in tmux and subsequently detach and reattach tmux, as the following
# example (wherein $TERM is st-256color and % is a shell prompt) illustrates:
#
# Outside tmux:
# % echo $TERM
# st-256color
# % tmux attach
#
# Inside tmux:
# % tmux set-option -ga terminal-overrides ",st-256color:Tc"
# % tmux detach
#
# Outside tmux:
# % tmux attach
#
# Afterwards, you can run the following command to check whether the Tc
# terminal capability has been enabled properly for the outer terminal:
# tmux info | grep Tc
#
# If the command reports Tc: [missing], then support for 24-bit colors has
# not been enabled properly because the terminal-overrides option may have
# specified the outer terminal’s $TERM value incorrectly or because tmux may
# have been reattached to an entirely different outer terminal altogether.
#
# First we tell tmux about our terminal, otherwise it assumes screen-256color:
set -g default-terminal "screen-256color"
# Now we add true color support:
set-option -ga terminal-overrides ",xterm-termite:Tc"
# get tpm if necessary
if-shell '[ ! -d ~/.tmux/plugins/tpm ]' \
'display-message "Making ~/.tmux/plugins/tpm because it was not found..." ;\
run-shell "mkdir -p ~/.tmux/plugins/tpm" ;\
display-message "Cloning the Tmux Plugin Manager from GitHub..." ;\
run-shell "git clone https://github.com/tmux-plugins/tpm.git ~/.tmux/plugins/tpm" ;\
display-message "Done! Enter <prefix>+I (capital I for 'Install') to fetch and install TPM plugins."'
# reload config file
bind R source-file ~/.tmux.conf \; display-message 'Config reloaded.'
# split panes using | and -
bind | split-window -h
bind - split-window -v
# enable vi style key bindings, e.g. h/j/k/l navigation
set-window-option -g mode-keys vi
# Create vi style bindings for select & copy when in copy-mode, <prefix>[
# y will copy to the system clipboard
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'y' copy-selection
# Full screen toggle
bind -n C-Space resize-pane -Z
# switch windows with Shift-arrow without prefix
bind -n S-Left previous-window
bind -n S-Right next-window
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-save-bash-history 'on' # experimental
set -g history-limit 20000 # boost history
set -g base-index 1 # start windows numbering at 1
# https://github.com/neovim/neovim/wiki/FAQ#esc-in-tmux-or-gnu-screen-is-delayed
set -sg escape-time 10
# Status Stuff
set -g status-bg black
set -g status-fg white
set -g window-status-current-bg green
set -g window-status-current-fg white
set -g window-status-current-attr bold
set -g window-style 'bg=#000000'
set -g pane-border-bg '#1c1c1c'
set -g pane-border-fg '#6c6c6c'
set -g window-active-style 'bg=#010c27'
set -g pane-active-border-bg '#1c1c1c'
set -g pane-active-border-fg '#6c6c6c'
set -g status-interval 60
set -g status-left-length 30
# Indicate when the prefix has been pressed.
set -g status-left '#{?client_prefix,#[bg=red fg=colour255 bold](prefix on),#[fg=colour242]}(#S)'
set -g status-right '#[fg=yellow]%H:%M#[default]'
# initialize Tmux Plugin Manager (keep this line at the very bottom of .tmux.conf)
run '~/.tmux/plugins/tpm/tpm'