Send Global back to the VT, keep a US keyboard in the CJK console and translate the media diagnosis

This commit is contained in:
ZacharyZhang-NY committed 2026-10-06 18:44:49 -04:00
1 parent 555093811f
commit 02c803cb40
5 files changed
+103 -37

No files matched your search

+14 -12
View File
@@ -271,12 +271,14 @@ notice() {
# STEP 1: KEYBOARD LAYOUT
# China reads in Chinese only where the console draws CJK. On the VT,
# .automated_script.sh sets OMARCHY_CJK_RELAUNCH and reruns us in one.
# .automated_script.sh moves China into the CJK console and Global back to the VT, which applies keymaps.
apply_region_language() {
if [[ $region == "china" && -n ${OMARCHY_CJK_RELAUNCH:-} ]]; then
exit "$OMARCHY_CJK_RELAUNCH"
fi
if [[ $region == "global" && -n ${OMARCHY_VT_RETURN:-} ]]; then
exit "$OMARCHY_VT_RETURN"
fi
if [[ $region == "china" && -n ${OMARCHY_CJK_CONSOLE:-} ]]; then
export OMARCHY_INSTALL_LANG=zh
else
@@ -297,15 +299,16 @@ keyboard_form() {
say --foreground 8 "$(omarchy_text "Press Ctrl+C to prepare this machine for another owner.")"
echo
if $ask_region; then
omarchy_prompt_region && status=0 || status=$?
else
status=0
fi
ask_region=true
omarchy_prompt_region && status=0 || status=$?
if ((status == 0)); then
apply_region_language
omarchy_prompt_keyboard && status=0 || status=$?
# cage keeps its US layout, so the CJK console offers no other.
if [[ -n ${OMARCHY_CJK_CONSOLE:-} ]]; then
keyboard="us"
keyboard_label="English (US)"
else
omarchy_prompt_keyboard && status=0 || status=$?
fi
fi
((status == 0)) && break
@@ -1128,16 +1131,15 @@ select_installation() {
defer_provisioning=false
install_target="full_disk"
# A relaunch in the CJK console arrives with the region already chosen.
# A rerun in the other console arrives with the region already chosen.
region="${OMARCHY_INSTALL_REGION:-global}"
ask_region=true
# Let the live VT reach its settled width before the first screen so the logo
# isn't measured against the transient 80-column boot console.
wait_for_stable_terminal
if [[ -n ${OMARCHY_INSTALL_REGION:-} ]]; then
ask_region=false
apply_region_language
else
greeter
fi