]> git.sev.monster Git - dotfiles.git/blame - bin/pinentry
add apkv, explicitly source XDG dirs in zshenv
[dotfiles.git] / bin / pinentry
CommitLineData
830aa39d 1#!/bin/sh
2# https://kevinlocke.name/bits/2019/07/31/prefer-terminal-for-gpg-pinentry
3
4set -Ce
30cffb95 5gfx="gnome gtk-2 gtk qt x11"
830aa39d 6tty="curses tty"
7case "${PINENTRY_USER_DATA-}" in
30cffb95 8 # prefer tty unless USE_TTY is 0
9 *USE_TTY=0*) list="$gfx $tty";;
10 *) list="$tty $gfx";;
830aa39d 11esac
12
13for x in $list; do
b133dc92 14 p=`which "pinentry-$x"` 2>/dev/null
830aa39d 15 if [ $? = 0 ]; then
16 exec "$p" "$@"
17 fi
18done
19
20echo "No pinentry program found" >&2
This page took 0.036768 seconds and 4 git commands to generate.