diff --git a/configs/airootfs/usr/local/bin/omarchy-install-dashboard b/configs/airootfs/usr/local/bin/omarchy-install-dashboard index 29f1cd2..31a9bba 100755 --- a/configs/airootfs/usr/local/bin/omarchy-install-dashboard +++ b/configs/airootfs/usr/local/bin/omarchy-install-dashboard @@ -185,7 +185,7 @@ progress_bar() { (( pct > 100 )) && pct=100 filled=$(( pct * width / 100 )) empty=$(( width - filled )) - printf '%s%s%s%s%s %3d%%' "$GREEN" "$(repeat █ "$filled")" "$DARK" "$(repeat ░ "$empty")" "$RESET" "$pct" + printf '%s%s%s%s%s' "$GREEN" "$(repeat █ "$filled")" "$DARK" "$(repeat ░ "$empty")" "$RESET" } install_progress() { @@ -245,24 +245,21 @@ render_static() { } render_dynamic() { - local frame="$1" pct spin + local frame="$1" pct pct="$(install_progress)" [[ $pct =~ ^[0-9]+$ ]] || pct=$LAST_PCT (( pct > 100 )) && pct=100 (( pct < LAST_PCT )) && pct=$LAST_PCT LAST_PCT=$pct - spin=("◐" "◓" "◑" "◒") printf '%s%d;1H' "$CSI" "$DYNAMIC_ROW" center "Installing Omarchy" "$CONTENT_WIDTH" blank_line - line_at "$CONTENT_WIDTH" $(( (CONTENT_WIDTH - 40) / 2 )) "" + line_at "$CONTENT_WIDTH" $(( (CONTENT_WIDTH - 34) / 2 )) "" progress_bar "$pct" 34 printf '\n' blank_line - center "${GREEN}${spin[$((frame % 4))]} $(current_whimsy "$frame" "$pct") ${RESET}" "$CONTENT_WIDTH" - blank_line - center "${DIM}Logs are being saved for support${RESET}" "$CONTENT_WIDTH" + center "${GREEN}$(current_whimsy "$frame" "$pct")${RESET}" "$CONTENT_WIDTH" printf '%s' "$CLEAR_TO_END" } @@ -306,24 +303,32 @@ PY } render_finish() { - local duration message cols - cols="$(term_cols)" + local duration effect_canvas_width duration="$(install_duration || true)" - message="Finished installing" - [[ -n $duration ]] && message="Installed in $duration" + duration="${duration:-Complete}" + effect_canvas_width="$(term_cols)" + (( effect_canvas_width > 1 )) && effect_canvas_width=$((effect_canvas_width - 1)) { printf '%s%s' "$SHOW_CURSOR" "$CLEAR" + blank_line render_logo blank_line - center "$message" "$cols" + center "Installed Omarchy" "$CONTENT_WIDTH" blank_line + line_at "$CONTENT_WIDTH" $(( (CONTENT_WIDTH - 34) / 2 )) "" + progress_bar 100 34 + printf '\n' + blank_line + center "${GREEN}${duration}${RESET}" "$CONTENT_WIDTH" } >"$TTY_PATH" if command -v tte >/dev/null 2>&1 && command -v timeout >/dev/null 2>&1 && [[ -f $LOGO_PATH ]]; then - printf '%s%d;1H' "$CSI" "$((LOGO_HEIGHT + 1))" >"$TTY_PATH" + # TTE reuse mode restores a saved cursor before moving up over its input. + # Save this anchor so the effect redraws the same logo rows shown above. + printf '%s%d;1H\0337' "$CSI" "$((LOGO_HEIGHT + 2))" >"$TTY_PATH" timeout 8s tte -i "$LOGO_PATH" \ - --canvas-width 0 \ + --canvas-width "$effect_canvas_width" \ --anchor-text c \ --frame-rate 60 \ --reuse-canvas \ @@ -334,7 +339,7 @@ render_finish() { --final-gradient-stops 9ece6a \ --final-gradient-steps 1 \ >"$TTY_PATH" 2>/dev/null || true - printf '%s%d;1H' "$CSI" "$((LOGO_HEIGHT + 5))" >"$TTY_PATH" + printf '%s%d;1H' "$CSI" "$((LOGO_HEIGHT + 8))" >"$TTY_PATH" fi }