Send Global back to the VT, keep a US keyboard in the CJK console and translate the media diagnosis
This commit is contained in:
1 parent
555093811f
commit
02c803cb40
5 files changed
+103
-37
No files matched your search
@@ -102,24 +102,35 @@ if /usr/local/bin/omarchy-cidata-load; then
|
||||
echo "Autoinstall configuration found on cidata drive; skipping the configurator."
|
||||
export OMARCHY_UI_INTERACTIVE=no
|
||||
else
|
||||
# The configurator exits with this after China is picked on the VT, which
|
||||
# cannot draw Chinese. cage + foot rerun this script in a console that can.
|
||||
# China moves to cage + foot, which draw Chinese; Global moves back to the VT, which applies keymaps.
|
||||
cjk_relaunch=10
|
||||
if [[ -z ${OMARCHY_CJK_CONSOLE:-} ]] && command -v cage >/dev/null; then
|
||||
vt_return=11
|
||||
if [[ -n ${OMARCHY_CJK_CONSOLE:-} ]]; then
|
||||
export OMARCHY_VT_RETURN=$vt_return
|
||||
elif command -v cage >/dev/null; then
|
||||
export OMARCHY_CJK_RELAUNCH=$cjk_relaunch
|
||||
fi
|
||||
./configurator && status=0 || status=$?
|
||||
unset OMARCHY_CJK_RELAUNCH
|
||||
if ((status == cjk_relaunch)); then
|
||||
while ((status == cjk_relaunch)); do
|
||||
cjk_runtime=/run/omarchy-cjk-console
|
||||
mkdir -p -m 700 "$cjk_runtime"
|
||||
rm -f "$cjk_runtime/cjk-console-started"
|
||||
status=0
|
||||
XDG_RUNTIME_DIR=$cjk_runtime OMARCHY_CJK_CONSOLE=1 OMARCHY_INSTALL_REGION=china LANG=C.UTF-8 WLR_RENDERER=pixman \
|
||||
cage -- foot -c /usr/share/omarchy-iso/foot.ini "$0" || status=$?
|
||||
[[ -f $cjk_runtime/cjk-console-started ]] && exit "$status"
|
||||
echo "The Chinese console could not start (cage exit $status); continuing in English."
|
||||
OMARCHY_INSTALL_REGION=china ./configurator && status=0 || status=$?
|
||||
rm -f "$cjk_runtime/cjk-console-started" "$cjk_runtime/return-to-vt"
|
||||
cage_status=0
|
||||
env -u OMARCHY_CJK_RELAUNCH XDG_RUNTIME_DIR=$cjk_runtime OMARCHY_CJK_CONSOLE=1 OMARCHY_INSTALL_REGION=china \
|
||||
LANG=C.UTF-8 WLR_RENDERER=pixman cage -- foot -c /usr/share/omarchy-iso/foot.ini "$0" || cage_status=$?
|
||||
if [[ -f $cjk_runtime/return-to-vt ]]; then
|
||||
OMARCHY_INSTALL_REGION=global ./configurator && status=0 || status=$?
|
||||
elif [[ -f $cjk_runtime/cjk-console-started ]]; then
|
||||
exit "$cage_status"
|
||||
else
|
||||
echo "The Chinese console could not start (cage exit $cage_status); continuing in English."
|
||||
unset OMARCHY_CJK_RELAUNCH
|
||||
OMARCHY_INSTALL_REGION=china ./configurator && status=0 || status=$?
|
||||
fi
|
||||
done
|
||||
if [[ -n ${OMARCHY_CJK_CONSOLE:-} ]] && ((status == vt_return)); then
|
||||
touch "$XDG_RUNTIME_DIR/return-to-vt"
|
||||
exit 0
|
||||
fi
|
||||
((status == 0)) || exit "$status"
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user