X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/blobdiff_plain/6d54344e74d961369b15acb46cc95ae8da282c79..d928d58f1d1502c9751068ee52244c8c94fce31a:/bin/pinentry?ds=inline diff --git a/bin/pinentry b/bin/pinentry index 16c2144..5a31bd4 100755 --- a/bin/pinentry +++ b/bin/pinentry @@ -2,7 +2,7 @@ # https://kevinlocke.name/bits/2019/07/31/prefer-terminal-for-gpg-pinentry set -C -gfx="gnome qt gtk-4 gtk-3 gtk-2 gtk bemenu dmenu x11" +gfx="qt gnome gtk-4 gtk-3 gtk-2 gtk bemenu dmenu x11" tty="curses-ss curses tty" case "${PINENTRY_USER_DATA-}" in # prefer tty unless USE_TTY is 0 @@ -11,10 +11,13 @@ case "${PINENTRY_USER_DATA-}" in esac for x in $list; do - p=$(which "pinentry-$x") + p=$(command -v "pinentry-$x") if [ $? = 0 ]; then exec "$p" "$@" fi done +# fallback +exec pinentry "$@" + echo "No pinentry program found" >&2