diff --git a/README.md b/README.md new file mode 100644 index 0000000..5ec4c66 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +## Notes + +```sh +mv /usr/local/bin +sudo ln -s /home/ray/.config/xinitrc/start_dwm +``` diff --git a/start_dwm b/start_dwm new file mode 100755 index 0000000..ef5c368 --- /dev/null +++ b/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 + diff --git a/xinitrc b/xinitrc index cc53bd0..604d948 100644 --- a/xinitrc +++ b/xinitrc @@ -64,4 +64,4 @@ case "$_host" in ;; esac -exec ~/.bin/start_dwm +exec /usr/local/bin/start_dwm