From 0fe0c86593022ed575b8c1019268a0b12f2200fa Mon Sep 17 00:00:00 2001 From: Asocia Date: Tue, 13 Jul 2021 23:24:58 +0300 Subject: [PATCH] Show polybar in multiple monitors --- .config/polybar/config | 1 + .config/polybar/launch.sh | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.config/polybar/config b/.config/polybar/config index 36d54c8..8bdcc96 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -52,6 +52,7 @@ black = #181a1c [bar/main] + monitor = ${env:MONITOR:} width = 100% offset-x = 0 offset-y = 0 diff --git a/.config/polybar/launch.sh b/.config/polybar/launch.sh index 0854740..0733792 100755 --- a/.config/polybar/launch.sh +++ b/.config/polybar/launch.sh @@ -1,4 +1,6 @@ #!/bin/bash pkill polybar -polybar -r main & +for m in $(polybar --list-monitors | cut -d":" -f1); do + MONITOR=$m polybar --reload main & +done