From 1da48110238d7fb4e42c7d8cd605f54c770048a4 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 8 May 2023 20:17:09 +0200 Subject: don't save password to clipboard history --- bin/menuscripts/mpass | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'bin/menuscripts') diff --git a/bin/menuscripts/mpass b/bin/menuscripts/mpass index ebe3956..870efb1 100755 --- a/bin/menuscripts/mpass +++ b/bin/menuscripts/mpass @@ -10,10 +10,16 @@ then else menucmd="fzf --prompt pass:" fi -while [ -d "${store}/${file}" ] +while [ -d "$store/$file" ] do - choice="$($lscmd "${store}/${file}" | sed 's/\.gpg$//'| $menucmd)" + choice="$($lscmd "$store/$file" | sed 's/\.gpg$//'| $menucmd)" [ "$choice" ] || break - file="${file}/${choice}" + file="$file/$choice" done -pass show -c "${file}" + +pass show -c "$file" + +test -n "$WAYLAND_DISPLAY" && pgrep -f "cliphist" && + cliphist list | + tail -1 | + cliphist delete -- cgit v1.2.3 From af77adcc95e6ea9c60f6fb580260d20c35ce32c6 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Mon, 8 May 2023 20:27:56 +0200 Subject: fixed cliphist still saving password --- bin/menuscripts/mpass | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'bin/menuscripts') 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 -- cgit v1.2.3