diff options
Diffstat (limited to 'vis-clipboard')
| -rwxr-xr-x | vis-clipboard | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vis-clipboard b/vis-clipboard index 0ceed70..098fa8c 100755 --- 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 } |
