From c0d17922f9f9ec276e6ae60ecf667ff803925f4d Mon Sep 17 00:00:00 2001 From: Thies Lennart Alff Date: Mon, 25 Sep 2023 09:55:37 +0200 Subject: [PATCH] show polybar on all displays --- .config/polybar/config.ini | 2 ++ .config/polybar/launch.sh | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini index a41674e..0cd8c85 100644 --- a/.config/polybar/config.ini +++ b/.config/polybar/config.ini @@ -26,6 +26,7 @@ alert = #E60053 disabled = #707880 [bar/bar1] +monitor = ${env:MONITOR:} width = 100% height = 24pt radius = 6 @@ -72,6 +73,7 @@ tray-maxsize = 96 ; override-redirect = true [module/xworkspaces] +pin-workspaces = true type = internal/xworkspaces label-active = %name% diff --git a/.config/polybar/launch.sh b/.config/polybar/launch.sh index d432329..ba385df 100755 --- a/.config/polybar/launch.sh +++ b/.config/polybar/launch.sh @@ -4,4 +4,12 @@ polybar-msg cmd quit echo "---" | tee -a /tmp/polybar1.log -polybar bar1 2>&1 | tee -a /tmp/polybar1.log & disown +if type "xrandr"; then + for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do + MONITOR=$m polybar --reload bar1 & + done +else + polybar --reload bar1 & +fi + +# polybar bar1 2>&1 | tee -a /tmp/polybar1.log & disown