From be40d312b92256c81c69cf3fcea28cf1ccdaf991 Mon Sep 17 00:00:00 2001 From: dezza <402927+dezza@users.noreply.github.com> Date: Tue, 10 Jun 2025 09:01:49 +0200 Subject: [PATCH] fix(wl-copy): assume mime text/plain, avoid clipboard manager refusing to paste If we don't supply a `text/plain` mime-type to `wl-copy` it will constantly assume types from text that can be problematic for some clipboard managers to handle. In this case clipboard manager such as https://invent.kde.org/plasma/plasma-workspace/-/tree/master/klipper Is strict and assume it is binary data (file copied) copied, which makes sense. I don't really see a need to assume anything but `text/plain` unless someone can come with a legit reason to oppose this PR. --- scripts/helpers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/helpers.sh b/scripts/helpers.sh index 66beeec..160a9ad 100644 --- a/scripts/helpers.sh +++ b/scripts/helpers.sh @@ -149,7 +149,7 @@ clipboard_copy_command() { elif command_exists "clip.exe"; then # WSL clipboard command echo "cat | clip.exe" elif command_exists "wl-copy"; then # wl-clipboard: Wayland clipboard utilities - echo "wl-copy" + echo "wl-copy --type text/plain" elif command_exists "xsel"; then local xsel_selection if [[ $mouse == "true" ]]; then