From 0890472c9b4bec93b59e140ccab0fd9a44a44de5 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Sat, 23 May 2026 02:14:13 -0400 Subject: [PATCH] installer: pass dashboard tty explicitly --- configs/airootfs/root/.automated_script.sh | 4 +++- .../usr/local/bin/omarchy-install-dashboard | 15 ++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/configs/airootfs/root/.automated_script.sh b/configs/airootfs/root/.automated_script.sh index 0c69e64..24dbf98 100644 --- a/configs/airootfs/root/.automated_script.sh +++ b/configs/airootfs/root/.automated_script.sh @@ -45,8 +45,10 @@ cd /root # Keep the actual install screen calm: the dashboard owns /dev/tty while the # noisy installer stream is captured to the support log. +dashboard_tty=$(tty) +export OMARCHY_DASHBOARD_TTY="$dashboard_tty" rm -f /run/omarchy-install/dashboard.stop -setsid /usr/local/bin/omarchy-install-dashboard "$OMARCHY_INSTALL_LOG_FILE" /run/omarchy-install/state.json >/dev/tty 2>&1 & +setsid /usr/local/bin/omarchy-install-dashboard "$OMARCHY_INSTALL_LOG_FILE" /run/omarchy-install/state.json <"$dashboard_tty" >"$dashboard_tty" 2>&1 & dashboard_pid=$! export OMARCHY_INSTALL_DASHBOARD_PID="$dashboard_pid" diff --git a/configs/airootfs/usr/local/bin/omarchy-install-dashboard b/configs/airootfs/usr/local/bin/omarchy-install-dashboard index 57608e2..2036ab4 100755 --- a/configs/airootfs/usr/local/bin/omarchy-install-dashboard +++ b/configs/airootfs/usr/local/bin/omarchy-install-dashboard @@ -9,6 +9,7 @@ STATE_FILE="${2:-/run/omarchy-install/state.json}" STATE_DIR="$(dirname "$STATE_FILE")" STOP_FILE="$STATE_DIR/dashboard.stop" LOGO_PATH="${OMARCHY_PATH:-/usr/share/omarchy}/logo.txt" +TTY_PATH="${OMARCHY_DASHBOARD_TTY:-/dev/tty}" CSI=$'\033[' RESET="${CSI}0m" @@ -43,12 +44,12 @@ whimsy=( ) cleanup() { - printf '%s%s' "$RESET" "$SHOW_CURSOR" >/dev/tty 2>/dev/null || true + printf '%s%s' "$RESET" "$SHOW_CURSOR" >"$TTY_PATH" 2>/dev/null || true } trap cleanup EXIT trap 'cleanup; exit 0' INT TERM -term_size() { stty size 2>/dev/null /dev/null <"$TTY_PATH" || printf '24 80\n'; } term_cols() { local size; size="$(term_size)"; printf '%s\n' "${size#* }"; } repeat() { @@ -232,12 +233,16 @@ render_dynamic() { printf '%s' "$CLEAR_TO_END" } -printf '%s' "$HIDE_CURSOR" >/dev/tty -render_static >/dev/tty +if [[ ! -e $TTY_PATH ]]; then + exit 0 +fi + +printf '%s' "$HIDE_CURSOR" >"$TTY_PATH" +render_static >"$TTY_PATH" frame=0 while true; do [[ -e $STOP_FILE ]] && break - render_dynamic "$frame" >/dev/tty + render_dynamic "$frame" >"$TTY_PATH" if install_finished || [[ -e $STOP_FILE ]]; then sleep 1 break