vis

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

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

commit 7601780e34e3fac9f26aee4f7f37a62a62b15ae6
parent 77fccd3ca8f50c33aa18e376e99d902861186588
Author: Owen Rafferty <owen@owenrafferty.com>
Date:   Sat, 27 Aug 2022 17:29:11 -0500

vis-clipboard: add support for wayclip

Diffstat:
Mvis-clipboard | 17++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/vis-clipboard b/vis-clipboard @@ -19,8 +19,15 @@ vc_determine_command() { return 0 fi done + + for c in waycopy waypaste; do + if command -v "$c" >/dev/null 2>&1; then + echo "wayclip" + return 0 + fi + done fi - + if [ -n "$DISPLAY" ]; then for c in xclip xsel; do if command -v "$c" >/dev/null 2>&1; then @@ -97,6 +104,14 @@ vc_wlclipboard_paste() { fi } +vc_wayclip_copy() { + waycopy +} + +vc_wayclip_paste() { + waypaste +} + vc_xsel_copy() { xsel --"$sel" -i }