| 1 | ##### plugins (declare first, run TPM last) ##### |
| 2 | |
| 3 | # tmux-yank: copy without snapping back; use Wayland clipboard |
| 4 | set -g @yank_action 'copy-pipe' |
| 5 | set -g @yank_selection_mouse 'clipboard' |
| 6 | set -g @override_copy_command 'wl-copy' |
| 7 | |
| 8 | # Resurrect auto-restore |
| 9 | set -g @continuum-restore 'on' |
| 10 | |
| 11 | # Plugins |
| 12 | set -g @plugin 'tmux-plugins/tpm' |
| 13 | set -g @plugin 'tmux-plugins/tmux-yank' |
| 14 | set -g @plugin 'tmux-plugins/tmux-copycat' |
| 15 | set -g @plugin 'tmux-plugins/tmux-open' |
| 16 | set -g @plugin 'sainnhe/tmux-fzf' |
| 17 | set -g @plugin 'junegunn/tmux-fzf-url' |
| 18 | set -g @plugin 'tmux-plugins/tmux-resurrect' |
| 19 | set -g @plugin 'tmux-plugins/tmux-continuum' |
| 20 | set -g @plugin 'tmux-plugins/tmux-prefix-highlight' |
| 21 | |
| 22 | # TPM init (must be last in this file) |
| 23 | run '~/.tmux/plugins/tpm/tpm' |
| 24 | |
| 25 | # --- Post-plugins yank behavior (Wayland) --- |
| 26 | # Mouse release: copy to clipboard, STAY in copy-mode (no jump) |
| 27 | unbind -T copy-mode-vi MouseDragEnd1Pane |
| 28 | bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "wl-copy" |
| 29 | |
| 30 | # y: copy to clipboard AND EXIT copy-mode (back to prompt) |
| 31 | unbind -T copy-mode-vi y |
| 32 | bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy" |
| 33 | |
| 34 | # Y: copy to clipboard and STAY in copy-mode (handy for multiple yanks) |
| 35 | unbind -T copy-mode-vi Y |
| 36 | bind -T copy-mode-vi Y send-keys -X copy-pipe-no-clear "wl-copy" |
| 37 | |
| 38 | # --- X11 alternative (uncomment if using xclip instead of wl-copy) --- |
| 39 | # unbind -T copy-mode-vi MouseDragEnd1Pane |
| 40 | # bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "xclip -selection clipboard -i" |
| 41 | # unbind -T copy-mode-vi y |
| 42 | # bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -i" |
| 43 | # unbind -T copy-mode-vi Y |
| 44 | # bind -T copy-mode-vi Y send-keys -X copy-pipe-no-clear "xclip -selection clipboard -i" |
| 45 |