xinitrc/start-dwm

19 lines
283 B
Plaintext
Raw Normal View History

#!/bin/sh
# relaunch DWM if the binary changes, otherwise bail
csum=$(sha1sum $(which dwm))
new_csum=""
while true
do
if [ "$csum" != "$new_csum" ]
then
csum=$new_csum
dwm
else
exit 0
fi
new_csum=$(sha1sum $(which dwm))
sleep 1
done