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

10 lines
304 B
Bash
Raw Normal View History

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