xinitrc: spawn ssh-agent

This commit is contained in:
Lucas Gabriel Vuotto 2024-07-13 13:42:21 +00:00
parent 2bbd05f402
commit 2b356383cb

View File

@ -32,5 +32,15 @@ if [ -r ~/.xinitrc.local ]; then
. ~/.xinitrc.local . ~/.xinitrc.local
fi fi
if [ -z "${SSH_AUTH_PID:-}" ]; then
eval $(ssh-agent -s)
fi
: ${logdir:=~/local/var/log} : ${logdir:=~/local/var/log}
exec herbstluftwm -l >"$logdir/hlwm.out" 2>"$logdir/hlwm.err" mkdir -p "$logdir"
herbstluftwm -l >"$logdir/hlwm.out" 2>"$logdir/hlwm.err"
if [ -n "$SSH_AGENT_PID" ]; then
ssh-add -D </dev/null
eval $(ssh-agent -ks)
fi