tmux pasting

This commit is contained in:
Christoph J. Scherr 2023-02-04 19:20:33 +01:00
parent 7626c438e6
commit ea0fbbcf84
2 changed files with 11 additions and 1 deletions

View File

@ -56,10 +56,15 @@ bind-key N copy-mode
# with these options we can yank the tmux copy stuff into the system clipboard.
set-window-option -g mode-keys vi
# Use prefix-p to paste
unbind ] #Default for pasting
bind p paste-buffer
unbind -T copy-mode-vi Space; #Default for begin-selection
unbind -T copy-mode-vi Enter; #Default for copy-selection
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-selection
# magic tweaks for better use with vim or neovim
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'

View File

@ -56,11 +56,16 @@ bind-key N copy-mode
# with these options we can yank the tmux copy stuff into the system clipboard.
set-window-option -g mode-keys vi
# Use prefix-p to paste
unbind ] #Default for pasting
bind p paste-buffer
unbind -T copy-mode-vi Space; #Default for begin-selection
unbind -T copy-mode-vi Enter; #Default for copy-selection
bind -T copy-mode-vi v send-keys -X begin-selection
# copy to XORG clipboard, but this apperantly works with wayland aswell (on my system). TODO: test this for headless servers.
# copy to wayland clipboard. If you use XORG use the commented version with xsel.
#bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xsel --clipboard"
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"