---
 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