feat(clipboard): wayclip primary clipboard and correct mimetype (#33990)

* Don't specify wayclip mimetype

Problem:  Since wayclip 0.2, wayclip assumes UTF-8
          (text/plain;charset=utf-8) in absence of an explicit mimetype.
	  Since Neovim sets the mimetype to "text/plain" without
	  specifying UTF-8, you will also have to use `-t text/plain`
	  when using waypaste or wayclip outside of Neovim.

Solution: Don't specify mimetype when using wayclip, thereby using the
          default "text/plain:charset=utf-8".

* Add primary clipboard support to wayclip

wayclip have had support for primary clipboard for some time now.

---------

Co-authored-by: Fredrik Foss-Indrehus <fred@ffoss.net>
This commit is contained in:
Fredrik Foss-Indrehus
2025-05-19 01:44:13 +02:00
committed by GitHub
parent a87aa68ed0
commit 3a35fdc347

View File

@ -85,10 +85,10 @@ function! s:set_wayland() abort
endfunction
function! s:set_wayclip() abort
let s:copy['+'] = ['waycopy', '-t', 'text/plain']
let s:paste['+'] = ['waypaste', '-t', 'text/plain']
let s:copy['*'] = s:copy['+']
let s:paste['*'] = s:paste['+']
let s:copy['+'] = ['waycopy']
let s:paste['+'] = ['waypaste']
let s:copy['*'] = ['waycopy', '-p']
let s:paste['*'] = ['waypaste', '-p']
return 'wayclip'
endfunction