-
Notifications
You must be signed in to change notification settings - Fork 3
/
tmux.conf
98 lines (77 loc) · 2.82 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
# Allow clipboard access
set -g default-shell $SHELL
# Set the terminal to a configuration that supports italics
set -g default-terminal "wezterm"
# Enable mouse support
set-option -g mouse on
# Change the prefix
set -g prefix 'C-s'
bind 'C-s' send-prefix
# Use the Vim keybindings
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# Modify the split pane keyboard shortcuts
unbind %
unbind '"'
unbind c
bind % split-window -v -c "#{pane_current_path}"
bind '"' split-window -h -c "#{pane_current_path}"
# Remove the prompt before closing a pane
bind x kill-pane
# Remind a few built-in shortcuts to more intuitive values.
unbind ,
unbind [
bind r command-prompt "rename-window '%%'"
bind c new-window -c "#{pane_current_path}" \; command-prompt "rename-window '%%'"
bind s copy-mode
# Set the window title to be the current session's name
set -g set-titles on
set -g set-titles-string '#S'
set-window-option -g automatic-rename off
# Start counting the window panes at 1 instead of 0
set -g base-index 1
set -g pane-base-index 1
# Set up the default colors and font weights
set -g status-fg colour0
set -g status-bg "#1a1b26"
set -g window-status-activity-style bold
set -g message-style fg=colour16,bg=colour3,bold
# Set up the status left
set -g status-right ""
set -g status-left-length 32
set -g status-left '#[fg=white,bg=#1a1b26,bold] #S '
# Set up the window status
set -g window-status-separator ""
set -g window-status-format "#[fg=white,bg=#1a1b26] #I: #W "
set -g window-status-current-format "#[fg=#2e334d,bg=#1a1b26]#[fg=#c8d3f5,bg=#2e334d,noreverse,bold] #I: #W #[fg=#2e334d,bg=#1a1b26]"
# Turn off a setting that causes a memory leak in OS X Terminal
set -g status-interval 0
# Remove the delay when hitting the escape key
set -s escape-time 0
# Set up copy-mode keybindings. I'm setting `g` because I use the `gy` Neovim binding out of habit
# for yanking to the system clipboard.
set-window-option -g mode-keys vi
bind -T copy-mode-vi 'Escape' send -X cancel
bind -T copy-mode-vi 'v' send -X begin-selection
bind -T copy-mode-vi 'y' send -X copy-pipe pbcopy
bind -T copy-mode-vi 'g' send -X copy-pipe pbcopy
unbind -T copy-mode-vi 'Enter'
bind -T copy-mode-vi 'Enter' send -X copy-pipe pbcopy
# Add the desired plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Run the plugin manager (this must go at the bottom)
run '~/.tmux/plugins/tpm/tpm'
# Allow 24-bit color
set-option -ga terminal-overrides ",xterm-256color-italic:Tc"
# Prevent tmux from exiting copy mode after selecting something
unbind -T copy-mode-vi MouseDragEnd1Pane
# Renumber windows sequentially after closing any of them
set -g renumber-windows on
# Increase scrollback history
set -g history-limit 10000