Skip to content

Instantly share code, notes, and snippets.

View kiwimato's full-sized avatar

Mihai kiwimato

View GitHub Profile
@kiwimato
kiwimato / .xsession
Created November 27, 2021 15:25
.xsession gpg-agent SSH_AGENT SSH_AUTH_SOCK Yubikey Jetbrains Pycharm IntelliJ IDEA
AGENT_SOCK=$(gpgconf --list-dirs | grep agent-socket | cut -d : -f 2)
if [[ ! -S $AGENT_SOCK ]]; then
gpg-agent --daemon --use-standard-socket &>/dev/null
fi
export GPG_TTY=$TTY
# Set SSH to use gpg-agent if it's enabled
GNUPGCONFIG="${GNUPGHOME:-"$HOME/.gnupg"}/gpg-agent.conf"
if [[ -r $GNUPGCONFIG ]] && command grep -q enable-ssh-support "$GNUPGCONFIG"; then