dimti
2 years ago
1 changed files with 59 additions and 0 deletions
@ -0,0 +1,59 @@ |
|||
set -g @plugin 'tmux-plugins/tpm' |
|||
set -g @plugin 'tmux-plugins/tmux-sensible' |
|||
set -g @plugin 'tmux-plugins/tmux-resurrect' |
|||
set -g @plugin 'tmux-plugins/tmux-continuum' |
|||
set -g @plugin 'tmux-plugins/tmux-pain-control' |
|||
set -g @plugin 'tmux-plugins/tmux-yank' |
|||
set -g @plugin 'tmux-plugins/tmux-sessionist' |
|||
|
|||
## Plugin configuration |
|||
set -g @continuum-restore 'on' |
|||
set -g @continuum-save-interval '5' |
|||
set -g @resurrect-capture-pane-contents 'on' |
|||
set -g @yank_selection 'primary' |
|||
set -g @man-size '40%' |
|||
set -g @man-orientation 'h' |
|||
set -g @man-shell-interactive 'off' |
|||
|
|||
set -g default-terminal "screen-256color" |
|||
set -ag terminal-overrides ",alacritty:RGB" |
|||
|
|||
# switch panes using Alt-arrow without prefix |
|||
bind -n M-Left select-pane -L |
|||
bind -n M-Right select-pane -R |
|||
bind -n M-Up select-pane -U |
|||
bind -n M-Down select-pane -D |
|||
|
|||
## Mouse On by default |
|||
set -g mouse on |
|||
|
|||
# PageUp/PageDown works for scrolling |
|||
bind-key -T root PPage if-shell -F "#{alternate_on}" "send-keys PPage" "copy-mode -e; send-keys PPage" |
|||
bind-key -T copy-mode-vi PPage send-keys -X page-up |
|||
bind-key -T copy-mode-vi NPage send-keys -X page-down |
|||
|
|||
# Same for the mouse scroll button |
|||
bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M" |
|||
bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M" |
|||
bind-key -T copy-mode-vi WheelUpPane send-keys -X halfpage-up |
|||
bind-key -T copy-mode-vi WheelDownPane send-keys -X halfpage-down |
|||
|
|||
# Tmux config reload |
|||
bind r source-file ~/.tmux.conf |
|||
|
|||
# Toggle prefix on/off with F12 (for nested remote sessions) |
|||
bind -T root F12 \ |
|||
set prefix None \;\ |
|||
set key-table off \;\ |
|||
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\ |
|||
refresh-client -S \;\ |
|||
|
|||
bind -T off F12 \ |
|||
set -u prefix \;\ |
|||
set -u key-table \;\ |
|||
refresh-client -S |
|||
|
|||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) |
|||
if "test ! -d ~/.tmux/plugins/tpm" \ |
|||
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" |
|||
run '~/.tmux/plugins/tpm/tpm' |
Write
Preview
Loading…
Cancel
Save
Reference in new issue