aboutsummaryrefslogtreecommitdiffstats
path: root/dotconfig/polybar/launch.sh
blob: 510d0979304bf63622696de774e9475ad63bd555 (plain)
1
2
3
4
5
6
7
8
9
10
11
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..."