diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/launch_polybar.sh | 14 |
1 files changed, 10 insertions, 4 deletions
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 ':')" |