dotfiles/.config/polybar/scripts/launch_polybar.sh

9 lines
302 B
Bash
Executable File

#!/usr/bin/env bash
names=("chostybottombar" "chostytopbar")
killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
monitor=$(xrandr --query | grep "connected" | grep "primary" | cut -d" " -f1)
for name in ${names[@]}; do
MONITOR=${monitor} polybar -q --reload ${name} &
done