From 564505447e19354e596f303ab562fedca576589d Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sun, 3 Sep 2023 00:13:21 -0600 Subject: who knows lmao --- x/startdwm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 x/startdwm (limited to 'x/startdwm') diff --git a/x/startdwm b/x/startdwm new file mode 100755 index 0000000..496d79b --- /dev/null +++ b/x/startdwm @@ -0,0 +1,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 -- cgit v1.2.3