With this, we can have an indication about the clipboard contents changing.

No more playing the "have the 45 seconds past yet?" guessing game.

No more "I'll try pasting over here in plaintext first, see if it looks like a
password or like the clipboard's previous contents".

-- 
  % perl -E'$_="Pop Corn",s/\b\S(?{$0=$&^_^L})/$0/g,say'
>From 7a537b6fa50e9ff404c5df2ba85fce887510a246 Mon Sep 17 00:00:00 2001
From: Fernando Vezzosi <[email protected]>
Date: Wed, 13 Apr 2016 16:15:59 +0200
Subject: [PATCH] Notify when password goes in/out of clipboard

With this, we can have an indication about the clipboard contents changing.

No more playing the "have the 45 seconds past yet?" guessing game.

No more "I'll try pasting over here in plaintext first, see if it looks like a
password or like the clipboard's previous contents".
---
 src/password-store.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/password-store.sh b/src/password-store.sh
index 63be840..ff2d765 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -151,8 +151,10 @@ clip() {
 		qdbus org.kde.klipper /klipper org.kde.klipper.klipper.clearClipboardHistory &>/dev/null
 
 		echo "$before" | base64 -d | xclip -selection "$X_SELECTION"
+		notify-send 'Password cleared from clipboard' "Clipboard reset to its previous state after $CLIP_TIME seconds." &>/dev/null
 	) 2>/dev/null & disown
 	echo "Copied $2 to clipboard. Will clear in $CLIP_TIME seconds."
+	notify-send 'Password in clipboard' "Copied $2 to clipboard. Will clear in $CLIP_TIME seconds." &>/dev/null
 }
 tmpdir() {
 	[[ -n $SECURE_TMPDIR ]] && return
-- 
2.6.1

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

Reply via email to