From 2e2bad65a2dfc3771f7c175a4e9f85edcab130a2 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Wed, 10 Dec 2025 14:27:53 +0100 Subject: [PATCH] polybar: Change `while read` loop to an xargs pipe --- .config/polybar/launch.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.config/polybar/launch.sh b/.config/polybar/launch.sh index caa6059..3aabaec 100755 --- a/.config/polybar/launch.sh +++ b/.config/polybar/launch.sh @@ -22,10 +22,11 @@ done if ! pgrep -ax polybar >/dev/null 2>&1; then # launch Polybar on every monitor # https://github.com/polybar/polybar/issues/763 - while read -r m; do - export MONITOR="${m%%:*}" - polybar --reload -c "$BASE_DIR/config" main & - done <<<"$(polybar --list-monitors)" + polybar --list-monitors \ + | cut -d: -f1 \ + | xargs -I'{}' -P0 \ + env MONITOR='{}' \ + polybar --reload -c "$BASE_DIR/config" main & echo "Polybar launched..." else