dotfiles/home/private_dot_config/zsh/zexists.d/cmd/gpg.zsh

12 lines
308 B
Bash
Raw Normal View History

2023-02-26 13:22:42 -06:00
#!/usr/bin/env zsh
2024-02-29 12:02:42 -06:00
export GPG_TTY="$TTY"
2023-02-26 13:22:42 -06:00
gpgconf --launch gpg-agent
2024-10-22 10:53:48 -05:00
# have gpg-agent be the ssh-agent
# idea taken from https://wiki.archlinux.org/title/GnuPG#SSH_agent
if [[ -z "${SSH_CONNECTION}" ]]; then
export SSH_AGENT_PID=""
export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh"
fi