Switch the region under Setup > Region, and offer China Apps
omarchy region cn|global switches an installed machine: cn upgrades, trusts ArchLinuxCN through the rendered China config, records the marker and links the developer mirrors, then refreshes pacman; global undoes only what Omarchy made. The developer mirrors reach new sessions only, so a terminal switch offers to log out. Install > China Apps, shown only in China, installs WeChat, QQ, Feishu, DingTalk, Tencent Meeting and WPS Office from the AUR and sets up Tencent Docs, Yuque and Shimo as web apps. manual/52-china.md describes the China region.
This commit is contained in:
14 files changed
+313
-5
No files matched your search
@@ -4,14 +4,23 @@ cn_links=(
|
||||
"gemrc /etc/gemrc"
|
||||
)
|
||||
|
||||
# The installer writes the marker from the timezone.
|
||||
# The installer writes the marker from the timezone; omarchy-region passes the region it switches to.
|
||||
region=global
|
||||
if [[ -e /etc/omarchy/region ]]; then
|
||||
region=$(</etc/omarchy/region)
|
||||
fi
|
||||
region=${OMARCHY_REGION:-$region}
|
||||
|
||||
case $region in
|
||||
global) ;;
|
||||
global)
|
||||
rm -f /etc/omarchy/region
|
||||
for link in "${cn_links[@]}"; do
|
||||
read -r _ target <<<"$link"
|
||||
if [[ -L $target && $(readlink "$target") == */default/regions/cn/* ]]; then
|
||||
rm "$target"
|
||||
fi
|
||||
done
|
||||
;;
|
||||
cn)
|
||||
for link in "${cn_links[@]}"; do
|
||||
read -r _ target <<<"$link"
|
||||
@@ -20,6 +29,8 @@ cn)
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
mkdir -p /etc/omarchy
|
||||
echo cn >/etc/omarchy/region
|
||||
for link in "${cn_links[@]}"; do
|
||||
read -r source target <<<"$link"
|
||||
mkdir -p "${target%/*}"
|
||||
|
||||
Reference in new issue
Block a user