From: Dmitry Fedotov Date: Tue, 26 Jan 2021 20:44:30 +0000 (+0300) Subject: Add possibility to enter passfrase for dmenupass X-Git-Url: https://git.dmfe.net/?a=commitdiff_plain;h=f94f1b410e5fb7c7bc318620233d8ec68af87ae4;p=dotfiles Add possibility to enter passfrase for dmenupass --- diff --git a/scripts/dmenu-pass.sh b/scripts/dmenu-pass.sh index 84dc5ee..dc5e0d8 100755 --- a/scripts/dmenu-pass.sh +++ b/scripts/dmenu-pass.sh @@ -21,8 +21,13 @@ password=$(printf '%s\n' "${password_files[@]}" | dmenu -fn Monospace-18 -nb "${ [[ -n $password ]] || exit if [[ $typeit -eq 0 ]]; then - pass show -c "${password}" 2>/dev/null && \ + pass show -c "${password}" 2>/dev/null + if [[ $? -eq 0 ]]; then notify-send "${password} copied to clipboard" + else + notify-send "Passfrase required for using gpg secret key." + nohup "${TERMINAL}" -e sh -c 'pass show -c '"${password}" >/dev/null & + fi else pass show "${password}" | { IFS= read -r pass; printf %s "$pass"; } | xdotool type --clearmodifiers --file -