X-Git-Url: https://git.sev.monster/~sev/dotfiles.git/blobdiff_plain/0ca7cf361de9a1a40709ae7eaf9dbd77ad105694..29b45f3cd04fe7f94aaebbd99c4bdbb3f23f98f3:/etc/zsh/.zprofile diff --git a/etc/zsh/.zprofile b/etc/zsh/.zprofile index 407c300..58ebfa1 100644 --- a/etc/zsh/.zprofile +++ b/etc/zsh/.zprofile @@ -143,18 +143,15 @@ if [[ -v commands[gpg-connect-agent] && export GPG_TTY=$(tty) if [[ ( -v DISPLAY || -v WAYLAND_DISPLAY ) && ${PINENTRY_USER_DATA/USE_TTY=0} == $PINENTRY_USER_DATA ]] - export PINENTRY_USER_DATA=USE_TTY=$(( - ${+DISPLAY} + ${+WAYLAND_DISPLAY} == 0)) - # XXX: don't know if gpg-agent supports comments after directives - # XXX: path could have # + export PINENTRY_USER_DATA=USE_TTY=0 # XXX: we are assuming this is our pinentry from .local/bin - sed -Ei 's#^([[:space:]]*pinentry-program[[:space:]]).*$#\1'$HOME'/.local/bin/pinentry#' \ + sed -Ei 's^([[:space:]]*pinentry-program[[:space:]]).*$\1'$HOME'/.local/bin/pinentry' \ ${GNUPGHOME:-~/.gnupg}/gpg-agent.conf 2>/dev/null # XXX: could check for changes before doing this to save perf gpg-connect-agent RELOADAGENT UPDATESTARTUPTTY /bye >/dev/null 2>&1 if {$p} { gpg-connect-agent /subst /serverpid \ - "/echo pid \${get serverpid} on $GPG_TTY" /bye 2>/dev/null + "/echo pid \${get serverpid} on ${WAYLAND_DISPLAY:-${DISPLAY:-$GPG_TTY}}" /bye 2>/dev/null print -nP '%f' } } elif {$p} {