]> git.sev.monster Git - dotfiles.git/blobdiff - base/.zprofile
actually set PINENTRY_USER_DATA, fix invocation
[dotfiles.git] / base / .zprofile
index 82e70e412d7083d3d0019bcebbd0a1ee74fa7a55..a0e4d369dde661480e70b46e5b3cf81b46187a6d 100644 (file)
@@ -28,8 +28,10 @@ export PYTHONSTARTUP=~/.pythonrc
 if (( ${+commands[gpg]} )) {
     # SSH_AUTH_SOCK should be set in a remote SSH session for passthrough
     # if it isn't, we are likely the first login shell on the local machine
-    if [[ ! -v SSH_AUTH_SOCK ]] {
+    # we also want to update USE_TTY if we are the login shell in graphics mode
+    if [[ ! -v SSH_AUTH_SOCK || -v DISPLAY ]] {
         export GPG_TTY=$(tty)
+        export PINENTRY_USER_DATA=USE_TTY=$((! ${+DISPLAY}))
         gpg-connect-agent UPDATESTARTUPTTY /bye >/dev/null
         export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
     }
This page took 0.030491 seconds and 4 git commands to generate.