vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 39c3ffefd59e7929e34077b440dd796c583cc5c4
parent 1a1c271cc4e527832d8a71f117f2f95a222be2a7
Author: yory8 <39745367+yory8@users.noreply.github.com>
Date:   Sat, 20 Jun 2020 12:04:26 +0200

Support wayland clipboard (wl-clipboard)
Diffstat:
Mvis-clipboard | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/vis-clipboard b/vis-clipboard @@ -12,6 +12,15 @@ vc_usage() { } vc_determine_command() { + if [ -n "$WAYLAND_DISPLAY" ]; then + for c in wl-copy wl-paste; do + if type "$c" >/dev/null 2>&1; then + echo "wlclipboard" + return 0 + fi + done + fi + if [ -n "$DISPLAY" ]; then for c in xclip xsel; do if type "$c" >/dev/null 2>&1; then @@ -66,6 +75,14 @@ vc_paste() { exit $? } +vc_wlclipboard_copy() { + wl-copy -t TEXT +} + +vc_wlclipboard_paste() { + wl-paste -t text +} + vc_xsel_copy() { xsel -bi }