1
0
Fork 0

gpg fixes

This commit is contained in:
Luca Bilke 2023-06-01 12:38:34 +02:00
parent eff2e95c55
commit cd95c17979
5 changed files with 10 additions and 9 deletions

View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ "${SSH_AUTH_SOCK:-0}" -ne $$ ]; then
sock="$(gpgconf --list-dirs agent-ssh-socket)"
export SSH_AUTH_SOCK=$sock
fi
export GPG_TTY="$TTY"
gpg-connect-agent updatestartuptty /bye >/dev/null

View File

@ -14,3 +14,5 @@ for f in $ZDOTDIR/configs/autogenerated/*; do
source $f
done
export GPG_TTY=$(tty)
setsid -f gpg-connect-agent updatestartuptty /bye 1>/dev/null

View File

@ -27,4 +27,3 @@ preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
whed() {
$EDITOR "$(which "$1")"
}

View File

@ -93,6 +93,12 @@ export NVM_DIR="$HOME/.config/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
gpgconf --launch gpg-agent
if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
exec startx
fi

View File

@ -0,0 +1,2 @@
enable-ssh-support
pinentry-program /usr/local/bin/pinentry-dmenu