Load ssh-agent on login if not running

This commit is contained in:
Anthony Rose 2022-08-25 10:30:17 +01:00
parent aa650a15af
commit 940162fab6

View file

@ -152,6 +152,13 @@ fi
alias prun='podman run --rm --interactive --tty --security-opt label=disable --volume "$HOME":"$HOME" --volume "$XDG_RUNTIME_DIR":"$XDG_RUNTIME_DIR" --env XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" --env XDG_SESSION_TYPE=wayland --ipc host' alias prun='podman run --rm --interactive --tty --security-opt label=disable --volume "$HOME":"$HOME" --volume "$XDG_RUNTIME_DIR":"$XDG_RUNTIME_DIR" --env XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" --env XDG_SESSION_TYPE=wayland --ipc host'
alias pruncerts='prun --volume /etc/pki/ca-trust:/etc/pki/ca-trust:ro --volume /etc/ssl/certs:/etc/ssl/certs:ro' alias pruncerts='prun --volume /etc/pki/ca-trust:/etc/pki/ca-trust:ro --volume /etc/ssl/certs:/etc/ssl/certs:ro'
if [ -z "$SSH_AUTH_SOCK" ] && [ -z "$SSH_AGENT_PID" ]
then
export SSH_AUTH_SOCK="$XDG_STATE_HOME/ssh-agent.socket"
export SSH_AGENT_PID="$XDG_STATE_HOME/ssh-agent.pid"
ssh-agent -a "$SSH_AUTH_SOCK"
fi
mkcd () { mkcd () {
if [ $# -ne 1 ] if [ $# -ne 1 ]
then then