diff --git a/.xinitrc b/.xinitrc index 2d2f9a0..688275b 100755 --- a/.xinitrc +++ b/.xinitrc @@ -4,7 +4,7 @@ hash xcompmgr 2>/dev/null && xcompmgr & hash xscreensaver 2>/dev/null && xscreensaver -no-splash & -hash gpg-agent 2>/dev/null && eval $(gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info") +hash gpg-agent 2>/dev/null && eval $(gpg-agent --daemon --enable-ssh-support) DEFAULT_SESSION=qtile [[ ":$PATH:" == *":$HOME/bin:"* ]] || export PATH="$HOME/bin:$PATH" diff --git a/.zshrc b/.zshrc index 649e349..6a31eae 100644 --- a/.zshrc +++ b/.zshrc @@ -42,12 +42,11 @@ if [ -f "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting. fi # GPG Agent -if [ -f "${HOME}/.gpg-agent-info" ]; then - . "${HOME}/.gpg-agent-info" - export GPG_AGENT_INFO - export SSH_AUTH_SOCK -fi export GPG_TTY=$(tty) +unset SSH_AGENT_PID +if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then + export SSH_AUTH_SOCK="${HOME}/.gnupg/S.gpg-agent.ssh" +fi # Aliases [ "$(uname -s | tr '[:upper:]' '[:lower:]')" = 'linux' ] && alias ls='ls --color=auto'