dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles # fast
git clone https://src.adamsgaard.dk/dotfiles.git # slow
Log | Files | Refs | README | LICENSE Back to index

commit f74f6240285724b3a97976c0af7d001fa845f63f
parent cbca8fbd3ec66f5f76f1838053ddfd1ec63c99ab
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Tue, 19 Jan 2021 10:40:29 +0100

.xinitrc: add ssh agent mechanism from OpenBSD

Diffstat:
M.xinitrc | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/.xinitrc b/.xinitrc @@ -4,6 +4,18 @@ [ -f ~/.xprofile ] && . ~/.xprofile [ -f ~/.Xresources ] && xrdb ~/.Xresources +if [ -z "$SSH_AGENT_PID" ]; then + if [ -x /usr/bin/ssh-agent ] && [ -f $HOME/.ssh/id_rsa ]; then + eval "$(ssh-agent -s)" + ssh-add </dev/null # requires x11-ssh-askpass(1) + fi +fi + while :; do dwm || break done + +if [ "$SSH_AGENT_PID" ]; then + ssh-add -D </dev/null + eval "$(ssh-agent -s -k)" +fi