-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
64 lines (51 loc) · 2.45 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
set -g default-terminal "xterm-256color"
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g history-limit 30000
run-shell "bash ~/.tmux/verify_tmux_version.sh"
# Open windows in the same path
bind-key c new-window -c "#{pane_current_path}"
bind-key % split-window -h -c "#{pane_current_path}"
bind-key '"' split-window -v -c "#{pane_current_path}"
# Update variables in tmux
set-option -g update-environment "SSH_AUTH_SOCK \
SSH_CONNECTION \
DISPLAY"
# Window works with VIM navigation
set -g status-keys vi
setw -g mode-keys vi
# Disable the delay between an escape key press and subsequent characters
set -sg escape-time 0
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -r H resize-pane -L 1
bind -r J resize-pane -D 1
bind -r K resize-pane -U 1
bind -r L resize-pane -R 1
# Configure remote tmux from local
bind-key -n C-a send-prefix
# Make copy mode behave more like Vim
#bind -t vi-copy v begin-selection
#bind -t vi-copy C-v rectangle-toggle
#bind -t vi-copy y copy-pipe "xclip -filter -selection clipboard | xclip -selection primary"
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi C-v send -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf \; display "Configuration reloaded."
# Do not display the original window’s name when renaming it via Prefix + ,
bind , command-prompt -p "(rename-window '#W')" "rename-window '%%'"
# Do the same for session names
bind '$' command-prompt -p "(rename-session '#S')" "rename-session '%%'"
source-file ~/.tmux/colors/tmux-theme.conf
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-copycat' # Enhances tmux search
set -g @plugin 'tmux-plugins/tmux-yank' # Copying to system clipboard
set -g @plugin 'tmux-plugins/tmux-resurrect' # Persists tmux environment across system restarts.
set -g @plugin 'tmux-plugins/tmux-continuum' # Continuous saving of tmux environment
set -g @plugin 'samoshkin/tmux-plugin-sysstat' # Print system metrics
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
set -g @continuum-restore 'on' # automatically restore tmux session