summaryrefslogtreecommitdiff
path: root/scripts/polybar.sh
diff options
context:
space:
mode:
authorMartial Simon <msimon_fr@hotmail.com>2025-10-03 11:32:23 +0200
committerMartial Simon <msimon_fr@hotmail.com>2025-10-03 11:32:23 +0200
commite65c0b0ab8f299183ba74d183eecf379a11d2ffe (patch)
treef08797a1e7c01f5f98304ba53ce1451159eaefba /scripts/polybar.sh
parent4209b5d81e553b2235056e7c4243b664bdd0dc20 (diff)
add: lock & polybar
Diffstat (limited to 'scripts/polybar.sh')
-rwxr-xr-xscripts/polybar.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/polybar.sh b/scripts/polybar.sh
new file mode 100755
index 0000000..ca6d41d
--- /dev/null
+++ b/scripts/polybar.sh
@@ -0,0 +1,10 @@
+#!/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
+
+# Launch polybar
+polybar i3_bar &