this feature would also be very useful for my workflow.
Just to back the proposal to add this to password-store.

Michael

On Sonntag 2016-02-14 21:41, Andrew Todd wrote:

Date: Sun, 14 Feb 2016 21:41:17
From: Andrew Todd <[email protected]>
To: [email protected]
Subject: Re: [pass] [PATCH] Added Parcellite clipboard manager support.

Since it looks like Jason has been monitoring more actively, I hope no-one
minds if I re-submit this simple patch from last year.

Parcellite is a standalone clipboard manager with a nice (if
underdocumented)
feature: it can be turned on and off through a fifo control. This patch
turns
off parcellite just before copying a password to the clipboard, and turns it
back on once the clipboard has been reset.

On Tue, Jul 21, 2015 at 10:03 PM, Andrew Todd <[email protected]> wrote:

---
 src/password-store.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/password-store.sh b/src/password-store.sh
index d535a74..42708b7 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -131,6 +131,11 @@ clip() {
        # This base64 business is because bash cannot store binary data in
a shell
        # variable. Specifically, it cannot store nulls nor (non-trivally)
store
        # trailing new lines.
+
+       # If the parcellite clipboard manager is installed, disable it for
+       # the duration. It will never record the password.
+       echo -n "stop_all" >> "$HOME"/.local/share/parcellite/fifo_cmd
+
        local sleep_argv0="password store sleep on display $DISPLAY"
        pkill -f "^$sleep_argv0" 2>/dev/null && sleep 0.5
        local before="$(xclip -o -selection "$X_SELECTION" 2>/dev/null |
base64)"
@@ -150,6 +155,10 @@ clip() {
                qdbus org.kde.klipper /klipper
org.kde.klipper.klipper.clearClipboardHistory &>/dev/null

                echo "$before" | base64 -d | xclip -selection
"$X_SELECTION"
+
+               # If the parcellite clipboard manager is installed,
re-enable
+               # it so it will continue recording normal history.
+               echo -n "run_all" >>
"$HOME"/.local/share/parcellite/fifo_cmd
        ) 2>/dev/null & disown
        echo "Copied $2 to clipboard. Will clear in $CLIP_TIME seconds."
 }
--
2.1.4



_______________________________________________
Password-Store mailing list
[email protected]
http://lists.zx2c4.com/mailman/listinfo/password-store

Reply via email to