From 997d091fc679947ec1ec7930861b2f1e4233955b Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Wed, 9 Aug 2023 18:21:25 +0200 Subject: [PATCH] Polybar spawn dock on primary monitor --- bin/bar | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/bar b/bin/bar index bdd748a..fca99d9 100755 --- a/bin/bar +++ b/bin/bar @@ -3,7 +3,10 @@ set -x if type "xrandr"; then - for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do + for m in $(xrandr --query | grep " connected" |grep "primary" | cut -d" " -f1); do + MONITOR=$m polybar --reload dwm & + done + for m in $(xrandr --query | grep " connected" |grep -v "primary" | cut -d" " -f1); do MONITOR=$m polybar --reload dwm & done else