Jochen Sprickerhof
Last changed: 2020-04-20

Window Manager

~/.xsession

#!/bin/sh

umask 0077
. "$HOME/.profile"

trap "RUN=false" 15

: > "$HOME/.xsession-errors"
rm -rf "$HOME/.ssh/master-*" &

xset -b
xsetroot -solid black
setxkbmap de nodeadkeys -option caps:escape -option compose:rctrl
st &
unclutter --timeout 1 & UNCLUTTER=$!
if [ "$(date +"%H")" -ge 22 ] || [ "$(date +"%H")" -lt 5 ]; then
  sct 3000
elif [ "$(date +"%H%M")" -ge 2030 ]; then
  sct 4000
fi

RUN=true

dwm-status & DWMSTATUS=$!

while $RUN; do 
  dwm & DWM=$!
  wait "$DWM"
done

kill "$UNCLUTTER" "$DWMSTATUS" "$DWM"