dotfiles/x/startdwm

17 lines
416 B
Text
Raw Permalink Normal View History

2022-12-31 18:36:08 -07:00
# stolen from https://wiki.archlinux.org/title/Dwm#Restart_dwm and therefore may be under the GNU Free Documentation License v1.3.
2022-12-11 01:03:47 -07:00
# 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