From c32ed90899dd1047bc8bab171a60d7de6f4af34f Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sun, 11 Dec 2022 01:03:47 -0700 Subject: update stuff, add relevant x scripts --- x/startdwm.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 x/startdwm.sh (limited to 'x/startdwm.sh') diff --git a/x/startdwm.sh b/x/startdwm.sh new file mode 100755 index 0000000..4625951 --- /dev/null +++ b/x/startdwm.sh @@ -0,0 +1,16 @@ +# stolen from https://wiki.archlinux.org/title/Dwm#Restart_dwm +# 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