Update launch.sh

i3
yutent 2023-06-28 22:22:28 +08:00 committed by GitHub
parent acdee41afa
commit b0a373aa7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 8 deletions

View File

@ -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 &
# 干掉旧进程
pkill polybar
# 等待1秒再启动新的
sleep 1
polybar main -r &