summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dot_config/zsh/dot_zshrc10
1 files changed, 9 insertions, 1 deletions
diff --git a/dot_config/zsh/dot_zshrc b/dot_config/zsh/dot_zshrc
index 350571a..036bfac 100644
--- a/dot_config/zsh/dot_zshrc
+++ b/dot_config/zsh/dot_zshrc
@@ -33,6 +33,14 @@ if [ -x "$(command -v gem)" ]; then
export PATH="$PATH:$GEM_HOME/bin"
fi
+# Make sure ssh-agent runs
+if ! pgrep -u "$USER" ssh-agent > /dev/null; then
+ ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env"
+fi
+if [ ! -f "$SSH_AUTH_SOCK" ]; then
+ source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
+fi
+
# Enable colors and change prompt:
autoload -U colors && colors # Load colors
#stty stop undef # Disable ctrl-s to freeze terminal.
@@ -92,4 +100,4 @@ PS1="\[\033]133;D;\007\]\[\033]133;A;\007\]$PS1\[\033]133;B;\007\]"
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/. p10k.zsh.
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh
-[[ ! -f ~/.config/zsh/keybindings.zsh ]] || source ~/.config/zsh/keybindings.zsh \ No newline at end of file
+[[ ! -f ~/.config/zsh/keybindings.zsh ]] || source ~/.config/zsh/keybindings.zsh