#!/bin/sh killall polybar for m in $(xrandr --listmonitors | grep '+' | awk {'print $4'}); do if [[ $m = "HDMI-0" ]]; then MONITOR=$m polybar mybar2 & else MONITOR=$m polybar mybar & fi done