blob: 496d79ba3c8bcd8e40c6f99408872ccca6acc4de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# stolen from https://wiki.archlinux.org/title/Dwm#Restart_dwm and therefore may be under the GNU Free Documentation License v1.3.
# relaunch DWM if the binary changes, otherwise bail
csum=""
new_csum=$(sha1sum $(which dwm))
while true
do
if [ "$csum" != "$new_csum" ]
then
csum=$new_csum
dbus-launch dwm
else
exit 0
fi
new_csum=$(sha1sum $(which dwm))
sleep 0.5
done
|