dotfiles/.config/tmux/tmux.conf

61 lines
1.6 KiB
Plaintext

## Use vim keybindings in copy mode
setw -g mouse on
bind C-p previous-window
bind C-n next-window
# Source .tmux.conf as suggested in `man tmux`
bind R source-file ~/.config/tmux/tmux.conf
bind-key v copy-mode
setw -g mode-keys vi
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X rectangle-toggle
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -se p -i'
# Double LMB Select & Copy (Word)
bind-key -T copy-mode-vi DoubleClick1Pane \
select-pane \; \
send-keys -X select-word \; \
send-keys -X copy-pipe-and-cancel 'xclip -se p -i'
bind-key -n DoubleClick1Pane \
select-pane \; \
copy-mode -M \; \
send-keys -X select-word \; \
send-keys -X copy-pipe-and-cancel 'xclip -se p -i'
# Triple LMB: Select & Copy (Line)
bind-key -T copy-mode-vi TripleClick1Pane \
select-pane \; \
send-keys -X select-line \; \
send-keys -X copy-pipe-and-cancel 'xclip -se p -i'
bind-key -n TripleClick1Pane \
select-pane \; \
copy-mode -M \; \
send-keys -X select-line \; \
send-keys -X copy-pipe-and-cancel 'xclip -se p -i'
set-option -g history-limit 100000
# pane navigation avec ctrl+hjkl
set -g @plugin 'christoomey/vim-tmux-navigator'
# theme nord
set -g @plugin "nordtheme/tmux"
# resurrect et continuum
set -g @plugin "tmux-plugins/tmux-resurrect"
set -g @plugin "tmux-plugins/tmux-continuum"
set -g @resurrect-processes 'ssh'
set -g @continuum-restore 'on
run '~/.config/tmux/plugins/tpm/tpm'