Update .config/polybar/launch.sh

This commit is contained in:
punkfairie 2024-10-01 20:13:56 -07:00
parent 4f34f9166f
commit d97d55f378
Signed by: punkfairie
GPG key ID: A86AF57F837E320F

View file

@ -20,7 +20,13 @@ launch_bar()
else
if type "xrandr" &>/dev/null; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar -q main -c "$dir/$style/config.ini" &
bar="main"
if [[ "$m" == "DP-0" ]]; then
bar="tray"
fi
MONITOR=$m polybar -q "$bar" -c "$dir/$style/config.ini" &
done
else
polybar -q main -c "$dir/$style/config.ini" &