diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2021-08-28 15:06:00 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2021-08-28 15:06:00 +0200 |
commit | 333679134590662347c4f5dd5ba6ee68472e4565 (patch) | |
tree | 6f3b932975652e442334e60d3ae4590154558c29 /scripts | |
parent | eacc39d064178bb03b0991ad7632e6b483db2780 (diff) | |
download | dotfiles-333679134590662347c4f5dd5ba6ee68472e4565.tar.gz |
polybar
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 ':')" |