summaryrefslogtreecommitdiff
path: root/.zprofile
blob: cec8f61d58cc1bdd11b33d69ff6c13aaf3271b02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# .zprofile is loaded on login shells, e.g. when doing ssh.
# or when running with --shell flag.

## Read bash profile if present.
#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