From pab at pabigot.com Wed Jan 28 12:28:21 2026 From: pab at pabigot.com (Peter A. Bigot) Date: Wed, 28 Jan 2026 05:28:21 -0700 Subject: [PATCH 1/1] Add support for gpaste as clipper In-Reply-To: <20260128122821.216730-1-pab@pabigot.com> References: <20260128122821.216730-1-pab@pabigot.com> Message-ID: <20260128122821.216730-2-pab@pabigot.com> gpaste is a Gnome-specific clipboard solution with history. Unlike wl-copy, it does not rely on being able to take focus to access the clipboard, so it works for users who prefer focus-new-windows=strict (vice "smart") under Wayland. Signed-off-by: Peter A. Bigot --- man/pass.1 | 11 ++++++++++- src/password-store.sh | 14 +++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/man/pass.1 b/man/pass.1 index a555dcb..5af8111 100644 --- a/man/pass.1 +++ b/man/pass.1 @@ -99,8 +99,11 @@ Decrypt and print a password named \fIpass-name\fP. If \fI--clip\fP or \fI-c\fP is specified, do not print the password but instead copy the first (or otherwise specified) line to the clipboard using .BR xclip (1) -or +, .BR wl-clipboard(1) +or +.BR gpaste-client(1) +(if \fIPASSWORD_STORE_USE_GPASTE\fP is set) and then restore the clipboard after 45 (or \fIPASSWORD_STORE_CLIP_TIME\fP) seconds. If \fI--qrcode\fP or \fI-q\fP is specified, do not print the password but instead display a QR code using .BR qrencode (1) @@ -429,6 +432,11 @@ for more info. Specifies the number of seconds to wait before restoring the clipboard, by default \fI45\fP seconds. .TP +.I PASSWORD_STORE_USE_GPASTE +Set this to any non-empty value to prefer +.BR gpaste-client (1) +over other clipping agents, if available. +.TP .I PASSWORD_STORE_UMASK Sets the umask of all files modified by pass, by default \fI077\fP. .TP @@ -471,6 +479,7 @@ The location of the text editor used by \fBedit\fP. .BR git (1), .BR xclip (1), .BR wl-clipboard (1), +.BR gpaste-client (1), .BR qrencode (1). .SH AUTHOR diff --git a/src/password-store.sh b/src/password-store.sh index 22e818f..f6985c8 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -16,6 +16,7 @@ PREFIX="${PASSWORD_STORE_DIR:-$HOME/.password-store}" EXTENSIONS="${PASSWORD_STORE_EXTENSIONS_DIR:-$PREFIX/.extensions}" X_SELECTION="${PASSWORD_STORE_X_SELECTION:-clipboard}" CLIP_TIME="${PASSWORD_STORE_CLIP_TIME:-45}" +USE_GPASTE="${PASSWORD_STORE_USE_GPASTE:+yes}" GENERATED_LENGTH="${PASSWORD_STORE_GENERATED_LENGTH:-25}" CHARACTER_SET="${PASSWORD_STORE_CHARACTER_SET:-[:punct:][:alnum:]}" CHARACTER_SET_NO_SYMBOLS="${PASSWORD_STORE_CHARACTER_SET_NO_SYMBOLS:-[:alnum:]}" @@ -155,7 +156,10 @@ check_sneaky_paths() { # clip() { - if [[ -n $WAYLAND_DISPLAY ]] && command -v wl-copy &> /dev/null; then + if [[ -n $USE_GPASTE ]] && command -v gpaste-client &> /dev/null; then + local copy_cmd=( gpaste-client add-password $2 ) + local paste_cmd=( : ) + elif [[ -n $WAYLAND_DISPLAY ]] && command -v wl-copy &> /dev/null; then local copy_cmd=( wl-copy ) local paste_cmd=( wl-paste -n ) if [[ $X_SELECTION == primary ]]; then @@ -168,7 +172,7 @@ clip() { local paste_cmd=( xclip -o -selection "$X_SELECTION" ) local display_name="$DISPLAY" else - die "Error: No X11 or Wayland display and clipper detected" + die "Error: No X11 or Wayland display and clipper or gpaste-client detected" fi local sleep_argv0="password store sleep on display $display_name" @@ -192,7 +196,11 @@ clip() { # so we axe it here: qdbus org.kde.klipper /klipper org.kde.klipper.klipper.clearClipboardHistory &>/dev/null - echo "$before" | $BASE64 -d | "${copy_cmd[@]}" + if [[ -n $USE_GPASTE ]]; then + gpaste-client delete-password $2 + else + echo "$before" | $BASE64 -d | "${copy_cmd[@]}" + fi ) >/dev/null 2>&1 & disown echo "Copied $2 to clipboard. Will clear in $CLIP_TIME seconds." } -- 2.47.3 From pab at pabigot.com Wed Jan 28 12:28:20 2026 From: pab at pabigot.com (Peter A. Bigot) Date: Wed, 28 Jan 2026 05:28:20 -0700 Subject: [PATCH 0/1] add GPaste support Message-ID: <20260128122821.216730-1-pab@pabigot.com> This is a from-scratch new feature to support clipping with GPaste[1], an clip manager that works under Wayland like wl-clipboard[2] but does not require setting focus-new-windows to "smart" in order to capture data[3]. Adding this feature allows users of Gnome under Wayland who prefer that the focus-new-windows property under org.gnome.desktop.wm.preferences be set to "strict", which prevents arbitrary applications from stealing focus from where the poor user is typing and redirecting their input into some popop that may take the input it receives as permission to do something unwanted. I've reviewed the discussions from the previous submission by Marc-Antoine Perennou in February, 2015[4] and hope this approach is more acceptable. Functionality requires that the gpaste-client be installed, the corresponding daemon be running, and the user opt-in by setting PASSWORD_STORE_USE_GPASTE to a non-empty value in their environment. [1] https://github.com/Keruspe/GPaste [2] https://github.com/bugaevc/wl-clipboard [3] https://github.com/bugaevc/wl-clipboard/issues/12#issuecomment-433010122 [4] https://lists.zx2c4.com/pipermail/password-store/2015-February/thread.html Peter A. Bigot (1): Add support for gpaste as clipper man/pass.1 | 11 ++++++++++- src/password-store.sh | 14 +++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) -- 2.47.3 From igor at c4llv07e.xyz Wed Jan 28 18:14:00 2026 From: igor at c4llv07e.xyz (c4llv07e) Date: Wed, 28 Jan 2026 18:14:00 +0000 Subject: [PATCH 1/1] Add support for gpaste as clipper In-Reply-To: <20260128122821.216730-2-pab@pabigot.com> References: <20260128122821.216730-1-pab@pabigot.com> <20260128122821.216730-2-pab@pabigot.com> Message-ID: <619f856f-553e-47c1-86d8-55bfd5aa6bd3@c4llv07e.xyz> Peter A. Bigot wrote: > gpaste is a Gnome-specific clipboard solution with history. Unlike > wl-copy, it does not rely on being able to take focus to access the > clipboard, so it works for users who prefer focus-new-windows=strict > (vice "smart") under Wayland. I think we just need a generic way to override default system tools, like dmenu, clipboard-manager, etc. It would make adding functionality harder, but current infinite list of elif's aren't better. Btw, nobody knows if the current repo maintainer still busy with real life or not? Haven't checked mailing list for a long time. From nathan.perrin.etu at gmail.com Thu Jan 29 13:23:58 2026 From: nathan.perrin.etu at gmail.com (Nathan Perrin) Date: Thu, 29 Jan 2026 13:23:58 +0000 Subject: passmenu: add support for dmenu alternatives Inbox Message-ID: Added option --dmenu to support dmenu alternatives such as wofi/rofi/fzf examples: - passmenu --dmenu="rofi -dmenu" - passmenu --dmenu="fzf" It still runs dmenu by default. -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-passmenu-add-support-for-dmenu-alternatives.patch Type: text/x-patch Size: 1508 bytes Desc: not available URL: From rutherther at ditigal.xyz Thu Jan 29 13:41:10 2026 From: rutherther at ditigal.xyz (Rutherther) Date: Thu, 29 Jan 2026 14:41:10 +0100 Subject: passmenu: add support for dmenu alternatives Inbox In-Reply-To: References: Message-ID: <6E0D9417-4722-49C6-86FA-95AEA690D1DE@ditigal.xyz> Hi, On January 29, 2026 2:23:58 PM GMT+01:00, Nathan Perrin wrote: >Added option --dmenu to support dmenu alternatives such as wofi/rofi/fzf >examples: >- passmenu --dmenu="rofi -dmenu" >- passmenu --dmenu="fzf" I am wondering, shouldnt this be an env var instead? That would allow choosing based on the environment you are in. Rutherther > >It still runs dmenu by default. From igor at c4llv07e.xyz Thu Jan 29 15:04:00 2026 From: igor at c4llv07e.xyz (c4llv07e) Date: Thu, 29 Jan 2026 15:04:00 +0000 Subject: passmenu: add support for dmenu alternatives Inbox In-Reply-To: <6E0D9417-4722-49C6-86FA-95AEA690D1DE@ditigal.xyz> References: <6E0D9417-4722-49C6-86FA-95AEA690D1DE@ditigal.xyz> Message-ID: <5c396c59-3b15-4d8d-a42f-71a4139ac414@c4llv07e.xyz> Rutherther wrote: > Hi, > > On January 29, 2026 2:23:58 PM GMT+01:00, Nathan Perrin wrote: >> Added option --dmenu to support dmenu alternatives such as wofi/rofi/fzf >> examples: >> - passmenu --dmenu="rofi -dmenu" >> - passmenu --dmenu="fzf" > > I am wondering, shouldnt this be an env var instead? That would allow choosing based on the environment you are in. It should, and I created such commit around a year ago.