diff options
author | Justine Smithies <justine@smithies.me.uk> | 2024-06-10 20:34:36 +0100 |
---|---|---|
committer | Justine Smithies <justine@smithies.me.uk> | 2024-06-10 20:34:36 +0100 |
commit | 09f921dc6afa51a7c1f504328f37233aa25a6ea2 (patch) | |
tree | ef1fe6460d77b631b84feb6589e02ec0818a67f2 /.config/eww/scripts | |
parent | 837b37002b56f4490c702c055bc44d5905832fc8 (diff) |
Stopped nonexistent monitor being opened by eww
Diffstat (limited to '.config/eww/scripts')
-rwxr-xr-x | .config/eww/scripts/start.sh | 10 |
1 files changed, 7 insertions, 3 deletions
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 |