aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/provider/clipboard.vim
diff options
context:
space:
mode:
authorXDream8 <62709801+XDream8@users.noreply.github.com>2022-11-18 15:39:56 +0000
committerGitHub <noreply@github.com>2022-11-18 08:39:56 -0700
commitdb407010facc55c19b5ebdf881225ac39cb29d01 (patch)
treec1f38e40d01615a4e738d7328a6870ad61da702a /runtime/autoload/provider/clipboard.vim
parent2360c984565c8a8f94ec32bcbe4a6af19fa38f0f (diff)
downloadrneovim-db407010facc55c19b5ebdf881225ac39cb29d01.tar.gz
rneovim-db407010facc55c19b5ebdf881225ac39cb29d01.tar.bz2
rneovim-db407010facc55c19b5ebdf881225ac39cb29d01.zip
feat(clipboard): added wayclip support (#21091)
Diffstat (limited to 'runtime/autoload/provider/clipboard.vim')
-rw-r--r--runtime/autoload/provider/clipboard.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim
index de8f2cbdf2..98c80f1843 100644
--- a/runtime/autoload/provider/clipboard.vim
+++ b/runtime/autoload/provider/clipboard.vim
@@ -97,6 +97,12 @@ function! provider#clipboard#Executable() abort
let s:copy['*'] = ['wl-copy', '--foreground', '--primary', '--type', 'text/plain']
let s:paste['*'] = ['wl-paste', '--no-newline', '--primary']
return 'wl-copy'
+ elseif !empty($WAYLAND_DISPLAY) && executable('waycopy') && executable('waypaste')
+ let s:copy['+'] = ['waycopy', '-t', 'text/plain']
+ let s:paste['+'] = ['waypaste', '-t', 'text/plain']
+ let s:copy['*'] = s:copy['+']
+ let s:paste['*'] = s:paste['+']
+ return 'wayclip'
elseif !empty($DISPLAY) && executable('xsel') && s:cmd_ok('xsel -o -b')
let s:copy['+'] = ['xsel', '--nodetach', '-i', '-b']
let s:paste['+'] = ['xsel', '-o', '-b']