From b6ba827351882b63618ae51b0d399051e3ef331c Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Sun, 29 Aug 2021 07:47:43 +0000 Subject: [PATCH] zshrc: Make sure GPG agent is running --- zshrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zshrc b/zshrc index e238a61..0bb6a9d 100644 --- a/zshrc +++ b/zshrc @@ -355,6 +355,9 @@ __has_command url2pkg && __has_command mpv && alias mpv="LC_ALL=C mpv" if __has_command gpg gpg2; then + # Make sure GPG agent is running. + gpg --card-status &>/dev/null + local sock if [ -d "$XDG_RUNTIME_DIR/gnupg" ]; then sock=$(find $XDG_RUNTIME_DIR/gnupg -name S.gpg-agent.ssh |