aboutsummaryrefslogtreecommitdiff
path: root/x/startdwm
diff options
context:
space:
mode:
authorBryson Steck <me@brysonsteck.xyz>2023-09-03 00:13:21 -0600
committerBryson Steck <me@brysonsteck.xyz>2023-09-03 00:13:21 -0600
commit564505447e19354e596f303ab562fedca576589d (patch)
tree9af8e3d65c57c7ceb1e2ab75a8ab268763d154c3 /x/startdwm
parent3991ac66a5269986b066338c404daea026b4ecbb (diff)
downloaddotfiles-564505447e19354e596f303ab562fedca576589d.tar
dotfiles-564505447e19354e596f303ab562fedca576589d.tar.gz
dotfiles-564505447e19354e596f303ab562fedca576589d.tar.bz2
who knows lmao
Diffstat (limited to 'x/startdwm')
-rwxr-xr-xx/startdwm16
1 files changed, 16 insertions, 0 deletions
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