From 3be401822259a7422f59244832dda2d701227f6e Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Sun, 28 Aug 2022 23:58:31 +0300 Subject: [PATCH] Add okc-ssh-agent for termux --- home/.config/zsh/01-env.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home/.config/zsh/01-env.zsh b/home/.config/zsh/01-env.zsh index b85aece..532af02 100644 --- a/home/.config/zsh/01-env.zsh +++ b/home/.config/zsh/01-env.zsh @@ -61,12 +61,18 @@ export SYSTEMD_PAGER=less # Use GPG for SSH authentication export GPG_TTY="$(tty)" +{%@@ if os == "arch" @@%} # set SSH_AUTH_SOCK if not logging in over SSH if [ "$SSH_CONNECTION" = "" ]; then export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) #gpgconf --launch gpg-agent gpg-connect-agent updatestartuptty /bye >/dev/null fi +{%@@ elif os == "termux" @@%} +if ! pgrep okc-ssh-agent > /dev/null; then + okc-ssh-agent > "$PREFIX/tmp/okc-ssh-agent.env" +fi +{%@@ endif @@%} # Enable grc colorization of supported commands [[ -s "/etc/grc.zsh" ]] && source /etc/grc.zsh