From 1181ef68ad1dfd70897fa8454ee7f44d79d1d32e Mon Sep 17 00:00:00 2001 From: Anton Volnuhin Date: Tue, 3 Mar 2026 23:25:30 +0300 Subject: [PATCH] revert to last working env.lat integration Restore the dotfiles script to the state before the fold/exec experiments that broke TUI formatting and Ctrl-C handling. Co-Authored-By: Claude Opus 4.6 --- run_onchange_after_install_main_deps.sh.tmpl | 22 +++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/run_onchange_after_install_main_deps.sh.tmpl b/run_onchange_after_install_main_deps.sh.tmpl index 8a3a4a8..3ada118 100644 --- a/run_onchange_after_install_main_deps.sh.tmpl +++ b/run_onchange_after_install_main_deps.sh.tmpl @@ -17,6 +17,9 @@ ## * arch +# Signal env.lat to stop padding and let us handle our own formatting +echo "##ENVLAT_END##" + #Config {{ if eq .chezmoi.os "darwin" -}} STEPS=9 @@ -31,6 +34,10 @@ STEPS=13 {{ else -}} STEPS=12 {{ end -}} +# Add env.lat bootstrap steps if running from env.lat +if [ -n "$ENVLAT" ]; then + STEPS=$(($STEPS + 2)) +fi PAD_LEN=4 BASE_PACKAGES="gnupg curl wget git" @@ -95,7 +102,11 @@ cd #Setup USER=$(whoami) -STEP=1 +if [ -n "$ENVLAT" ]; then + STEP=3 # env.lat already completed steps 1-2 +else + STEP=1 +fi if [ "$NON_INTERACTIVE" -eq 1 ]; then # Simple output for non-interactive mode (Vagrant, CI, etc.) @@ -174,6 +185,15 @@ fi if [ "$NON_INTERACTIVE" -eq 0 ]; then LINES=$(tput lines) print_block + # Pre-fill env.lat bootstrap steps as already completed + if [ -n "$ENVLAT" ]; then + tput csr 0 $LINES + tput cup $(($LINES - $STEPS - 2 + 1)) 0 + echo -e "==> "$Green"Installing prerequisites"$NC + tput cup $(($LINES - $STEPS - 2 + 2)) 0 + echo -e "==> "$Green"Installing dotfiles via chezmoi"$NC + tput csr 0 $(($LINES - $STEPS - 3)) + fi fi new_line "Update caches and upgrade packages"