summaryrefslogtreecommitdiffstats
path: root/.local/bin/launch_polybar
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-11-27 08:13:58 -0500
committerLuke Smith <luke@lukesmith.xyz>2019-11-27 08:13:58 -0500
commit3b701b74f2c2cdbc4d58d8010f62dd2e45a01fce (patch)
tree9a646c07406008a48e15fd2c3426fa18bc4f26d1 /.local/bin/launch_polybar
parent0578a928fdf69b21e3dc4b1c9b5f526e39766ae4 (diff)
downloadeibhear-3b701b74f2c2cdbc4d58d8010f62dd2e45a01fce.tar.gz
eibhear-3b701b74f2c2cdbc4d58d8010f62dd2e45a01fce.tar.zst
eibhear-3b701b74f2c2cdbc4d58d8010f62dd2e45a01fce.zip
polybar launch moved to bin
Diffstat (limited to '.local/bin/launch_polybar')
-rwxr-xr-x.local/bin/launch_polybar12
1 files changed, 12 insertions, 0 deletions
diff --git a/.local/bin/launch_polybar b/.local/bin/launch_polybar
new file mode 100755
index 0000000..ea383cc
--- /dev/null
+++ b/.local/bin/launch_polybar
@@ -0,0 +1,12 @@
+#!/bin/bash
+#!/usr/bin/env sh
+
+# Terminate already running bar instances
+killall -q polybar
+
+# Wait until the processes have been shut down
+while pgrep -x polybar >/dev/null; do sleep 1; done
+
+for i in $(polybar -m | awk -F: '{print $1}'); do MONITOR=$i polybar example -c ~/.config/polybar/config & done
+
+echo "Bars launched..."