From 3eb5b8961a0bbd63c31af0dac61a3c8310cd08ab Mon Sep 17 00:00:00 2001 From: psychhim Date: Tue, 18 Nov 2025 23:12:08 +0530 Subject: [PATCH] Fix: clipboard flag (-c) now works on wayland --- upload.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upload.sh b/upload.sh index 6146bfc..308adab 100755 --- a/upload.sh +++ b/upload.sh @@ -237,7 +237,10 @@ if [[ -n "$link" ]]; then # CLIPBOARD if $COPY_TO_CLIPBOARD; then - if command -v xclip >/dev/null 2>&1; then + if command -v wl-copy >/dev/null 2>&1; then + echo -n "$link" | wl-copy --type text/plain + >&2 echo -e "${ORANGE}Link copied to clipboard.${RESET}" + elif command -v xclip >/dev/null 2>&1; then echo -n "$link" | xclip -selection clipboard >&2 echo -e "${ORANGE}Link copied to clipboard.${RESET}" elif command -v pbcopy >/dev/null 2>&1; then