#!/usr/bin/env bash PIDFILE=/var/run/user/$UID/dwm.pid if [ "$1" = "-e" ]; then echo Killing $(<$PIDFILE) kill $(<$PIDFILE) killall xinit exit fi echo $$ > $PIDFILE ~/resc/slstatus/slstatus & while true; do $HOME/resc/dwm/dwm >> /tmp/dwmsession.log sleep 1 done