From 950b9e4df00631631ab7e33c045e8399e37aff4e Mon Sep 17 00:00:00 2001 From: Joursoir Date: Wed, 23 Mar 2022 18:28:47 +0300 Subject: dotconfig/polybar: add launch script --- dotconfig/polybar/launch.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 dotconfig/polybar/launch.sh 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..." -- cgit v1.2.3-18-g5258