summaryrefslogtreecommitdiff
path: root/.i3/start_polybar.sh
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2019-05-02 23:23:44 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2019-05-02 23:23:44 +0200
commit766c3e82264f86c8bffa5fe8ddf956f449d82026 (patch)
tree288a12d0f74790013811e89b2f0ec9cef145ffba /.i3/start_polybar.sh
parent03a071affee747bc66201114fba2a5fb29359caa (diff)
downloaddotfiles-766c3e82264f86c8bffa5fe8ddf956f449d82026.tar.gz
Added polybar
Diffstat (limited to '.i3/start_polybar.sh')
-rwxr-xr-x.i3/start_polybar.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/.i3/start_polybar.sh b/.i3/start_polybar.sh
new file mode 100755
index 0000000..38b46f6
--- /dev/null
+++ b/.i3/start_polybar.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# 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 Polybar, using default config location ~/.config/polybar/config
+polybar $1 &
+
+echo "Polybar launched..."