tmux copy works on wayland

This commit is contained in:
Christoph J. Scherr 2023-02-04 19:00:21 +01:00
parent 759f4eaadb
commit 226f6fb3c8
1 changed files with 5 additions and 2 deletions

View File

@ -49,6 +49,9 @@ bind -n M-j previous-window
bind -n M-k next-window bind -n M-k next-window
# tmux modes stuff. we have default mode and copy mode. # tmux modes stuff. we have default mode and copy mode.
# change the copy mode key to prefix-N , the default config isnt good for qwertz keyboards.
bind-key N copy-mode
# obviously use vim keys for copymode (think normal mode in vim) # obviously use vim keys for copymode (think normal mode in vim)
# with these options we can yank the tmux copy stuff into the system clipboard. # with these options we can yank the tmux copy stuff into the system clipboard.
set-window-option -g mode-keys vi set-window-option -g mode-keys vi
@ -58,8 +61,8 @@ 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 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 XORG clipboard, but this apperantly works with wayland aswell (on my system). TODO: test this for headless servers.
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 "xsel --clipboard"
#bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-keyboard" bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"
# magic tweaks for better use with vim or neovim # magic tweaks for better use with vim or neovim
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q' set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'