You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dotfiles/bin/polybar-launch.sh

15 lines
394 B
Bash

#! /bin/bash
# kills any polybar currently on
killall -q polybar
# wait for termination
while pgrep -x polybar >/dev/null; do sleep 1; done
# loads polybar one every monitor based on calling param
if type "xrandr"; then
for monitor in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$monitor polybar --reload $1 &
done
else
polybar --reload main-bar &
fi