FollieHiyuki-dotfiles/home/.config/polybar/run_polybar.sh

18 lines
446 B
Bash
Raw Normal View History

2021-02-13 11:28:59 -05:00
#!/bin/bash
# Terminate already running bar instances
killall polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch Polybar
polybar --reload -c $HOME/.config/polybar/nord/config.ini mainbar &
monitor=$(xrandr --query | grep 'HDMI-2')
if [[ $monitor = *connected* ]]; then
polybar --reload -c $HOME/.config/polybar/nord/config.ini sidebar &
fi
echo "Polybar launched..."