add script to start dwm to allow for restarts
This commit is contained in:
parent
1f56cc2dc4
commit
62a3264a54
|
@ -0,0 +1,6 @@
|
|||
## Notes
|
||||
|
||||
```sh
|
||||
mv /usr/local/bin
|
||||
sudo ln -s /home/ray/.config/xinitrc/start_dwm
|
||||
```
|
|
@ -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
|
||||
|
Loading…
Reference in New Issue