From b0a373aa7bb12d6de899ae5d1b0080ae0102820f Mon Sep 17 00:00:00 2001 From: yutent Date: Wed, 28 Jun 2023 22:22:28 +0800 Subject: [PATCH] Update launch.sh --- home/config/polybar/launch.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/home/config/polybar/launch.sh b/home/config/polybar/launch.sh index 5e753d0..1fbca1d 100755 --- a/home/config/polybar/launch.sh +++ b/home/config/polybar/launch.sh @@ -1,10 +1,7 @@ #!/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 -polybar main -r & \ No newline at end of file +# 干掉旧进程 +pkill polybar +# 等待1秒再启动新的 +sleep 1 +polybar main -r &