From 83f36f983921a8aa72141778db8454c7b1d3cbe5 Mon Sep 17 00:00:00 2001 From: adamstuck Date: Wed, 9 Mar 2022 10:13:26 +0100 Subject: polybar: auto multiple screen --- .config/polybar/config.ini | 1 + .config/polybar/launch | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini index 6bed730..fad5900 100644 --- a/.config/polybar/config.ini +++ b/.config/polybar/config.ini @@ -15,6 +15,7 @@ alert = #bd2c40 [bar/bar1] +monitor = ${env:MONITOR:} width = 100% height = 30 ;offset-x = 1% diff --git a/.config/polybar/launch b/.config/polybar/launch index 68d5cf2..cf23f0b 100755 --- a/.config/polybar/launch +++ b/.config/polybar/launch @@ -5,7 +5,11 @@ killall -q polybar # If all your bars have ipc enabled, you can also use # polybar-msg cmd quit -# Launch bar1 -echo "---" | tee -a /tmp/polybar1.log -polybar bar1 2>&1 | tee -a /tmp/polybar1.log & disown -echo "Bar launched..." +# # Launch bar1 +# echo "---" | tee -a /tmp/polybar1.log +# polybar bar1 2>&1 | tee -a /tmp/polybar1.log & disown +# echo "Bar launched..." + +for m in $(polybar --list-monitors | cut -d":" -f1); do + MONITOR=$m polybar --reload bar1 & +done -- cgit v1.2.3-70-g09d2