]> git.sev.monster Git - dotfiles.git/blobdiff - bin/pinentry
actually set PINENTRY_USER_DATA, fix invocation
[dotfiles.git] / bin / pinentry
index 7b83ff5d3be433d12a3f167a3997d5cb9f258696..52fd48ae9f65af9dc70ae16bd37748bc43fcb45b 100755 (executable)
@@ -2,11 +2,12 @@
 # https://kevinlocke.name/bits/2019/07/31/prefer-terminal-for-gpg-pinentry
 
 set -Ce
-graphics="gtk-2 gtk qt x11 gnome"
+gfx="gnome gtk-2 gtk qt x11"
 tty="curses tty"
 case "${PINENTRY_USER_DATA-}" in
-       *USE_TTY=1*) list="$tty $graphics";;
-       *)           list="$graphics $tty";;
+       # prefer tty unless USE_TTY is 0
+       *USE_TTY=0*) list="$gfx $tty";;
+       *)           list="$tty $gfx";;
 esac
 
 for x in $list; do
This page took 0.030647 seconds and 4 git commands to generate.