#! /bin/bash # loads polybar one every monitor if type "xrandr"; then for monitor in $(xrandr --query | grep " connected" | cut -d" " -f1); do MONITOR=$monitor polybar --reload main-bar & done else polybar --reload main-bar & fi