added procup
authorMatthew Owens <matthew@owens.tech>
Thu, 30 Jul 2020 17:33:54 +0000 (18:33 +0100)
committerMatthew Owens <matthew@owens.tech>
Thu, 30 Jul 2020 17:33:54 +0000 (18:33 +0100)
procup [new file with mode: 0755]

diff --git a/procup b/procup
new file mode 100755 (executable)
index 0000000..17bfc19
--- /dev/null
+++ b/procup
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# dunst has to start first, otherwise otherwise this script will
+# hang on notify-send
+procs="dunst dwmbar sxhkd"
+
+for proc in $procs; do
+       if [[ $(pgrep $proc) -eq "" ]]; then
+               $proc &
+               notify-send cron "$proc restarted"
+       fi
+done