diff options
| author | Mehdi Sadeghi <mehdi@mehdix.org> | 2021-04-25 19:04:31 +0200 |
|---|---|---|
| committer | Mehdi Sadeghi <mehdi@mehdix.org> | 2021-04-25 19:04:31 +0200 |
| commit | ecd3c4050cccfe8d4b97276bc01cae86971f2574 (patch) | |
| tree | 46182fc970f3f33ef17e87aa1ceb0b54f1a2c9bf /.zprofile | |
| parent | 18271e934a4b26611db7e812612bbe890e305ae3 (diff) | |
Add ssh-agent config.
Diffstat (limited to '.zprofile')
| -rw-r--r-- | .zprofile | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -2,7 +2,14 @@ # or when running with --shell flag. ## Read bash profile if present. -# emulate sh -c '. ~/.profile' +#emulate sh -c '. ~/.profile' # Clone oh-my-zsh if not present. [[ ! -e .oh-my-zsh ]] && git clone https://github.com/ohmyzsh/ohmyzsh .oh-my-zsh + +# Run and configure ssh-agent +if ! pgrep -u "$USER" ssh-agent > /dev/null; then + ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env" +fi +source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null + |
