commit ac63b4167eacd6e4b20f86ee8e33751d0b60dde4 parent f74f6240285724b3a97976c0af7d001fa845f63f Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Tue, 19 Jan 2021 11:02:37 +0100 merge xsession and xinitrc Diffstat:
T | .xinitrc | | | 0 | |
M | .xsession | | | 25 | ++++++++++++++++++------- |
2 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/.xinitrc b/.xinitrc diff --git a/.xsession b/.xsession @@ -8,11 +8,22 @@ if [ "$(hostname)" = "lmsc.home" ] && [ "$DISPLAY" = :0 ]; then [ -f ~/.Xresources-hidpi ] && xrdb -merge ~/.Xresources-hidpi fi -# enable trackpoint scrolling -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1 -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2 -xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5 +if [ "$(uname)" = "OpenBSD" ]; then + xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1 + xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2 + xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5 +fi + +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 +dwm || xterm + +if [ "$SSH_AGENT_PID" ]; then + ssh-add -D </dev/null + eval "$(ssh-agent -s -k)" +fi