aboutsummaryrefslogtreecommitdiffstats
path: root/dotconfig/polybar
diff options
context:
space:
mode:
Diffstat (limited to 'dotconfig/polybar')
-rwxr-xr-xdotconfig/polybar/launch.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/dotconfig/polybar/launch.sh b/dotconfig/polybar/launch.sh
new file mode 100755
index 0000000..510d097
--- /dev/null
+++ b/dotconfig/polybar/launch.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+# Terminate already running bar instances
+killall -9 polybar
+
+# Wait until the processes have been shut down
+while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
+
+# Launch the bar
+echo "---" | tee -a /tmp/mypolybar.log
+polybar main >> /tmp/mypolybar.log 2>&1 & disown
+echo "Bar launched..."