From 7d2d5228ec11bf36158d26d240c52d90f48d471c Mon Sep 17 00:00:00 2001 From: Salt Date: Sun, 21 Jan 2018 16:44:53 -0600 Subject: [PATCH] Polybar: Fix startup script Should probably reference the CONTENTS of that variable instead... --- .config/polybar/start.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.config/polybar/start.sh b/.config/polybar/start.sh index 1ecdfbb6..341123e2 100755 --- a/.config/polybar/start.sh +++ b/.config/polybar/start.sh @@ -20,16 +20,18 @@ export PB_MONITOR=$(xrandr -q | awk '/\/{print $1}') if [[ $PB_MONITOR == "" ]]; then exit 1 fi +printf '[INFO] Starting Polybar primary on monitor $PB_MONITOR' polybar -r primary-top& # ...and then moving on to secondaries, if we have them # Alright, now this looks *really* bad, but there's no way in hell you can get # me to attempt to solve this with regex. Fuck regex. It starts more problems # than it solves export secondary_monitors=$(xrandr -q | grep ' connected' | grep -v 'primary' | awk '{print $1}') -if [[ $PB_MONITOR == "" ]]; then +if [[ $secondary_monitors == "" ]]; then exit 0 fi -for monitor in secondary_monitors; do +for monitor in $secondary_monitors; do + printf '[INFO] Starting Polybar secondary on monitor $monitor' PB_MONITOR=$monitor polybar -r secondary-top done