From ca1472c5c2a775bd19fd3ffac8d3509db57aad78 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 10 May 2017 20:57:21 +0200 Subject: [PATCH] os/+arch: polybar: refactor run.sh --- os/+arch/.config/polybar/run.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/os/+arch/.config/polybar/run.sh b/os/+arch/.config/polybar/run.sh index 9d1be12e..c8375cd4 100755 --- a/os/+arch/.config/polybar/run.sh +++ b/os/+arch/.config/polybar/run.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash -killall -q polybar -while pgrep -x polybar >/dev/null; do sleep 1; done +if pgrep polybar; then + killall -q polybar + while pgrep -x polybar >/dev/null; do sleep 1; done +fi -polybar main >~/.config/polybar/polybar.log 2>&1 & +polybar main >>~/.config/polybar/polybar.log 2>&1 &