From 333679134590662347c4f5dd5ba6ee68472e4565 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sat, 28 Aug 2021 15:06:00 +0200 Subject: polybar --- scripts/launch_polybar.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/launch_polybar.sh b/scripts/launch_polybar.sh index a72da57..a340d93 100755 --- a/scripts/launch_polybar.sh +++ b/scripts/launch_polybar.sh @@ -1,7 +1,13 @@ #!/bin/bash -killall polybar +killall polybar > /dev/null 2>&1 -for m in $(polybar --list-monitors | cut -d":" -f1); do - MONITOR=$m polybar --reload jonny & -done +while read -r MON RES PRIM; do + if [ -n "$PRIM" ]; then + BAR=main + else + BAR=secondary + fi + + MONITOR=$MON polybar --reload $BAR & +done <<< "$(polybar --list-monitors | tr -d ':')" -- cgit v1.2.3