-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
141 lines (102 loc) · 3.65 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
138
139
140
141
# vim:foldmethod=marker:foldlevel=0
# GENERAL {{{
# Load tpm, the tmux plugin manager, and some sensible defaults.
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-sensible'
# }}}
# USER INTERFACE {{{
# The following overwrite options from the tmux-sensible plugin.
# Use a shorter but non-zero escape key timeout. This addresses vim mode
# switching issues, see <http://superuser.com/a/252717/65504>. This is still
# faster than you can talk.
set -sg escape-time 20
# Upgrade $TERM
set -g default-terminal "tmux-256color"
# Vim keybindings.
set -g mode-keys vi
set -g status-keys vi
# The closest thing in my keyboard is Ctrl-Backslash. tmux-sensible already
# unbinds Ctrl-B for us.
set -g prefix C-\\
bind C-\\ send-prefix
# Mouse support.
setw -g mouse on
# Start windows and panes at one, not zero.
# The zero key is too far away, starting at one is more ergonomic.
set -g base-index 1
setw -g pane-base-index 1
# Set window titles
set -g set-titles on
# Highlight windows when there is new activity.
set -g monitor-activity on
# }}}
# THEME {{{
# Base16 Monokai, see <https://bit.ly/monokai-tmux>.
# default status line colors
set-option -g status-style "fg=#a59f85,bg=#383830"
# default window title colors
set-window-option -g window-status-style "fg=#a59f85,bg=default"
# active window title colors
set-window-option -g window-status-current-style "fg=#f4bf75,bg=default"
# pane border
set-option -g pane-border-style "fg=#383830"
set-option -g pane-active-border-style "fg=#49483e"
# message text
set-option -g message-style "fg=#f8f8f2,bg=#383830"
# pane number display
set-option -g display-panes-active-colour "#a6e22e"
set-option -g display-panes-colour "#f4bf75"
# clock
set-window-option -g clock-mode-colour "#a6e22e"
# copy mode highligh
set-window-option -g mode-style "fg=#a59f85,bg=#49483e"
# bell
set-window-option -g window-status-bell-style "fg=#383830,bg=#f92672"
# }}}
# STATUS LINE {{{
# Put the status line at the top of the screen.
set -g status-position top
# Load the tmuxline status line stored in ~/.tmuxline by vim.
if-shell "test -f ~/.tmuxline" "source ~/.tmuxline"
# }}}
# NAVIGATION {{{
# Set new panes to open in the current directory.
# Also, some defaults that remind me of vim.
unbind %
unbind '"'
bind v split-window -h -c "#{pane_current_path}"
bind s split-window -v -c "#{pane_current_path}"
bind t split-window -v -f -p 25 -c "#{pane_current_path}"
# Set new windows to open in the current directory.
# Also, some defaults that remind me of vim.
bind c new-window -c "#{pane_current_path}"
# Vim/Neovim navigation integration.
# This should be the last plugin loaded?
set -g @plugin 'christoomey/vim-tmux-navigator'
# }}}
# SCREEN SEARCH AND SCRAPING {{{
# Open highlighted text from tmux copy mode.
set -g @plugin 'tmux-plugins/tmux-open'
# Clipboard enhancements.
set -g @plugin 'tmux-plugins/tmux-yank'
# Tmux search enhancements.
set -g @plugin 'tmux-plugins/tmux-copycat'
# }}}
# COMPATIBILITY WITH OTHER APPLICATIONS {{{
# Make colors work with GNOME Terminal.
set -as terminal-overrides ",gnome*:Tc"
# Make colors work with Alacritty.
set -ag terminal-overrides ",xterm-256color:RGB"
set -ag terminal-overrides ",alacritty:RGB"
# Undercurl support in Alacritty.
set -as terminal-overrides ',alacritty:Smulx=\E[4::%p1%dm'
# }}}
# PLUGIN MANAGEMENT {{{
# Install tpm and plugins if missing.
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm'"
run '~/.tmux/plugins/tpm/bin/install_plugins > /dev/null'
# Initialize tpm, the tmux plugin manager (keep this line at the very bottom)
run '~/.tmux/plugins/tpm/tpm'
# }}}