aboutsummaryrefslogtreecommitdiff
path: root/src/config/files/polybar/launch.sh
diff options
context:
space:
mode:
authorAaditya Dhruv <[email protected]>2023-09-09 23:09:21 -0500
committerAaditya Dhruv <[email protected]>2023-09-09 23:09:21 -0500
commit39044cddeeba5ad91402f8abfb2a286e48a4f50d (patch)
tree5187a5cba1e6f437e59310f17956f16e3638d291 /src/config/files/polybar/launch.sh
parent1811600f4f2547a6116e1cc1c91f8cf89adcac6b (diff)
Move files for config role
This movement is needed to maintain the role structure
Diffstat (limited to 'src/config/files/polybar/launch.sh')
-rwxr-xr-xsrc/config/files/polybar/launch.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/config/files/polybar/launch.sh b/src/config/files/polybar/launch.sh
new file mode 100755
index 0000000..68ca15b
--- /dev/null
+++ b/src/config/files/polybar/launch.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+# Add this script to your wm startup file.
+
+DIR="$HOME/.config/polybar"
+
+# 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 main -c "$DIR"/config.ini &