summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-05-08 20:27:56 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-05-08 20:27:56 +0200
commitaf77adcc95e6ea9c60f6fb580260d20c35ce32c6 (patch)
treecfbda1a166cc0f6f6c07fdd53f8b586ef146b87d
parent8c56b3aaf5e921119be6adcbd0a25e3d1884bb97 (diff)
fixed cliphist still saving password
-rwxr-xr-xbin/menuscripts/mpass11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/menuscripts/mpass b/bin/menuscripts/mpass
index 870efb1..01c40e3 100755
--- a/bin/menuscripts/mpass
+++ b/bin/menuscripts/mpass
@@ -17,9 +17,8 @@ do
file="$file/$choice"
done
-pass show -c "$file"
-
-test -n "$WAYLAND_DISPLAY" && pgrep -f "cliphist" &&
- cliphist list |
- tail -1 |
- cliphist delete
+pass show -c "$file" &&
+ if [ -n "$WAYLAND_DISPLAY" ] && cliphist list >/dev/null
+then
+ cliphist list | head -n 1 | cliphist delete
+fi