From d914924a4d1310f5873dd59e6e50dbf6bda39e8b Mon Sep 17 00:00:00 2001 From: Zab Date: Thu, 26 Mar 2026 12:54:36 -0400 Subject: [PATCH] Fix define selection behavior on Wayland Added the --primary flag to wl-paste. Without it, wl-paste uses the regular clipboard, which requires actually copying a word first. The "primary" clipboard is the selection-based one, which I think is intended to be used with this script. --- shortcuts-menus/define | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shortcuts-menus/define b/shortcuts-menus/define index 5c1105a..081a110 100644 --- a/shortcuts-menus/define +++ b/shortcuts-menus/define @@ -1,6 +1,6 @@ #!/usr/bin/env bash -word=${1:-$(xclip -o -selection primary 2>/dev/null || wl-paste 2>/dev/null)} +word=${1:-$(xclip -o -selection primary 2>/dev/null || wl-paste --primary 2>/dev/null)} # Check for empty word or special characters [[ -z "$word" || "$word" =~ [\/] ]] && notify-send -h string:bgcolor:#bf616a -t 3000 "Invalid input." && exit 0