diff --git a/configs/airootfs/usr/local/bin/omarchy-install-dashboard b/configs/airootfs/usr/local/bin/omarchy-install-dashboard index 82e1f34..c40721d 100755 --- a/configs/airootfs/usr/local/bin/omarchy-install-dashboard +++ b/configs/airootfs/usr/local/bin/omarchy-install-dashboard @@ -123,7 +123,16 @@ repeat() { logo_width() { if [[ -f $LOGO_PATH ]]; then - awk '{ if (length > max) max = length } END { print max+0 }' "$LOGO_PATH" + # The logo is drawn in box-drawing glyphs, three bytes each in UTF-8, so + # awk's `length` returns 197 rather than 81 unless the locale happens to be + # UTF-8 — and a width wider than the console makes left_padding clamp to + # zero, which puts the logo flush left. Count bytes deliberately (LC_ALL=C) + # and drop the continuation bytes instead, so the answer is columns in every + # locale rather than only in the ones that have a charset. + LC_ALL=C awk ' + { gsub(/[\200-\277]/, ""); if (length > max) max = length } + END { print max+0 } + ' "$LOGO_PATH" else printf '81\n' fi