From 8d0d94a854b238a2bd92dcb332c4e524bcd326bb Mon Sep 17 00:00:00 2001 From: Lilou <quentinduchemin@tuta.io> Date: Wed, 1 Jan 2025 20:35:19 +0100 Subject: [PATCH] [Polybar] Hackish script to get front screen --- .config/polybar/scripts/launch_polybar.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/polybar/scripts/launch_polybar.sh b/.config/polybar/scripts/launch_polybar.sh index c1f59c4..1d6792f 100755 --- a/.config/polybar/scripts/launch_polybar.sh +++ b/.config/polybar/scripts/launch_polybar.sh @@ -3,7 +3,7 @@ source ~/.config/polybar/.env names=("chostybottombar" "chostytopbar") killall -q polybar while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done -monitor=$(xrandr --query | grep " connected" | grep "primary" | cut -d" " -f1) +monitor=$(xrandr --query | grep " connected" | cut -d" " -f1 | head -1) for name in ${names[@]}; do MONITOR=${monitor} polybar -q --reload ${name} & done