aboutsummaryrefslogtreecommitdiff
path: root/Common/zshrc
diff options
context:
space:
mode:
Diffstat (limited to 'Common/zshrc')
-rw-r--r--Common/zshrc6
1 files changed, 6 insertions, 0 deletions
diff --git a/Common/zshrc b/Common/zshrc
index beda6af..17ebc73 100644
--- a/Common/zshrc
+++ b/Common/zshrc
@@ -146,3 +146,9 @@ export EDITOR="vim"
export GIT_AUTHOR_NAME="jakob.stendahl"
export GIT_AUTHOR_EMAIL="jakob.stendahl@infomedia.dk"
+# start only one ssh-agent and reuse the created one
+# this is used for sway, althou keys added do not persist on reboot
+if ! pgrep -u "$USER" ssh-agent > /dev/null; then
+ ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env"
+fi
+source "$XDG_RUNTIME_DIR/ssh-agent.env" > /dev/null