1
1
Fork 0

zshrc: Make sure GPG agent is running

This commit is contained in:
Jonathan Schleifer 2021-08-29 07:47:43 +00:00
parent 53717fe477
commit b6ba827351

3
zshrc
View file

@ -355,6 +355,9 @@ __has_command url2pkg &&
__has_command mpv && alias mpv="LC_ALL=C mpv" __has_command mpv && alias mpv="LC_ALL=C mpv"
if __has_command gpg gpg2; then if __has_command gpg gpg2; then
# Make sure GPG agent is running.
gpg --card-status &>/dev/null
local sock local sock
if [ -d "$XDG_RUNTIME_DIR/gnupg" ]; then if [ -d "$XDG_RUNTIME_DIR/gnupg" ]; then
sock=$(find $XDG_RUNTIME_DIR/gnupg -name S.gpg-agent.ssh | sock=$(find $XDG_RUNTIME_DIR/gnupg -name S.gpg-agent.ssh |