aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2022-03-23 18:28:47 +0300
committerJoursoir <chat@joursoir.net>2022-03-23 18:28:47 +0300
commit950b9e4df00631631ab7e33c045e8399e37aff4e (patch)
tree3e90658e4cd7233ab938fbc6007cc8d859011c61
parent9eb3ed9b1f8f55fabc71f6ca3bd1aea3ad413363 (diff)
downloaddotfiles-950b9e4df00631631ab7e33c045e8399e37aff4e.tar.gz
dotfiles-950b9e4df00631631ab7e33c045e8399e37aff4e.tar.bz2
dotfiles-950b9e4df00631631ab7e33c045e8399e37aff4e.zip
dotconfig/polybar: add launch script
-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..."