adding gnupg to dotfiles\n fixes pinentry issues

This commit is contained in:
Andrew Davidson 2019-11-05 20:28:50 -05:00
parent 66cfa7c709
commit e679f41745
Signed by: amd
GPG key ID: 17AF8F2A49CF25C6
2 changed files with 15 additions and 0 deletions

View file

@ -0,0 +1,3 @@
pinentry-program ~/bin/pinentry-smart
default-cache-ttl 600
max-cache-ttl 7200

12
gnupg/bin/pinentry-smart Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
set -eu
PINENTRY_TUI='/usr/bin/pinentry-curses'
PINENTRY_GUI='/usr/bin/pinentry-gnome3'
if [ -n "${DISPLAY-}" -a -z "${TERM-}" ]; then
exec "$PINENTRY_GUI" "$@"
else
exec "$PINENTRY_TUI" "$@"
fi