revert pointless gpg-agent.conf comments
update pinentry config to point to user-local bin
add pinentry script to auto-pick pinentry like Debian, but portable
add sshcontrol
--- /dev/null
+#!/bin/sh
+# https://kevinlocke.name/bits/2019/07/31/prefer-terminal-for-gpg-pinentry
+
+set -Ce
+graphics="gtk-2 gtk qt x11 gnome"
+tty="curses tty"
+case "${PINENTRY_USER_DATA-}" in
+ *USE_TTY=1*) list="$tty $graphics";;
+ *) list="$graphics $tty";;
+esac
+
+for x in $list; do
+ p=which "pinentry-$x" 2>/dev/null
+ if [ $? = 0 ]; then
+ exec "$p" "$@"
+ fi
+done
+
+echo "No pinentry program found" >&2
-# support ssh with gpg-agent
enable-ssh-support
-# try to use X11 pinentry if possible
-pinentry-program /usr/bin/pinentry-x11
+pinentry-program ~/bin/pinentry
--- /dev/null
+0C19EB483691C8F2F85E0F00A2DA56C990E448DE