[PATCH] Make sleep_argv0 selection-specific

vnctdj vnctdj at laposte.net
Sat Aug 2 21:31:10 UTC 2025


In my passmenu I use:

PASSWORD_STORE_X_SELECTION=primary pass show -c2 "$password" 2>/dev/null
sleep 1
PASSWORD_STORE_X_SELECTION=clipboard pass show -c "$password" 2>/dev/null

and I noticed that the copied text in primary is only usable for 1 s
instead of PASSWORD_STORE_CLIP_TIME seconds unlike the password copied
in clipboard.

This patch fixes that by telling kill to be selection-specific.
---
 src/password-store.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/password-store.sh b/src/password-store.sh
index 22e818f..88e5526 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -170,7 +170,7 @@ clip() {
 	else
 		die "Error: No X11 or Wayland display and clipper detected"
 	fi
-	local sleep_argv0="password store sleep on display $display_name"
+	local sleep_argv0="password store sleep on display $display_name for X selection $X_SELECTION"
 
 	# This base64 business is because bash cannot store binary data in a shell
 	# variable. Specifically, it cannot store nulls nor (non-trivally) store
-- 
2.50.1



More information about the Password-Store mailing list