From 09f921dc6afa51a7c1f504328f37233aa25a6ea2 Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Mon, 10 Jun 2024 20:34:36 +0100 Subject: Stopped nonexistent monitor being opened by eww --- .config/eww/scripts/start.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to '.config/eww/scripts/start.sh') diff --git a/.config/eww/scripts/start.sh b/.config/eww/scripts/start.sh index 628fa77..45f1946 100755 --- a/.config/eww/scripts/start.sh +++ b/.config/eww/scripts/start.sh @@ -5,8 +5,12 @@ eww kill # start a bar for each monitor monitors=$(wlr-randr | grep "^[^ ]" | awk '{ print$1 }' | wc -l | xargs) - -for ((i = 0 ; i < $monitors ; i++)); do +total=$(wlr-randr | grep "^[^ ]" | awk '{ print$1 }' | wc -l | xargs) +monitors=$(($monitors-1)) +# for ((i = 0 ; i < $monitors ; i++)); do +for ((i = $monitors ; i >= 0 ; i-=1)); do eww open bar${i} done - +if [ "$total" -gt "1" ]; then + riverctl focus-output HDMI-A-1 +fi -- cgit v1.2.3