This repository has been archived by the owner on Jun 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
76 lines (57 loc) · 2.06 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
# Change the default prefix to Ctrl+j
unbind C-b
set -g prefix C-j
bind C-j send-prefix
# Plugins
# easymotion-like navigation
set -g @plugin 'schasse/tmux-jump'
# restore tmux environment after system restart.
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Customize the tmux-jump keybinding
set -g @jump-key 'r'
# Use vim-style bindings
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
# Copy to clipboard
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b"
unbind p
bind-key p run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
# Start a non-login shell
set -g default-command "/usr/bin/env fish"
# Misc
set -g default-terminal "tmux-256color"
set -g set-titles on
set -g set-titles-string '#S - #W'
set -g history-limit 15000
# Reload config
bind-key R source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded."
# Status
set-window-option -g status-justify centre
set-window-option -g status-left " [#S] "
set-window-option -g status-right " %Y-%m-%d %l:%M%p "
set-window-option -g window-status-format " #I: #W "
set-window-option -g window-status-current-format " [#I: #W] "
# Don't rename windows automatically
set-option -g allow-rename off
# Highlight the active pane
set -g pane-active-border-style bg=blue,fg=white
# No escape delay
set -s escape-time 0
# Use non-repeatable pane-switching bindings
bind-key Up select-pane -U
bind-key Down select-pane -D
bind-key Left select-pane -L
bind-key Right select-pane -R
# Preserve the working directory of the current pane when splitting
bind '"' split-window -c "#{pane_current_path}" -h
bind % split-window -c "#{pane_current_path}" -v
# auto window rename
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
# Enable focus-events to ensure vim's autoread works.
set focus-events on
# True color support
set-option -sa terminal-overrides ',alacritty:RGB'
# Initialize the plugin manager
run '~/.tmux/plugins/tpm/tpm'