FollieHiyuki-dotfiles/home/.config/polybar/run_polybar.sh
2021-02-13 19:28:59 +03:00

18 lines
446 B
Bash
Executable File

#!/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..."