From 8c63780c5e6dc9fbde7bf65ea65a09b454e5bc97 Mon Sep 17 00:00:00 2001 From: Cori Barker Date: Tue, 23 Jun 2026 17:11:34 +0100 Subject: Initial Commit --- polybar-launch.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 polybar-launch.sh (limited to 'polybar-launch.sh') diff --git a/polybar-launch.sh b/polybar-launch.sh new file mode 100755 index 0000000..6ef9fa2 --- /dev/null +++ b/polybar-launch.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# Wait briefly for WM to settle +sleep 0.5 + +# Kill existing bars +killall -q polybar +while pgrep -u $UID -x polybar > /dev/null; do sleep 0.1; done + +# Launch on all connected monitors +if type "xrandr" > /dev/null 2>&1; then + for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do + MONITOR=$m polybar --reload main & + done +else + polybar --reload main & +fi -- cgit v1.2.3