From 4ffba75055b07854bddb4367cf8cb57e7d86ca4d Mon Sep 17 00:00:00 2001 From: Dan Jones Date: Fri, 22 Nov 2019 11:02:44 -0600 Subject: [PATCH] Only use wl-copy if WAYLAND_DISPLAY is set A user may have wl-copy installed, but not currently using Wayland. --- scripts/helpers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/helpers.sh b/scripts/helpers.sh index c80a93f..8e10e53 100644 --- a/scripts/helpers.sh +++ b/scripts/helpers.sh @@ -148,7 +148,7 @@ clipboard_copy_command() { fi elif command_exists "clip.exe"; then # WSL clipboard command echo "cat | clip.exe" - elif command_exists "wl-copy"; then # wl-clipboard: Wayland clipboard utilities + elif [ -n "$WAYLAND_DISPLAY" ] && command_exists "wl-copy"; then # wl-clipboard: Wayland clipboard utilities echo "wl-copy" elif command_exists "xsel"; then local xsel_selection