aboutsummaryrefslogtreecommitdiff
path: root/config/polybar/hack/launch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/polybar/hack/launch.sh')
-rwxr-xr-xconfig/polybar/hack/launch.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/config/polybar/hack/launch.sh b/config/polybar/hack/launch.sh
new file mode 100755
index 0000000..05e876b
--- /dev/null
+++ b/config/polybar/hack/launch.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+# Add this script to your wm startup file.
+
+DIR="$HOME/.config/polybar/hack"
+
+# Terminate already running bar instances
+killall -q polybar
+
+# Wait until the processes have been shut down
+while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
+
+# Launch the bar
+polybar -q top -c "$DIR"/config.ini &
+polybar -q bottom -c "$DIR"/config.ini &