add script to start dwm to allow for restarts

This commit is contained in:
Ray Elliott 2020-02-24 10:33:55 +00:00
commit 62a3264a54
3 changed files with 25 additions and 1 deletions

18
start_dwm Executable file
View file

@ -0,0 +1,18 @@
#!/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