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

16 lines
409 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
if type "xrandr"; then
monitors=$(xrandr --query | grep " connected" | cut -d" " -f1)
monarray=($monitors)
for name in ${names[@]}; do
for mon in ${monarray[@]}; do
MONITOR=${mon} polybar -q --reload ${name} &
done
done
else
polybar --reload ${name} &
fi