logo

secret

Replacement to pass(1) based on reop(1)git clone https://hacktivis.me/git/secret.git
commit: 1be56b0a52872b3d23ce23e0672e46ceb794512e
parent cacb2da54fca2a10034faaa4ac1c9ffab8d2511c
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun, 24 May 2020 18:15:17 +0200

secret: fix dmenu and dmenu-oath

Diffstat:

Msecret19++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/secret b/secret @@ -73,17 +73,26 @@ secret_edit() { } secret_dmenu() { - echo | dmenu -nb '#000' -nf '#000' -p "Passphrase: " + echo | dmenu -nb '#000' -nf '#000' -p "Passphrase: " } secret_dmenu_oath() { - entry="$(secret_find -name '*.oath.reop' | dmenu -i)" - oathtool $(secret_menu | secret_read "$entry") | xclip -i -selection clipboard + entry="$(secret_list -name '*.oath.reop' | dmenu -i)" + export SECRET_FILE="${basepath}/.secret_$RANDOM.txt" + secret_dmenu | secret_read "$entry" + + oathtool $(cat "${SECRET_FILE}") | xclip -i -selection clipboard + + shred -u "${SECRET_FILE}" } secret_dmenu_read() { - entry="$(secret_find | dmenu -i)" - secret_menu | secret_read "$entry" | xclip -i -selection clipboard + entry="$(secret_list | dmenu -i)" + export SECRET_FILE="${basepath}/.secret_$RANDOM.txt" + secret_dmenu | secret_read "$entry" + + cat "${SECRET_FILE}" | xclip -i -selection clipboard + shred -u "${SECRET_FILE}" } secret_usage() {