Compare commits

...
Author SHA1 Message Date
ZacharyZhang-NY 3b6d337570 Check off T35 after two codex rounds 2026-10-12 02:54:18 -04:00
ZacharyZhang-NY f6ee7da713 Plan: the full fontconfig test passes on the T34 VM 2026-10-12 02:53:47 -04:00
ZacharyZhang-NY 520447de67 Plan: acceptance checklist for T28–T34 2026-10-12 02:48:15 -04:00
ZacharyZhang-NY a7ba5f0811 Plan: T34 evidence 2026-10-12 02:39:24 -04:00
ZacharyZhang-NY 9e90723b8e Check off T33 after one codex round 2026-10-12 01:26:00 -04:00
ZacharyZhang-NY efdf7b7754 Plan: the ISO PR branch and omarchy-pkgs 2026-10-12 01:22:27 -04:00
ZacharyZhang-NY 00c17e1a8c Check off T32 after two codex rounds 2026-10-12 01:21:25 -04:00
ZacharyZhang-NY 4e0fb6250d Refuse the China region off x86 until #13690 renders ARM pacman
Integration only.
2026-10-12 01:17:59 -04:00
ZacharyZhang-NY f17808fa7e Plan: the PR branches and the integration branch 2026-10-12 01:17:41 -04:00
ZacharyZhang-NY e832a2fdf1 Render x86 pacman through #13690 on refresh, and on install only with a region
Integration only, until omarchy #13690 rebases onto the ARM pacman
templates. pacman-templates-test still expects x86 refresh to copy
the templates directly.
2026-10-12 01:17:41 -04:00
ZacharyZhang-NY 9a6eee0641 Carry the OmarchyCN task list 2026-10-12 01:17:41 -04:00
ZacharyZhang-NY 2939faf529 Word Setup > Region and China Apps in Chinese
Needs both the Chinese language and the region switch: the Chinese
labels for Region and China Apps, the region switch's logout prompt
through omarchy-text, and the language half of manual/52-china.md.
2026-10-12 01:17:41 -04:00
ZacharyZhang-NY 5acdd55656 Merge cn-region-switch (with omarchy #13690)
# Conflicts:
#	AGENTS.md
#	bin/omarchy-refresh-pacman
#	default/omarchy/omarchy-menu.jsonc
#	install/post-install/pacman.sh
#	shell/plugins/menu/MenuModel.js
#	test/shell.d/menu-test.sh
2026-10-12 01:17:38 -04:00
ZacharyZhang-NY 8604c4e76d Merge chinese-language 2026-10-12 01:17:30 -04:00
ZacharyZhang-NY f021bd2a29 Merge cjk-variant-selection 2026-10-12 01:17:30 -04:00
ZacharyZhang-NY 770d738948 Add Simplified Chinese as a system language
The installer asks for the language before the keyboard, and
Setup > Language (omarchy language en|zh) switches it later. Under
zh_CN the menu reads its labels from omarchy-menu.zh-cn.jsonc, the
shell from I18nZh.js through I18n.tr, and notifications are worded
by their sender through omarchy-text, which reads the same table.
User text is never translated.
2026-10-12 01:17:26 -04:00
ZacharyZhang-NY 16faf06fcf 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.
2026-10-12 00:29:40 -04:00
ZacharyZhang-NY 466c2ca14a Point package managers at China mirrors on cn installs
npm, PyPI and uv, Go, rustup and crates.io, RubyGems and Bundler,
and Maven reach their registries slowly or not at all from China.
On a cn install, link the profile's environment, cargo and gem
drop-ins into place. A regular file the admin wrote is never
replaced; the install fails instead.
2026-10-12 00:29:13 -04:00
Kros DaiandClaude Opus 5.5 ec4579a461 🐛 fix(test): skip exact zone match without tzdata.zi
- 🐛 minimal containers lack the link table, so the exact china zone check failed on a correct profile

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g
2026-10-08 16:44:15 -04:00
Kros DaiandClaude Opus 5.5 d9a781e3c9 📝 docs(region): scope the refresh render boundary
- 📝 state that same-user code is outside the refresh boundary, so reviewers see the trade-off was deliberate

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g
2026-10-08 16:08:36 -04:00
Kros DaiandClaude Opus 5.5 a6c3480ff8 📝 docs(region): state marker mode and archlinuxcn risk
- 📝 refresh reads the marker unprivileged, and rolling archlinuxcn packages can outpace stable snapshots

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g
2026-10-08 15:31:04 -04:00
Kros DaiandClaude Opus 5.5 545190596d ♻️ refactor(pacman): branch on render with if/else
- ♻️ follow the repo style instead of exiting early to skip the install block

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g
2026-10-08 15:31:04 -04:00
Kros DaiandClaude Opus 5.5 b381093e32 ✅ test(region): derive china zones from tzdata
- ✅ dropping a backward-compatible zone name from the profile now fails the test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g
2026-10-08 15:31:04 -04:00
Kros DaiandClaude Opus 5.5 9d74c813f1 🐛 fix(channel): require every region fragment for dev
- 🐛 leaving dev refreshes stable or rc with the checkout's tools, so a profile missing those fragments would drop regional repositories
- ✅ refuse a profile missing any single fragment

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g
2026-10-08 15:31:04 -04:00
Kros DaiandClaude Opus 5.5 fce85abf48 📝 docs(region): explain mirror order and fallback
- 📝 pacman's three-error skip and first-server databases decide what the china replicas must serve

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g
2026-10-08 15:21:51 -04:00
Kros DaiandClaude Opus 5.5 3c68a1bb04 ✨ feat(region): put the china channel mirrors first
- ✨ omarchy now runs per-channel china replicas, so they should lead instead of trailing as a fallback
- ♻️ prepend per-channel fragments so each channel's own mirror stays the fallback
- 🔥 drop the ustc arch mirror, which was never a stable or rc snapshot replica

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g
2026-10-08 15:21:51 -04:00
Kros DaiandClaude Opus 5.5 b89def6c7f 📝 docs(region): describe timezone-derived regions
- 📝 the --region build flag is gone, so the installer contract and validation plan change with it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g
2026-10-08 15:03:46 -04:00
Kros DaiandClaude Opus 5.5 0de49b231a ✨ feat(region): map timezones to regions
- ✨ one iso serves every region, so the installer derives it from the timezone the user already picks
- ✅ reject unknown zones and zones claimed by two regions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuATgjU4mnqpqSLAKMQ14g
2026-10-08 15:03:41 -04:00
Kros DaiandClaude Opus 5.5 3e00a48c00 ✅ test(pacman): sandbox the region for every boundary test
- ✅ The channel and update boundary tests copied the real render and dev-region guard, so on a China install they read the host's `/etc/omarchy/region` and failed before reaching their checks
- ♻️ The shared fixture now points both lookups at a sandbox target that starts global, and the regional test only writes `cn` there

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdXqTwm63rRMwotZ1xqLC8
2026-10-06 22:14:56 -04:00
Kros DaiandClaude Opus 5.5 a1bdc46119 ✅ test(pacman): isolate the regional refresh boundary test
- ✅ the render read the host's region marker, so a global machine never rendered China and a China machine failed on missing fragments
- ✅ check the finished China files root installs, not only the copy order

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdXqTwm63rRMwotZ1xqLC8
2026-10-06 22:00:59 -04:00
Kros DaiandClaude Opus 5.5 7a60c8dea4 🐛 fix(channel): require a usable region profile for dev
- 🐛 an empty profile directory or a helper that cannot run passed the guard, linked dev, and then broke the refresh
- ✅ the success case now uses a complete profile

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdXqTwm63rRMwotZ1xqLC8
2026-10-06 22:00:59 -04:00
Kros DaiandClaude Opus 5.5 6be88d14a5 🐛 fix(pacman): remove the render dir on every refresh exit
- 🐛 a failed render, a refused sudo prompt, or a signal left the scratch directory behind; repeated attempts piled them up
- 🔒 the cleanup runs before the sudo revocation, which stays the last step of the exit path

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdXqTwm63rRMwotZ1xqLC8
2026-10-06 21:58:48 -04:00
Kros DaiandClaude Opus 5.5 50a26be6a7 📝 docs(region): scope the cn profile to repositories
- 📝 frame USTC and ArchLinuxCN as a bridge until an official China mirror exists
- 📝 record that language, timezone, and input defaults follow as separate changes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K3Jna1ogUUviYLJzhsG6Vr
2026-10-06 14:43:25 -04:00
Kros DaiandClaude Opus 5.5 d5ef1c1d15 🔥 refactor(region): drop input defaults from the cn profile
- 🔥 keep this change to the regional build architecture; Chinese input gets its own proposal instead of fixing one engine here
- ✅ assert the shipped profile adds only its repository keyring

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K3Jna1ogUUviYLJzhsG6Vr
2026-10-06 14:43:25 -04:00
Kros DaiandClaude Opus 5.5 d024c82a9d 📝 docs(plans): move the china proposal to a discussion
- 📝 upstream plans are implementation plans; the open questions belong in the discussion that links these changes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K3Jna1ogUUviYLJzhsG6Vr
2026-10-06 14:43:25 -04:00
Kros DaiandClaude Opus 5.5 d7f17a0424 ♻️ refactor(pacman): render regional config without root
- 🔒 upstream refresh now gives root only command-scoped copies, so regional files are rendered as the caller and installed with the same four `sudo cp` calls
- ✅ exercise refresh only inside the sudo-boundary sandbox; the old host-level test reached real sudo once refresh pinned its PATH

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 14:43:25 -04:00
Kros DaiandClaude Opus 5.5 87a2931209 📝 docs(region): drop the unreachable menu input gate
- 📝 the menu bypasses the input method, so requiring Pinyin there made the release procedure impossible until upstream fixes it
- 📝 record the required `skel` profile and the dev-switch region check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 14:43:25 -04:00
Kros DaiandClaude Opus 5.5 647979bde7 🐛 fix(pacman): keep existing config file modes
- 🐛 refresh used to copy over the existing files, so a customized mode must survive the shared regional applicator too

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 14:43:25 -04:00
Kros DaiandClaude Opus 5.5 123535ea14 🐛 fix(channel): keep regional repos when switching to dev
- 🛡️ refuse a dev checkout that lacks this machine's region profile before linking it, since its own refresh would silently replace the regional pacman files
- ✅ isolate channel tests from the host region marker

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 14:43:25 -04:00
Kros Dai 645cfc2a36 📝 docs(region): explain china bootstrap choices
- 📝 clarify optional defaults, trust requirements, and opt-out behavior
- ⚠️ document snapshot compatibility and release validation limits

Amp-Thread-ID: T-01a0df38-0ea7-759b-bcff-29da223cc567
2026-10-06 14:43:25 -04:00
Kros Dai e989960895 ✅ test(region): guard runtime defaults
- ✅ protect global behavior and regional mirror ordering
- ⌨️ guard personal settings and reserved input shortcuts

Amp-Thread-ID: T-01a0df38-0ea7-759b-bcff-29da223cc567
2026-10-06 14:43:25 -04:00
Kros Dai 48f7c411c0 ✨ feat(pacman): preserve regional defaults
- ✨ share regional repository generation across install and refresh
- 🛡️ reject invalid profiles before replacing configuration

Amp-Thread-ID: T-01a0df38-0ea7-759b-bcff-29da223cc567
2026-10-06 14:43:25 -04:00
Kros DaiandAmp 7727d40c92 ✨ feat(region): seed offline chinese input
- ✨ make first-login pinyin available without downloads
- ⌨️ preserve compose and terminal prefix shortcuts

Amp-Thread-ID: https://ampcode.com/threads/T-01a0df38-0ea7-759b-bcff-29da223cc567
Co-authored-by: Amp <amp@ampcode.com>
2026-10-06 14:43:25 -04:00
170 changed files with 3105 additions and 572 deletions

No files matched your search

+13
View File
@@ -124,6 +124,19 @@ Exceptions are allowed for migration and package-helper scripts where the helper
- Do not add `aliases` to new menu entries. Aliases are reserved for - Do not add `aliases` to new menu entries. Aliases are reserved for
established alternate names users already type, kept for compatibility. established alternate names users already type, kept for compatibility.
# Language
- `omarchy-language en|zh` (Setup > Language) owns `LANG` in `/etc/locale.conf`; the installer sets it from its first screen. Nothing in `omarchy update` or migrations may change `/etc/locale.conf`.
- Chinese menu labels live in `default/omarchy/omarchy-menu.zh-cn.jsonc`, merged when `LANG` starts with `zh_CN`; give a new menu row with translatable words a label there.
- Shell text goes through `I18n.tr("English %1", arg)` from `qs.Commons`, with its Chinese in `shell/Commons/I18nZh.js` keyed by the English. Notifications and OSD messages are worded by their sender with `omarchy-text "English %1" "$arg"` (Python: `text()`, QML: `I18n.tr`), which reads the same table; the shell shows them as given, so user text is never translated. `test/shell.d/shell-i18n-test.sh` fails on a missing entry.
# Region
- `/etc/omarchy/region` holds the region the installer derived from the timezone (`cn`); no file means Global. The profile lives in `default/regions/cn/`, its contract in `docs/regions.md`.
- `install/config/region.sh` links the `cn` developer mirrors into `/etc` and `/.cargo` and refuses to replace a regular file it did not create. It serves both the install (the marker) and `omarchy region cn|global` (`OMARCHY_REGION`), which also records or removes the marker; Global removes only the links it made.
- `omarchy-region` prints the region (`Global` or `China`) and switches it. Nothing in `omarchy update` or migrations may change the region.
- China-only menu rows carry `"when":"[[ \"$(omarchy-region)\" == \"China\" ]]"` on every row, not only the submenu, because search checks each row's own guard. User-facing docs: `manual/52-china.md`.
# Config Structure # Config Structure
- `config/` - default configs copied to `~/.config/` - `config/` - default configs copied to `~/.config/`
+1
View File
@@ -71,6 +71,7 @@ The manual lives in [`manual/`](manual/), which is its authoritative source.
- [Omarchy on...](manual/49-omarchy-on.md) - [Omarchy on...](manual/49-omarchy-on.md)
- [Dual Boot Install](manual/50-dual-boot-install.md) - [Dual Boot Install](manual/50-dual-boot-install.md)
- [Unattended Installs](manual/51-unattended-installs.md) - [Unattended Installs](manual/51-unattended-installs.md)
- [China](manual/52-china.md)
## License ## License
+4
View File
@@ -24,6 +24,10 @@ Run `omarchy-restart-shell` after making changes to QML files.
- Panel / overlay / menu plugins must expose `open(payloadJson)` and - Panel / overlay / menu plugins must expose `open(payloadJson)` and
`close()` lifecycle methods for `shell summon` and `shell hide`. `close()` lifecycle methods for `shell summon` and `shell hide`.
## Text
Wrap every user-visible string in `I18n.tr()` (`import qs.Commons`) and add its Chinese to `shell/Commons/I18nZh.js`; plain JS models that Node tests load stay English, and their text is wrapped where QML shows it.
## IPC ## IPC
- `bin/omarchy-shell` is the canonical IPC entry point. It forwards to - `bin/omarchy-shell` is the canonical IPC entry point. It forwards to
+2
View File
@@ -59,6 +59,7 @@ GROUP_DESCRIPTIONS[hw]="Hardware detection and controls"
GROUP_DESCRIPTIONS[hyprland]="Hyprland window, monitor, and toggle controls" GROUP_DESCRIPTIONS[hyprland]="Hyprland window, monitor, and toggle controls"
GROUP_DESCRIPTIONS[install]="Optional software installers" GROUP_DESCRIPTIONS[install]="Optional software installers"
GROUP_DESCRIPTIONS[installed]="Installed optional service checks" GROUP_DESCRIPTIONS[installed]="Installed optional service checks"
GROUP_DESCRIPTIONS[language]="System language"
GROUP_DESCRIPTIONS[launch]="Application launchers" GROUP_DESCRIPTIONS[launch]="Application launchers"
GROUP_DESCRIPTIONS[menu]="Omarchy menu commands" GROUP_DESCRIPTIONS[menu]="Omarchy menu commands"
GROUP_DESCRIPTIONS[migrate]="Migration runner" GROUP_DESCRIPTIONS[migrate]="Migration runner"
@@ -74,6 +75,7 @@ GROUP_DESCRIPTIONS[plymouth]="Plymouth boot theme management"
GROUP_DESCRIPTIONS[power]="Power supply detection" GROUP_DESCRIPTIONS[power]="Power supply detection"
GROUP_DESCRIPTIONS[powerprofiles]="Power profile management" GROUP_DESCRIPTIONS[powerprofiles]="Power profile management"
GROUP_DESCRIPTIONS[refresh]="Reset config to defaults" GROUP_DESCRIPTIONS[refresh]="Reset config to defaults"
GROUP_DESCRIPTIONS[region]="Region-specific package sources and setup"
GROUP_DESCRIPTIONS[reinstall]="Reinstall and reset workflows" GROUP_DESCRIPTIONS[reinstall]="Reinstall and reset workflows"
GROUP_DESCRIPTIONS[reminder]="Desktop notification reminders" GROUP_DESCRIPTIONS[reminder]="Desktop notification reminders"
GROUP_DESCRIPTIONS[remove]="Removal workflows" GROUP_DESCRIPTIONS[remove]="Removal workflows"
+16 -16
View File
@@ -85,7 +85,7 @@ finish() {
fail() { fail() {
if [[ $events == "true" ]]; then if [[ $events == "true" ]]; then
printf '@@omarchy error %s\n' "$1" printf '@@omarchy error %s\n' "$1"
omarchy-notification-send -g 󰚩 -u critical "Couldn't add the $name account" "$1" omarchy-notification-send -g 󰚩 -u critical "$(omarchy-text "Couldn't add the %1 account" "$name")" "$1"
else else
echo "$1" >&2 echo "$1" >&2
fi fi
@@ -113,9 +113,9 @@ interruptible() {
} }
if omarchy-cmd-missing "$provider"; then if omarchy-cmd-missing "$provider"; then
say "Installing the $name CLI…" say "$(omarchy-text "Installing the %1 CLI…" "$name")"
if [[ $events == "true" ]]; then if [[ $events == "true" ]]; then
mise use -g "$package" >/dev/null 2>&1 || fail "Installing the $name CLI didn't finish." mise use -g "$package" >/dev/null 2>&1 || fail "$(omarchy-text "Installing the %1 CLI didn't finish." "$name")"
else else
mise use -g "$package" || exit 1 mise use -g "$package" || exit 1
fi fi
@@ -150,26 +150,26 @@ if [[ -n $reauth ]]; then
else else
account_home=$(omarchy-agent-account-state homes "$provider" | awk -F'\t' -v id="$reauth" '$1 == id { print $2 }') account_home=$(omarchy-agent-account-state homes "$provider" | awk -F'\t' -v id="$reauth" '$1 == id { print $2 }')
fi fi
[[ -n $account_home ]] || fail "No $name account named $reauth." [[ -n $account_home ]] || fail "$(omarchy-text "No %1 account named %2." "$name" "$reauth")"
if [[ $account_home == "$HOME/.$provider" ]]; then if [[ $account_home == "$HOME/.$provider" ]]; then
say "Sign in to $name again in the browser window that opens." say "$(omarchy-text "Sign in to %1 again in the browser window that opens." "$name")"
login || fail "The $name sign-in didn't finish." login || fail "$(omarchy-text "The %1 sign-in didn't finish." "$name")"
else else
say "Sign in again as this account in the private window that opens." say "$(omarchy-text "Sign in again as this account in the private window that opens.")"
private_browser private_browser
interruptible env BROWSER="$browser" "$home_env=$account_home" "${login_command[@]}" || fail "The $name sign-in didn't finish." interruptible env BROWSER="$browser" "$home_env=$account_home" "${login_command[@]}" || fail "$(omarchy-text "The %1 sign-in didn't finish." "$name")"
fi fi
omarchy-agent-usage-update --force "$provider" >/dev/null 2>&1 & omarchy-agent-usage-update --force "$provider" >/dev/null 2>&1 &
finish "Signed in to $name again." finish "$(omarchy-text "Signed in to %1 again." "$name")"
exit 0 exit 0
fi fi
# The first subscription signs in where the CLI always looks, through your # The first subscription signs in where the CLI always looks, through your
# normal browser: nothing is signed in there yet that it could be mistaken for. # normal browser: nothing is signed in there yet that it could be mistaken for.
if ! primary_signed_in "$provider"; then if ! primary_signed_in "$provider"; then
say "Sign in to $name in the browser window that opens." say "$(omarchy-text "Sign in to %1 in the browser window that opens." "$name")"
if login && primary_signed_in "$provider"; then if login && primary_signed_in "$provider"; then
# The first agent signed in on a machine with none chosen becomes the # The first agent signed in on a machine with none chosen becomes the
# default, so `omarchy agent` and the panel's starter prompts have one to # default, so `omarchy agent` and the panel's starter prompts have one to
@@ -179,9 +179,9 @@ if ! primary_signed_in "$provider"; then
printf '%s\n' "$provider" >"$HOME/.config/omarchy/defaults/agent" printf '%s\n' "$provider" >"$HOME/.config/omarchy/defaults/agent"
fi fi
omarchy-agent-usage-update --force "$provider" >/dev/null 2>&1 & omarchy-agent-usage-update --force "$provider" >/dev/null 2>&1 &
finish "Signed in to $name." finish "$(omarchy-text "Signed in to %1." "$name")"
else else
fail "The $name sign-in didn't finish." fail "$(omarchy-text "The %1 sign-in didn't finish." "$name")"
fi fi
else else
if [[ -z $label && $events == "false" && -t 0 ]]; then if [[ -z $label && $events == "false" && -t 0 ]]; then
@@ -189,7 +189,7 @@ else
fi fi
if [[ $events == "true" ]]; then if [[ $events == "true" ]]; then
say "Sign in as the account you're adding in the private window that opens." say "$(omarchy-text "Sign in as the account you're adding in the private window that opens.")"
else else
cat <<EOF cat <<EOF
@@ -201,7 +201,7 @@ Don't log out of the $name CLI to do this: logging out revokes the saved sign-in
EOF EOF
fi fi
home=$(omarchy-agent-account-state begin "$provider") || fail "Couldn't set up a home for the new account." home=$(omarchy-agent-account-state begin "$provider") || fail "$(omarchy-text "Couldn't set up a home for the new account.")"
private_browser private_browser
interruptible env BROWSER="$browser" "$home_env=$home" "${login_command[@]}" interruptible env BROWSER="$browser" "$home_env=$home" "${login_command[@]}"
@@ -211,9 +211,9 @@ EOF
added=$(jq -r '.label + (if .email != "" then " (" + .email + ")" else "" end)' <<<"$account") added=$(jq -r '.label + (if .email != "" then " (" + .email + ")" else "" end)' <<<"$account")
omarchy-agent-usage-update --force "$provider" >/dev/null 2>&1 & omarchy-agent-usage-update --force "$provider" >/dev/null 2>&1 &
if [[ $events == "true" ]]; then if [[ $events == "true" ]]; then
finish "Added $added." finish "$(omarchy-text "Added %1." "$added")"
else else
finish "Added $added." finish "$(omarchy-text "Added %1." "$added")"
echo "Switch to it with: omarchy agent account use $provider $(jq -r .id <<<"$account")" echo "Switch to it with: omarchy agent account use $provider $(jq -r .id <<<"$account")"
fi fi
else else
+29 -22
View File
@@ -73,6 +73,11 @@ class AccountError(Exception):
pass pass
def text(english: str, *args: object) -> str:
"""English with %1.. filled, in the session's language, from the shell's table."""
return subprocess.run(["omarchy-text", english, *map(str, args)], capture_output=True, text=True, check=True).stdout.rstrip("\n")
# ------------------------------------------------------------------- paths # ------------------------------------------------------------------- paths
@@ -335,12 +340,12 @@ def begin(provider: str) -> Path:
def register(provider: str, label: str, pending: Path) -> dict[str, Any]: def register(provider: str, label: str, pending: Path) -> dict[str, Any]:
pending = pending.resolve() pending = pending.resolve()
if pending.parent != (accounts_root() / provider / ".pending").resolve(): if pending.parent != (accounts_root() / provider / ".pending").resolve():
raise AccountError(f"{pending} is not a pending {PROVIDERS[provider]['name']} login") raise AccountError(text("%1 is not a pending %2 login", pending, PROVIDERS[provider]['name']))
found = identity(provider, pending) found = identity(provider, pending)
if not found["accountId"]: if not found["accountId"]:
shutil.rmtree(pending, ignore_errors=True) shutil.rmtree(pending, ignore_errors=True)
raise AccountError("The login didn't finish, so no account was added.") raise AccountError(text("The login didn't finish, so no account was added."))
with Locked(provider) as registry: with Locked(provider) as registry:
# Each home is asked who it is now, not trusted from when it was added: a # Each home is asked who it is now, not trusted from when it was added: a
@@ -350,10 +355,10 @@ def register(provider: str, label: str, pending: Path) -> dict[str, Any]:
for account in registry["accounts"]: for account in registry["accounts"]:
if account.get("accountId") == found["accountId"]: if account.get("accountId") == found["accountId"]:
shutil.rmtree(pending, ignore_errors=True) shutil.rmtree(pending, ignore_errors=True)
raise AccountError( raise AccountError(text(
f"That's {account['label']} ({found['email'] or 'already added'}). " "That's %1 (%2). Try again, and sign in as the other account in the private window.",
"Try again, and sign in as the other account in the private window." account["label"], found["email"] or text("already added"),
) ))
label = label.strip() or found["email"].split("@")[0] or "Account" label = label.strip() or found["email"].split("@")[0] or "Account"
account_id = unique_id(provider, registry, label) account_id = unique_id(provider, registry, label)
@@ -395,11 +400,11 @@ def unique_id(provider: str, registry: dict[str, Any], label: str, keep: dict[st
def rename(provider: str, target: str, label: str) -> dict[str, Any]: def rename(provider: str, target: str, label: str) -> dict[str, Any]:
label = label.strip() label = label.strip()
if not label: if not label:
raise AccountError("Give the account a name") raise AccountError(text("Give the account a name"))
with Locked(provider) as registry: with Locked(provider) as registry:
account = find(registry, target) account = find(registry, target)
if not account: if not account:
raise AccountError(f"No {PROVIDERS[provider]['name']} account named {target}") raise AccountError(text("No %1 account named %2", PROVIDERS[provider]['name'], target))
new_id = unique_id(provider, registry, label, keep=account) new_id = unique_id(provider, registry, label, keep=account)
if not account.get("primary") and not account.get("home"): if not account.get("primary") and not account.get("home"):
account["home"] = str(account_home(provider, account)) account["home"] = str(account_home(provider, account))
@@ -428,7 +433,7 @@ def use(provider: str, target: str) -> tuple[dict[str, Any], dict[str, Any]]:
target = ids[(ids.index(previous["id"]) + 1) % len(ids)] target = ids[(ids.index(previous["id"]) + 1) % len(ids)]
account = find(registry, target) account = find(registry, target)
if not account: if not account:
raise AccountError(f"No {PROVIDERS[provider]['name']} account named {target}") raise AccountError(text("No %1 account named %2", PROVIDERS[provider]['name'], target))
registry["active"] = account["id"] registry["active"] = account["id"]
registry["alert"] = "" registry["alert"] = ""
if not account.get("primary"): if not account.get("primary"):
@@ -456,12 +461,12 @@ def remove(provider: str, target: str) -> dict[str, Any]:
with Locked(provider) as registry: with Locked(provider) as registry:
account = find(registry, target) account = find(registry, target)
if not account: if not account:
raise AccountError(f"No {PROVIDERS[provider]['name']} account named {target}") raise AccountError(text("No %1 account named %2", PROVIDERS[provider]['name'], target))
if account.get("primary"): if account.get("primary"):
raise AccountError(f"{account['label']} is the login in {primary_home(provider)}; it can't be removed here.") raise AccountError(text("%1 is the login in %2; it can't be removed here.", account["label"], primary_home(provider)))
home = account_home(provider, account) home = account_home(provider, account)
if home_in_use(provider, home): if home_in_use(provider, home):
raise AccountError(f"A running {PROVIDERS[provider]['name']} session uses {account['label']}. Quit it first, then remove the account.") raise AccountError(text("A running %1 session uses %2. Quit it first, then remove the account.", PROVIDERS[provider]['name'], account["label"]))
# Only the account's own directory goes. Its links point into the primary # Only the account's own directory goes. Its links point into the primary
# home, and rmtree removes a link without following it. # home, and rmtree removes a link without following it.
if home.resolve().parent == (accounts_root() / provider).resolve(): if home.resolve().parent == (accounts_root() / provider).resolve():
@@ -474,14 +479,14 @@ def remove(provider: str, target: str) -> dict[str, Any]:
def set_mode(provider: str, mode: str, threshold: str | None) -> dict[str, Any]: def set_mode(provider: str, mode: str, threshold: str | None) -> dict[str, Any]:
if mode not in SWITCH_MODES: if mode not in SWITCH_MODES:
raise AccountError("Switch mode is manual or auto") raise AccountError(text("Switch mode is manual or auto"))
with Locked(provider) as registry: with Locked(provider) as registry:
registry["switch"] = mode registry["switch"] = mode
if threshold is not None: if threshold is not None:
try: try:
registry["threshold"] = max(50, min(100, int(threshold))) registry["threshold"] = max(50, min(100, int(threshold)))
except ValueError: except ValueError:
raise AccountError("The threshold is a percentage between 50 and 100") raise AccountError(text("The threshold is a percentage between 50 and 100"))
registry["alert"] = "" registry["alert"] = ""
return dict(registry) return dict(registry)
@@ -556,10 +561,10 @@ def duration(delta: dt.timedelta) -> str:
hours, minutes = divmod(minutes, 60) hours, minutes = divmod(minutes, 60)
days, hours = divmod(hours, 24) days, hours = divmod(hours, 24)
if days: if days:
return f"{days}d {hours}h" return text("%1d %2h", days, hours)
if hours: if hours:
return f"{hours}h {minutes}m" return text("%1h %2m", hours, minutes)
return f"{minutes}m" return text("%1m", minutes)
# The whole switching policy, with no I/O: given the registry and the per # The whole switching policy, with no I/O: given the registry and the per
@@ -659,21 +664,23 @@ def autoswitch(provider: str, now: dt.datetime | None = None) -> bool:
threshold = registry["threshold"] threshold = registry["threshold"]
if decision["action"] == "exhausted": if decision["action"] == "exhausted":
soonest = decision["soonest"] soonest = decision["soonest"]
when = f" {soonest[1]['label']} resets in {duration(soonest[0] - now)}." if soonest else "" staying = text("Staying on %1.", source["label"])
notify(f"All {name} accounts are over {threshold}%", f"Staying on {source['label']}.{when}") if soonest:
staying = text("Staying on %1. %2 resets in %3.", source["label"], soonest[1]["label"], duration(soonest[0] - now))
notify(text("All %1 accounts are over %2%", name, threshold), staying)
return False return False
target = decision["to"] target = decision["to"]
headline = f"{source['label']} is at {round(decision['fromPeak'])}% of a {name} limit" headline = text("%1 is at %2% of a %3 limit", source["label"], round(decision["fromPeak"]), name)
if decision["action"] == "switch": if decision["action"] == "switch":
registry["active"] = target["id"] registry["active"] = target["id"]
if not target.get("primary"): if not target.get("primary"):
link_shared(provider, account_home(provider, target)) link_shared(provider, account_home(provider, target))
notify(headline, f"New {name} sessions now use {target['label']} ({round(decision['toPeak'])}%). Running sessions stay on {source['label']}.") notify(headline, text("New %1 sessions now use %2 (%3%). Running sessions stay on %4.", name, target["label"], round(decision["toPeak"]), source["label"]))
return True return True
notify( notify(
headline, headline,
f"{target['label']} is at {round(decision['toPeak'])}%. Click to switch new sessions to it.", text("%1 is at %2%. Click to switch new sessions to it.", target["label"], round(decision["toPeak"])),
["omarchy-agent-account-use", provider, target["id"]], ["omarchy-agent-account-use", provider, target["id"]],
) )
return False return False
+2 -2
View File
@@ -31,9 +31,9 @@ active=$(jq -r '.active.label + (if (.active.plan // "") != "" then " (" + .acti
if [[ $(jq -r .previous.id <<<"$result") == "$(jq -r .active.id <<<"$result")" ]]; then if [[ $(jq -r .previous.id <<<"$result") == "$(jq -r .active.id <<<"$result")" ]]; then
echo "New $name sessions already use $active." echo "New $name sessions already use $active."
else else
message="Running sessions stay on $previous." message=$(omarchy-text "Running sessions stay on %1." "$previous")
echo "New $name sessions now use $active. $message" echo "New $name sessions now use $active. $message"
omarchy-notification-send -g 󰚩 "New $name sessions now use $active" "$message" omarchy-notification-send -g 󰚩 "$(omarchy-text "New %1 sessions now use %2" "$name" "$active")" "$message"
# The usage record's own limits describe the active account. # The usage record's own limits describe the active account.
omarchy-agent-usage-update --limits-only "$1" >/dev/null 2>&1 & omarchy-agent-usage-update --limits-only "$1" >/dev/null 2>&1 &
fi fi
+11 -4
View File
@@ -22,6 +22,7 @@ import json
import os import os
import re import re
import sqlite3 import sqlite3
import subprocess
import sys import sys
import tempfile import tempfile
import time import time
@@ -32,6 +33,11 @@ from typing import Any
AGENT_ID = "claude" AGENT_ID = "claude"
AGENT_NAME = "Claude Code" AGENT_NAME = "Claude Code"
def text(english, *args):
"""English with %1.. filled, in the session's language, from the shell's table."""
return subprocess.run(["omarchy-text", english, *map(str, args)], capture_output=True, text=True, check=True).stdout.rstrip("\n")
AUTH_HELP = "Run `claude auth login` to restore authoritative usage." AUTH_HELP = "Run `claude auth login` to restore authoritative usage."
USAGE_ENDPOINT = "https://api.anthropic.com/api/oauth/usage" USAGE_ENDPOINT = "https://api.anthropic.com/api/oauth/usage"
PROBE_MIN_INTERVAL_SECONDS = 15 PROBE_MIN_INTERVAL_SECONDS = 15
@@ -989,11 +995,12 @@ def probe_limits(access_token: str) -> dict[str, Any]:
except urllib.error.HTTPError as error: except urllib.error.HTTPError as error:
retry_after = error.headers.get("retry-after", "") if error.headers else "" retry_after = error.headers.get("retry-after", "") if error.headers else ""
if error.code == 429: if error.code == 429:
help_text = "Anthropic's usage endpoint is rate limiting checks right now" + ( if retry_after:
f" (retry after {retry_after}s)" if retry_after else "" help_text = text("Anthropic's usage endpoint is rate limiting checks right now (retry after %1s). Local Claude Code stats are still shown.", retry_after)
) + ". Local Claude Code stats are still shown." else:
help_text = text("Anthropic's usage endpoint is rate limiting checks right now. Local Claude Code stats are still shown.")
else: else:
help_text = f"Anthropic's usage endpoint returned status {error.code}. Local Claude Code stats are still shown." help_text = text("Anthropic's usage endpoint returned status %1. Local Claude Code stats are still shown.", error.code)
return {"ok": False, "helpText": help_text} return {"ok": False, "helpText": help_text}
except Exception: except Exception:
# A transport failure reached no server at all — no route, no DNS. Any # A transport failure reached no server at all — no route, no DNS. Any
+77
View File
@@ -0,0 +1,77 @@
#!/bin/bash
# omarchy:summary=Restore channel and regional pacman defaults in an installed target
# omarchy:args=<stable|rc|edge> [target-root] | --render <stable|rc|edge> <output-dir> [target-root]
# omarchy:requires-sudo=true
# omarchy:hidden=true
set -euo pipefail
usage() {
echo "Usage: omarchy-apply-pacman <stable|rc|edge> [target-root]" >&2
echo " omarchy-apply-pacman --render <stable|rc|edge> <output-dir> [target-root]" >&2
exit 1
}
# --render only builds the two files, so an unprivileged caller can hand root
# nothing but plain copies of the finished result.
render_dir=""
if [[ ${1:-} == "--render" ]]; then
(( $# == 3 || $# == 4 )) || usage
channel="$2"
render_dir="$3"
[[ -d $render_dir ]] || { echo "Render directory not found: $render_dir" >&2; exit 1; }
etc="${4:-/}/etc"
else
(( $# >= 1 && $# <= 2 )) || usage
channel="$1"
etc="${2:-/}/etc"
fi
case "$channel" in
stable|rc|edge) ;;
*) echo "Invalid pacman channel: $channel" >&2; exit 1 ;;
esac
# The ISO writes this plain-text marker before target finalization. Missing
# markers keep existing installations global; never source it as shell code.
region=global
if [[ -e $etc/omarchy/region ]]; then
region=$(<"$etc/omarchy/region")
fi
case "$region" in
global|cn) ;;
*) echo "Unsupported region: $region (expected global or cn)" >&2; exit 1 ;;
esac
# Build both files before replacing either. Explicit refreshes retain backups;
# ordinary updates do not call this command or enforce regional defaults.
if [[ -n $render_dir ]]; then
staging="$render_dir"
else
staging=$(mktemp -d)
trap 'rm -rf "$staging"' EXIT
fi
cp "$OMARCHY_PATH/default/pacman/pacman-$channel.conf" "$staging/pacman.conf"
if [[ $region == "global" ]]; then
cp "$OMARCHY_PATH/default/pacman/mirrorlist-$channel" "$staging/mirrorlist"
else
profile="$OMARCHY_PATH/default/regions/$region/pacman"
printf '\n' >> "$staging/pacman.conf"
cat "$profile/pacman.conf.append" >> "$staging/pacman.conf"
# pacman tries servers in order, so the regional mirror leads and the
# channel's own mirror stays as the fallback.
cat "$profile/mirrorlist-$channel.prepend" "$OMARCHY_PATH/default/pacman/mirrorlist-$channel" > "$staging/mirrorlist"
fi
if [[ -z $render_dir ]]; then
mkdir -p "$etc/pacman.d"
for file in pacman.conf pacman.d/mirrorlist; do
if [[ -e $etc/$file ]]; then
cp -f "$etc/$file" "$etc/$file.bak"
fi
done
# Copying over an existing file keeps its owner and mode, as refresh always has.
cp -f "$staging/pacman.conf" "$etc/pacman.conf"
cp -f "$staging/mirrorlist" "$etc/pacman.d/mirrorlist"
fi
+2 -2
View File
@@ -6,8 +6,8 @@ wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle >/dev/null
if wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | grep -q MUTED; then if wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | grep -q MUTED; then
omarchy-brightness-keyboard-mute on omarchy-brightness-keyboard-mute on
omarchy-osd -i microphone-muted -m "Microphone muted" omarchy-osd -i microphone-muted -m "$(omarchy-text "Microphone muted")"
else else
omarchy-brightness-keyboard-mute off omarchy-brightness-keyboard-mute off
omarchy-osd -i microphone -m "Microphone on" omarchy-osd -i microphone -m "$(omarchy-text "Microphone on")"
fi fi
+1 -1
View File
@@ -13,7 +13,7 @@ sinks=$(timeout 2 pactl -f json list sinks |
sinks_count=$(jq 'length' <<<"$sinks") sinks_count=$(jq 'length' <<<"$sinks")
if (( sinks_count == 0 )); then if (( sinks_count == 0 )); then
omarchy-osd -m "No audio devices found" omarchy-osd -m "$(omarchy-text "No audio devices found")"
exit 1 exit 1
fi fi
+1 -1
View File
@@ -13,5 +13,5 @@ fi
level=$1 level=$1
omarchy-notification-send -g 󱐋 -u critical "Time to recharge!" "Battery is down to ${level}%" -i battery-caution -t 30000 omarchy-notification-send -g 󱐋 -u critical "$(omarchy-text "Time to recharge!")" "$(omarchy-text "Battery is down to %1%" "$level")" -i battery-caution -t 30000
omarchy-hook battery-low "$level" omarchy-hook battery-low "$level"
+3 -3
View File
@@ -150,9 +150,9 @@ if [[ $charge_holding == "true" ]]; then
threshold_label="${threshold_end}%" threshold_label="${threshold_end}%"
fi fi
echo "Battery ${percentage}% · Holding at ${threshold_label} · ${power_rate}W / ${capacity}Wh" omarchy-text "Battery %1% · Holding at %2 · %3W / %4Wh" "$percentage" "$threshold_label" "$power_rate" "$capacity"
elif [[ $state == "charging" ]]; then elif [[ $state == "charging" ]]; then
echo "Battery ${percentage}% · ${time_remaining} to full ·  ${power_rate}W / ${capacity}Wh" omarchy-text "Battery %1% · %2 to full ·  %3W / %4Wh" "$percentage" "$time_remaining" "$power_rate" "$capacity"
else else
echo "Battery ${percentage}% · ${time_remaining} left ·  ${power_rate}W / ${capacity}Wh" omarchy-text "Battery %1% · %2 left ·  %3W / %4Wh" "$percentage" "$time_remaining" "$power_rate" "$capacity"
fi fi
+2 -2
View File
@@ -23,7 +23,7 @@ SELECTION=$(slurp 2>/dev/null)
RESULT=$(grim -g "$SELECTION" - | zbarimg -q --raw -Sdisable -Sqrcode.enable - 2>/dev/null) RESULT=$(grim -g "$SELECTION" - | zbarimg -q --raw -Sdisable -Sqrcode.enable - 2>/dev/null)
if [[ -z $RESULT ]]; then if [[ -z $RESULT ]]; then
omarchy-notification-send -g 󰐲 -u critical "No QR code found" "Select a region containing a QR code" omarchy-notification-send -g 󰐲 -u critical "$(omarchy-text "No QR code found")" "$(omarchy-text "Select a region containing a QR code")"
exit 1 exit 1
fi fi
@@ -33,4 +33,4 @@ fi
# the notification history, and an unmarked copy would be retained by clipboard # the notification history, and an unmarked copy would be retained by clipboard
# history. Pasting still works; only the recorded copy is given up. # history. Pasting still works; only the recorded copy is given up.
printf '%s' "$RESULT" | wl-copy --sensitive printf '%s' "$RESULT" | wl-copy --sensitive
omarchy-notification-send -g 󰐲 "QR code copied to clipboard" omarchy-notification-send -g 󰐲 "$(omarchy-text "QR code copied to clipboard")"
+7 -5
View File
@@ -86,7 +86,7 @@ esac
# --status only answers whether our recording runs, for the bar and the menu, so # --status only answers whether our recording runs, for the bar and the menu, so
# it needs no recordings directory and never notifies. # it needs no recordings directory and never notifies.
if [[ $STATUS != "true" && ! -d $OUTPUT_DIR ]]; then if [[ $STATUS != "true" && ! -d $OUTPUT_DIR ]]; then
omarchy-notification-send -u critical -t 3000 "Screen recording directory does not exist: $OUTPUT_DIR" omarchy-notification-send -u critical -t 3000 "$(omarchy-text "Screen recording directory does not exist: %1" "$OUTPUT_DIR")"
exit 1 exit 1
fi fi
@@ -97,7 +97,7 @@ start_webcam_overlay() {
if [[ -z $WEBCAM_DEVICE ]]; then if [[ -z $WEBCAM_DEVICE ]]; then
WEBCAM_DEVICE=$(omarchy-capture-webcam-list | sed -n '1s/[[:space:]].*//p') WEBCAM_DEVICE=$(omarchy-capture-webcam-list | sed -n '1s/[[:space:]].*//p')
if [[ -z $WEBCAM_DEVICE ]]; then if [[ -z $WEBCAM_DEVICE ]]; then
omarchy-notification-send -u critical -t 3000 "No webcam devices found" omarchy-notification-send -u critical -t 3000 "$(omarchy-text "No webcam devices found")"
return 1 return 1
fi fi
fi fi
@@ -235,7 +235,9 @@ wf_audio_device() {
} }
wf_audio_unavailable() { wf_audio_unavailable() {
omarchy-notification-send -u critical -t 5000 "Recording without $1 audio" "The $1 audio could not be added to this recording." >/dev/null 2>&1 local audio
audio=$(omarchy-text "$1")
omarchy-notification-send -u critical -t 5000 "$(omarchy-text "Recording without %1 audio" "$audio")" "$(omarchy-text "The %1 audio could not be added to this recording." "$audio")" >/dev/null 2>&1
} }
wf_audio_cleanup() { wf_audio_cleanup() {
@@ -424,7 +426,7 @@ stop_screenrecording() {
if omarchy-capture-screenrecording-process "${RECORDER[@]}"; then if omarchy-capture-screenrecording-process "${RECORDER[@]}"; then
omarchy-capture-screenrecording-process "${RECORDER[@]}" --signal KILL omarchy-capture-screenrecording-process "${RECORDER[@]}" --signal KILL
omarchy-notification-send -u critical -t 5000 "Screen recording error" "Recording process had to be force-killed. Video may be corrupted." omarchy-notification-send -u critical -t 5000 "$(omarchy-text "Screen recording error")" "$(omarchy-text "Recording process had to be force-killed. Video may be corrupted.")"
else else
finalize_recording finalize_recording
local filename=$(cat "$RECORDING_FILE" 2>/dev/null) local filename=$(cat "$RECORDING_FILE" 2>/dev/null)
@@ -434,7 +436,7 @@ stop_screenrecording() {
# Generate a preview thumbnail from the first frame # Generate a preview thumbnail from the first frame
ffmpeg -y -i "$filename" -ss 00:00:00.1 -vframes 1 -q:v 2 "$preview" -loglevel quiet 2>/dev/null ffmpeg -y -i "$filename" -ss 00:00:00.1 -vframes 1 -q:v 2 "$preview" -loglevel quiet 2>/dev/null
omarchy-notification-send "Screen recording saved" "Open with Super + Alt + , (or click this)" \ omarchy-notification-send "$(omarchy-text "Screen recording saved")" "$(omarchy-text "Open with Super + Alt + , (or click this)")" \
-t 10000 --image "${preview:-$filename}" \ -t 10000 --image "${preview:-$filename}" \
--exec mpv -- "$filename" --exec mpv -- "$filename"
@@ -5,7 +5,7 @@
mapfile -t devices < <(omarchy-capture-webcam-list) mapfile -t devices < <(omarchy-capture-webcam-list)
if (( ${#devices[@]} == 0 )); then if (( ${#devices[@]} == 0 )); then
omarchy-notification-send "No webcam devices found" -u critical -t 3000 omarchy-notification-send "$(omarchy-text "No webcam devices found")" -u critical -t 3000
exit 1 exit 1
fi fi
+1 -1
View File
@@ -23,4 +23,4 @@ TEXT=$(grim -g "$SELECTION" - | tesseract stdin stdout --oem 1 --psm 6 -l "${OMA
[[ -z $TEXT ]] && exit 1 [[ -z $TEXT ]] && exit 1
printf "%s" "$TEXT" | wl-copy printf "%s" "$TEXT" | wl-copy
omarchy-notification-send -g 󰴑 "Copied text from selection to clipboard" omarchy-notification-send -g 󰴑 "$(omarchy-text "Copied text from selection to clipboard")"
+22
View File
@@ -47,9 +47,31 @@ validate_dev_checkout() {
fi fi
} }
# The dev channel refreshes pacman with the checkout's own tools. A checkout
# without this machine's region profile would silently drop its repositories.
validate_dev_region() {
local checkout="$1" region_file="${OMARCHY_REGION_FILE:-/etc/omarchy/region}" region=global
[[ -f $region_file ]] && region=$(<"$region_file")
[[ $region == "global" ]] && return 0
# The refresh after linking needs a runnable helper and every fragment, not
# just a directory with the region's name: dev refreshes edge, and leaving
# dev later refreshes stable or rc with this checkout's tools.
local profile="$checkout/default/regions/$region/pacman" fragment supported=true
[[ -x $checkout/bin/omarchy-apply-pacman ]] || supported=false
for fragment in pacman.conf.append mirrorlist-stable.prepend mirrorlist-rc.prepend mirrorlist-edge.prepend; do
[[ -r $profile/$fragment ]] || supported=false
done
if ! $supported; then
fail "$checkout does not support the '$region' region, so switching would drop its package repositories. Check out a branch with default/regions/$region, or remove $region_file to use global defaults."
fi
}
link_dev_checkout() { link_dev_checkout() {
local checkout="$1" required local checkout="$1" required
[[ -d $checkout/.git ]] || git clone https://github.com/omacom/omarchy.git "$checkout" [[ -d $checkout/.git ]] || git clone https://github.com/omacom/omarchy.git "$checkout"
validate_dev_region "$checkout"
# Check the destination before changing /etc/omarchy.conf or sudo's path. # Check the destination before changing /etc/omarchy.conf or sudo's path.
# An existing checkout is not pulled automatically and may predate this policy. # An existing checkout is not pulled automatically and may predate this policy.
+1 -1
View File
@@ -18,7 +18,7 @@ copy_url() {
[[ -n $url ]] || return 1 [[ -n $url ]] || return 1
printf '%s' "$url" | wl-copy --type text/plain printf '%s' "$url" | wl-copy --type text/plain
omarchy-notification-send -g 󰅍 "URL copied to clipboard" omarchy-notification-send -g 󰅍 "$(omarchy-text "URL copied to clipboard")"
} }
reply_copied() { reply_copied() {
+3 -3
View File
@@ -87,7 +87,7 @@ download_url() {
# Don't show anything until yt-dlp confirms there's actually a video to grab. # Don't show anything until yt-dlp confirms there's actually a video to grab.
if ! yt-dlp --no-playlist --simulate --quiet --no-warnings --no-exec --no-exec-before-download -- "$url" >/dev/null 2>&1; then if ! yt-dlp --no-playlist --simulate --quiet --no-warnings --no-exec --no-exec-before-download -- "$url" >/dev/null 2>&1; then
omarchy-notification-send -u critical -g 󰅖 "No video found for download" "$url" omarchy-notification-send -u critical -g 󰅖 "$(omarchy-text "No video found for download")" "$url"
exit 0 exit 0
fi fi
@@ -148,7 +148,7 @@ download_url() {
# toast would exit before the thumbnail cleanup below is ever scheduled. # toast would exit before the thumbnail cleanup below is ever scheduled.
# `--` keeps mpv from parsing a leading-dash filename as an option; the path # `--` keeps mpv from parsing a leading-dash filename as an option; the path
# is one discrete argument, so it never reaches a shell. # is one discrete argument, so it never reaches a shell.
omarchy-notification-send -g 󰄬 "Download complete" "$title" \ omarchy-notification-send -g 󰄬 "$(omarchy-text "Download complete")" "$title" \
-t 10000 --image "${preview:-$filepath}" \ -t 10000 --image "${preview:-$filepath}" \
--exec mpv -- "$filepath" || true --exec mpv -- "$filepath" || true
@@ -160,7 +160,7 @@ download_url() {
rm -f "$preview" rm -f "$preview"
) & ) &
else else
omarchy-notification-send -u critical -g 󰅖 "Download failed" "$url" omarchy-notification-send -u critical -g 󰅖 "$(omarchy-text "Download failed")" "$url"
fi fi
exit 0 exit 0
+2 -2
View File
@@ -40,8 +40,8 @@ announce() {
omarchy-notification-send \ omarchy-notification-send \
--urgency critical \ --urgency critical \
--glyph "$CRASH_GLYPH" \ --glyph "$CRASH_GLYPH" \
"Process crashed: $comm" \ "$(omarchy-text "Process crashed: %1" "$comm")" \
"Click to diagnose with AI" \ "$(omarchy-text "Click to diagnose with AI")" \
--exec omarchy-agent-crash "$pid" "$comm" "$exe" "$signal" --exec omarchy-agent-crash "$pid" "$comm" "$exe" "$signal"
} }
+1 -1
View File
@@ -48,4 +48,4 @@ fi
env -u BROWSER xdg-settings set default-web-browser "$desktop_id" || exit 1 env -u BROWSER xdg-settings set default-web-browser "$desktop_id" || exit 1
omarchy-notification-send -g $glyph "$name is now the default browser" omarchy-notification-send -g $glyph "$(omarchy-text "%1 is now the default browser" "$name")"
+1 -1
View File
@@ -59,4 +59,4 @@ fi
mkdir -p "$(dirname "$editor_file")" mkdir -p "$(dirname "$editor_file")"
printf '%s\n' "$editor" >"$editor_file" printf '%s\n' "$editor" >"$editor_file"
omarchy-notification-send -g $glyph "$name is now the default editor" omarchy-notification-send -g $glyph "$(omarchy-text "%1 is now the default editor" "$name")"
+1 -1
View File
@@ -48,4 +48,4 @@ cat >~/.config/xdg-terminals.list <<EOF
$desktop_id $desktop_id
EOF EOF
omarchy-notification-send -g $glyph "$name is now the default terminal" omarchy-notification-send -g $glyph "$(omarchy-text "%1 is now the default terminal" "$name")"
+1 -1
View File
@@ -169,7 +169,7 @@ set_terminal_size() {
[[ $prev_id =~ ^[0-9]+$ ]] && replace=(-r "$prev_id") [[ $prev_id =~ ^[0-9]+$ ]] && replace=(-r "$prev_id")
local new_id local new_id
new_id="$(omarchy-notification-send \ new_id="$(omarchy-notification-send \
"Restart Foot to apply the new terminal font size" \ "$(omarchy-text "Restart Foot to apply the new terminal font size")" \
"${replace[@]}" -p 2>/dev/null)" || true "${replace[@]}" -p 2>/dev/null)" || true
[[ $new_id =~ ^[0-9]+$ ]] && printf '%s\n' "$new_id" >"$id_file" [[ $new_id =~ ^[0-9]+$ ]] && printf '%s\n' "$new_id" >"$id_file"
fi fi
+2 -2
View File
@@ -74,11 +74,11 @@ XML
omarchy-restart-shell omarchy-restart-shell
if pgrep -x ghostty; then if pgrep -x ghostty; then
omarchy-notification-send -g "You must restart Ghostty to see font change" omarchy-notification-send -g "$(omarchy-text "You must restart Ghostty to see font change")"
fi fi
if pgrep -x foot; then if pgrep -x foot; then
omarchy-notification-send -g "You must restart Foot to see font change" omarchy-notification-send -g "$(omarchy-text "You must restart Foot to see font change")"
fi fi
omarchy-hook font-set "$font_name" omarchy-hook font-set "$font_name"
+2 -2
View File
@@ -10,7 +10,7 @@ if (( $# == 0 )); then
mapfile -t cores < <(omarchy-games-retro-cores) mapfile -t cores < <(omarchy-games-retro-cores)
if (( ${#cores[@]} == 0 )); then if (( ${#cores[@]} == 0 )); then
omarchy-notification-send -g 󰯉 "No RetroArch cores found" "/usr/lib/libretro" omarchy-notification-send -g 󰯉 "$(omarchy-text "No RetroArch cores found")" "/usr/lib/libretro"
exit 1 exit 1
fi fi
@@ -69,4 +69,4 @@ EOF
chmod +x "$desktop_file" chmod +x "$desktop_file"
update-desktop-database "$desktop_dir" &>/dev/null || true update-desktop-database "$desktop_dir" &>/dev/null || true
omarchy-notification-send -g 󰯉 "$game_name installed" "Start it with Super + Space" omarchy-notification-send -g 󰯉 "$(omarchy-text "%1 installed" "$game_name")" "$(omarchy-text "Start it with Super + Space")"
+3 -3
View File
@@ -20,9 +20,9 @@ if (( $# == 0 )); then
fi fi
case $1 in case $1 in
theme) LABEL="Corners follow the theme" ;; theme) LABEL=$(omarchy-text "Corners follow the theme") ;;
sharp) LABEL="Sharp corners for all themes" ;; sharp) LABEL=$(omarchy-text "Sharp corners for all themes") ;;
rounded) LABEL="Rounded corners for all themes" ;; rounded) LABEL=$(omarchy-text "Rounded corners for all themes") ;;
*) *)
echo "Usage: omarchy-hyprland-corners [theme|sharp|rounded]" >&2 echo "Usage: omarchy-hyprland-corners [theme|sharp|rounded]" >&2
exit 1 exit 1
+5 -5
View File
@@ -16,7 +16,7 @@ wake() {
on() { on() {
if omarchy-hyprland-toggle-enabled $TOGGLE; then if omarchy-hyprland-toggle-enabled $TOGGLE; then
omarchy-hyprland-toggle $TOGGLE off omarchy-hyprland-toggle $TOGGLE off
omarchy-notification-send -g 󰍹 "Laptop display enabled" omarchy-notification-send -g 󰍹 "$(omarchy-text "Laptop display enabled")"
fi fi
wake wake
@@ -24,25 +24,25 @@ on() {
off() { off() {
if [[ -z $INTERNAL ]]; then if [[ -z $INTERNAL ]]; then
omarchy-notification-send -g 󰍹 "No laptop display found" omarchy-notification-send -g 󰍹 "$(omarchy-text "No laptop display found")"
exit 1 exit 1
fi fi
# The name is written into generated Lua below, so only a plain connector # The name is written into generated Lua below, so only a plain connector
# name may pass; anything else could execute on the next reload. # name may pass; anything else could execute on the next reload.
if [[ ! $INTERNAL =~ ^[A-Za-z0-9._-]+$ ]]; then if [[ ! $INTERNAL =~ ^[A-Za-z0-9._-]+$ ]]; then
omarchy-notification-send -g 󰍹 "Refusing unsafe monitor name" omarchy-notification-send -g 󰍹 "$(omarchy-text "Refusing unsafe monitor name")"
exit 1 exit 1
fi fi
if ! omarchy-hyprland-monitor-external-active; then if ! omarchy-hyprland-monitor-external-active; then
omarchy-notification-send -g 󰍹 "Can't disable the only active display" omarchy-notification-send -g 󰍹 "$(omarchy-text "Can't disable the only active display")"
exit 1 exit 1
fi fi
if omarchy-hyprland-toggle-disabled $TOGGLE && omarchy-hyprland-toggle-disabled $MIRROR_TOGGLE; then if omarchy-hyprland-toggle-disabled $TOGGLE && omarchy-hyprland-toggle-disabled $MIRROR_TOGGLE; then
printf 'hl.monitor({ output = "%s", disabled = true })\n' "$INTERNAL" >"$TOGGLE_FLAG" printf 'hl.monitor({ output = "%s", disabled = true })\n' "$INTERNAL" >"$TOGGLE_FLAG"
omarchy-notification-send -g 󰍹 "Laptop display disabled" omarchy-notification-send -g 󰍹 "$(omarchy-text "Laptop display disabled")"
hyprctl reload hyprctl reload
fi fi
} }
+5 -5
View File
@@ -13,12 +13,12 @@ EXTERNAL=$(hyprctl monitors -j | jq -r '.[] | select(.name | test("^(eDP|LVDS|DS
on() { on() {
if [[ -z $EXTERNAL ]]; then if [[ -z $EXTERNAL ]]; then
omarchy-notification-send -g 󰍹 "No external monitors found for mirror" omarchy-notification-send -g 󰍹 "$(omarchy-text "No external monitors found for mirror")"
exit 1 exit 1
fi fi
if [[ -z $INTERNAL ]]; then if [[ -z $INTERNAL ]]; then
omarchy-notification-send -g 󰍹 "No laptop monitor found to mirror" omarchy-notification-send -g 󰍹 "$(omarchy-text "No laptop monitor found to mirror")"
exit 1 exit 1
fi fi
@@ -26,7 +26,7 @@ on() {
# names may pass; a user-created headless output can carry any name. # names may pass; a user-created headless output can carry any name.
for output in "$INTERNAL" "$EXTERNAL"; do for output in "$INTERNAL" "$EXTERNAL"; do
if [[ ! $output =~ ^[A-Za-z0-9._-]+$ ]]; then if [[ ! $output =~ ^[A-Za-z0-9._-]+$ ]]; then
omarchy-notification-send -g 󰍹 "Refusing unsafe monitor name" omarchy-notification-send -g 󰍹 "$(omarchy-text "Refusing unsafe monitor name")"
exit 1 exit 1
fi fi
done done
@@ -35,7 +35,7 @@ on() {
if omarchy-hyprland-toggle-disabled $TOGGLE; then if omarchy-hyprland-toggle-disabled $TOGGLE; then
printf 'hl.monitor({ output = "%s", mode = "preferred", position = "auto", scale = 1, mirror = "%s" })\n' "$EXTERNAL" "$INTERNAL" >"$TOGGLE_FLAG" printf 'hl.monitor({ output = "%s", mode = "preferred", position = "auto", scale = 1, mirror = "%s" })\n' "$EXTERNAL" "$INTERNAL" >"$TOGGLE_FLAG"
omarchy-notification-send -g 󰍹 "Mirroring enabled ($EXTERNAL)" omarchy-notification-send -g 󰍹 "$(omarchy-text "Mirroring enabled (%1)" "$EXTERNAL")"
hyprctl reload hyprctl reload
fi fi
} }
@@ -43,7 +43,7 @@ on() {
off() { off() {
if omarchy-hyprland-toggle-enabled $TOGGLE; then if omarchy-hyprland-toggle-enabled $TOGGLE; then
omarchy-hyprland-toggle $TOGGLE off omarchy-hyprland-toggle $TOGGLE off
omarchy-notification-send -g 󰍹 "Extended mode restored" omarchy-notification-send -g 󰍹 "$(omarchy-text "Extended mode restored")"
fi fi
} }
@@ -3,6 +3,6 @@
# omarchy:summary=Toggle single-window square aspect ratio. # omarchy:summary=Toggle single-window square aspect ratio.
case $(omarchy-hyprland-toggle single-window-aspect-ratio) in case $(omarchy-hyprland-toggle single-window-aspect-ratio) in
on) omarchy-notification-send -g  "Enable single-window square aspect ratio" ;; on) omarchy-notification-send -g  "$(omarchy-text "Enable single-window square aspect ratio")" ;;
off) omarchy-notification-send -g  "Disable single-window square aspect ratio" ;; off) omarchy-notification-send -g  "$(omarchy-text "Disable single-window square aspect ratio")" ;;
esac esac
+3 -3
View File
@@ -37,9 +37,9 @@ if (( $# == 0 )); then
fi fi
case $1 in case $1 in
opaque) LABEL="Opaque windows" ;; opaque) LABEL=$(omarchy-text "Opaque windows") ;;
transparent) LABEL="Transparent windows" ;; transparent) LABEL=$(omarchy-text "Transparent windows") ;;
glassy) LABEL="Glassy windows" ;; glassy) LABEL=$(omarchy-text "Glassy windows") ;;
*) *)
echo "Usage: omarchy-hyprland-window-transparency [opaque|transparent|glassy]" >&2 echo "Usage: omarchy-hyprland-window-transparency [opaque|transparent|glassy]" >&2
exit 1 exit 1
+2 -2
View File
@@ -40,14 +40,14 @@ notify_missing_width() {
local key="$1" local key="$1"
local workspace="$2" local workspace="$2"
omarchy-notification-send -g  "No saved width found for $key on workspace $workspace" "Use Super + Alt + Home to save one for this workspace." omarchy-notification-send -g  "$(omarchy-text "No saved width found for %1 on workspace %2" "$key" "$workspace")" "Use Super + Alt + Home to save one for this workspace."
} }
notify_saved_width() { notify_saved_width() {
local key="$1" local key="$1"
local workspace="$2" local workspace="$2"
omarchy-notification-send -g  "Saved width for $key on workspace $workspace" "Restore using Super + Home on this workspace." omarchy-notification-send -g  "$(omarchy-text "Saved width for %1 on workspace %2" "$key" "$workspace")" "Restore using Super + Home on this workspace."
} }
hypr_dispatch() { hypr_dispatch() {
@@ -32,4 +32,4 @@ printf 'o.workspace_mode({ default = "%s" })\n' "$1" >"$DEFAULT_FILE"
hyprctl reload >/dev/null hyprctl reload >/dev/null
omarchy-shell -q omarchy.workspaces refresh omarchy-shell -q omarchy.workspaces refresh
omarchy-notification-send -g 󱂬 "New workspaces use the $LABEL layout" omarchy-notification-send -g 󱂬 "$(omarchy-text "New workspaces use the %1 layout" "$LABEL")"
+4 -4
View File
@@ -43,17 +43,17 @@ if hyprctl eval "$APPLY" >/dev/null 2>&1; then
fi fi
if (( ! APPLIED )); then if (( ! APPLIED )); then
omarchy-notification-send -g 󱂬 "Workspace layout needs a Hyprland reload" omarchy-notification-send -g 󱂬 "$(omarchy-text "Workspace layout needs a Hyprland reload")"
elif [[ $NEW_MODE == "$(omarchy-hyprland-workspace-layout-default)" ]] && rm -f "$MODE_FILE"; then elif [[ $NEW_MODE == "$(omarchy-hyprland-workspace-layout-default)" ]] && rm -f "$MODE_FILE"; then
# Cycled onto the default, a workspace goes back to following it, so a later # Cycled onto the default, a workspace goes back to following it, so a later
# change of the default reaches it too. # change of the default reaches it too.
omarchy-notification-send -g 󱂬 "Workspace layout set to $NEW_MODE" omarchy-notification-send -g 󱂬 "$(omarchy-text "Workspace layout set to %1" "$NEW_MODE")"
elif mkdir -p "$MODES_DIR" && printf '%s\n' "$APPLY" >"$MODE_FILE"; then elif mkdir -p "$MODES_DIR" && printf '%s\n' "$APPLY" >"$MODE_FILE"; then
omarchy-notification-send -g 󱂬 "Workspace layout set to $NEW_MODE" omarchy-notification-send -g 󱂬 "$(omarchy-text "Workspace layout set to %1" "$NEW_MODE")"
else else
# The mode is on screen but nothing will bring it back, and the next press # The mode is on screen but nothing will bring it back, and the next press
# reads the mode from this file, so say so rather than counting it as set. # reads the mode from this file, so say so rather than counting it as set.
omarchy-notification-send -g 󱂬 "Workspace layout set to $NEW_MODE but could not be saved" omarchy-notification-send -g 󱂬 "$(omarchy-text "Workspace layout set to %1 but could not be saved" "$NEW_MODE")"
fi fi
# The bar shows the focused workspace's layout. # The bar shows the focused workspace's layout.
+1 -1
View File
@@ -23,5 +23,5 @@ superwhisper shortcuts set toggle "Alt+Space" >/dev/null
superwhisper shortcuts set hold none >/dev/null superwhisper shortcuts set hold none >/dev/null
omarchy-dictation-use superwhisper omarchy-dictation-use superwhisper
hyprctl reload >/dev/null hyprctl reload >/dev/null
omarchy-notification-send -g  "Superwhisper Dictation Ready" "Hold Right Alt or F9 to dictate (or toggle with Super + Ctrl + X)." -t 10000 omarchy-notification-send -g  "$(omarchy-text "Superwhisper Dictation Ready")" "$(omarchy-text "Hold Right Alt or F9 to dictate (or toggle with Super + Ctrl + X).")" -t 10000
superwhisper settings superwhisper settings
+1 -1
View File
@@ -33,4 +33,4 @@ systemctl --user enable --now voxtype.service
omarchy-dictation-use voxtype omarchy-dictation-use voxtype
hyprctl reload >/dev/null hyprctl reload >/dev/null
omarchy-notification-send -g  "Voxtype Dictation Ready" "Hold Right Alt or F9 to dictate (or toggle with Super + Ctrl + X)." -t 10000 omarchy-notification-send -g  "$(omarchy-text "Voxtype Dictation Ready")" "$(omarchy-text "Hold Right Alt or F9 to dictate (or toggle with Super + Ctrl + X).")" -t 10000
+46
View File
@@ -0,0 +1,46 @@
#!/bin/bash
# omarchy:summary=Show or switch the system language between English and Simplified Chinese
# omarchy:args=[en|zh]
# omarchy:examples=omarchy language | omarchy language zh
# omarchy:requires-sudo=true
set -euo pipefail
locale_conf=/etc/locale.conf
if (($# == 0)); then
lang=$(sed -n 's/^LANG=//p' "$locale_conf")
# locale.conf may quote the value.
lang=${lang#[\"\']}
printf '%s\n' "${lang%[\"\']}"
exit 0
fi
case ${1:-} in
en) lang=en_US.UTF-8 ;;
zh) lang=zh_CN.UTF-8 ;;
*)
echo "Usage: omarchy-language [en|zh]" >&2
exit 1
;;
esac
sudo sed -i "s/^#\(${lang/./\\.} UTF-8\)/\1/" /etc/locale.gen
sudo locale-gen
if grep -q '^LANG=' "$locale_conf"; then
sudo sed -i "s/^LANG=.*/LANG=$lang/" "$locale_conf"
else
sudo sed -i '$a\' "$locale_conf"
echo "LANG=$lang" | sudo tee -a "$locale_conf" >/dev/null
fi
# The language reaches only a new session, so offer one in the new language.
prompt=$(LANG=$lang omarchy-text "Log out now to switch the language?")
log_out=$(LANG=$lang omarchy-text "Log out now")
later=$(LANG=$lang omarchy-text "Later")
if [[ -t 0 && -t 1 ]] && gum confirm --affirmative "$log_out" --negative "$later" "$prompt" 2>&1; then
omarchy-system-logout
else
LANG=$lang omarchy-text "Log back in to switch the language."
fi
+1 -1
View File
@@ -11,5 +11,5 @@ if [[ -z $path ]]; then
exit 1 exit 1
fi fi
omarchy-notification-send -u low "Editing config file" "$path" omarchy-notification-send -u low "$(omarchy-text "Editing config file")" "$path"
exec omarchy-launch-editor "$path" exec omarchy-launch-editor "$path"
+1 -1
View File
@@ -16,7 +16,7 @@ terminal=$(xdg-terminal-exec --print-id)
case $terminal in case $terminal in
*Alacritty* | *ghostty* | *foot* | *kitty*) ;; *Alacritty* | *ghostty* | *foot* | *kitty*) ;;
*) *)
omarchy-notification-send -g ✋ "Screensaver only runs in Alacritty, Foot, Ghostty, or Kitty" omarchy-notification-send -g ✋ "$(omarchy-text "Screensaver only runs in Alacritty, Foot, Ghostty, or Kitty")"
exit 1 exit 1
;; ;;
esac esac
+1 -1
View File
@@ -28,7 +28,7 @@ rows=$(jq -r --arg icon "$PLUGIN_ICON" \
". as \$plugins ". as \$plugins
| .[] | select($filter) | .[] | select($filter)
| \$icon + \"\\t\" + .name + \"\\t\" + .id" <<<"$plugins") | \$icon + \"\\t\" + .name + \"\\t\" + .id" <<<"$plugins")
[[ -n $rows ]] || { omarchy-notification-send "No plugin to ${1}"; exit 0; } [[ -n $rows ]] || { omarchy-notification-send "$(omarchy-text "No plugin to $1")"; exit 0; }
selection=$(omarchy-menu-select "${1^} plugin" <<<"$rows") || exit 0 selection=$(omarchy-menu-select "${1^} plugin" <<<"$rows") || exit 0
[[ -n $selection ]] || exit 0 [[ -n $selection ]] || exit 0
+1 -1
View File
@@ -33,7 +33,7 @@ else
picked=$(omarchy-file-select "${select_args[@]}") || status=$? picked=$(omarchy-file-select "${select_args[@]}") || status=$?
if ((${status:-0} > 1)); then if ((${status:-0} > 1)); then
omarchy-notification-send -g "" -u critical "Could not share" "The file chooser did not open" omarchy-notification-send -g "" -u critical "$(omarchy-text "Could not share")" "$(omarchy-text "The file chooser did not open")"
exit 1 exit 1
fi fi
+1 -1
View File
@@ -9,4 +9,4 @@ set -e
timezone=$(timedatectl list-timezones | omarchy-menu-select "Set timezone" -- --width 520 --maxheight 520) || exit 1 timezone=$(timedatectl list-timezones | omarchy-menu-select "Set timezone" -- --width 520 --maxheight 520) || exit 1
sudo timedatectl set-timezone "$timezone" sudo timedatectl set-timezone "$timezone"
omarchy-shell -q omarchy.clock refresh omarchy-shell -q omarchy.clock refresh
omarchy-notification-send "Timezone is now set to $timezone" omarchy-notification-send "$(omarchy-text "Timezone is now set to %1" "$timezone")"
+3 -3
View File
@@ -21,9 +21,9 @@ pending_migrations=$(omarchy-migrate --pending 2>/dev/null) || exit 0
pending_count=$(printf '%s\n' "$pending_migrations" | sed '/^[[:space:]]*$/d' | wc -l) pending_count=$(printf '%s\n' "$pending_migrations" | sed '/^[[:space:]]*$/d' | wc -l)
if (( pending_count == 1 )); then if (( pending_count == 1 )); then
message="Click to run 1 pending migration." message=$(omarchy-text "Click to run 1 pending migration.")
else else
message="Click to run $pending_count pending migrations." message=$(omarchy-text "Click to run %1 pending migrations." "$pending_count")
fi fi
# This runs from omarchy-migrate-notify.service after graphical-session.target, # This runs from omarchy-migrate-notify.service after graphical-session.target,
@@ -40,7 +40,7 @@ fi
# The shell keeps the click command with the toast, so this oneshot can hand the # The shell keeps the click command with the toast, so this oneshot can hand the
# invitation over and exit instead of staying activated until it is answered. # invitation over and exit instead of staying activated until it is answered.
omarchy-notification-send -u critical -g  "Pending Omarchy Migrations" "$message" \ omarchy-notification-send -u critical -g  "$(omarchy-text "Pending Omarchy Migrations")" "$message" \
--exec omarchy-launch-floating-terminal-with-presentation omarchy-migrate && exit 0 --exec omarchy-launch-floating-terminal-with-presentation omarchy-migrate && exit 0
# Reached when the notification could not be handed off, so fall back to telling # Reached when the notification could not be handed off, so fall back to telling
+1 -1
View File
@@ -2,4 +2,4 @@
# omarchy:summary=Show the current time and date notification # omarchy:summary=Show the current time and date notification
omarchy-notification-send -g  -u low "$(date +"%A %H:%M · %d %B %Y · Week %V")" omarchy-notification-send -g  -u low "$(date +"%A %H:%M · %d %B %Y") · $(omarchy-text "Week %1" "$(date +%V)")"
+2 -2
View File
@@ -159,8 +159,8 @@ done
omarchy-plugin-enable "$new_id" >/dev/null omarchy-plugin-enable "$new_id" >/dev/null
clone_complete=1 clone_complete=1
omarchy-notification-send -g 󰐱 \ omarchy-notification-send -g 󰐱 \
"Editing Cloned Plugin" \ "$(omarchy-text "Editing Cloned Plugin")" \
"Original plugin has been replace by clone." "$(omarchy-text "Original plugin has been replace by clone.")"
echo "Cloned $source_id to $target_dir and switched to $new_id" echo "Cloned $source_id to $target_dir and switched to $new_id"
if (( edit_clone )); then if (( edit_clone )); then
# Word-splitting is deliberate: EDITOR may carry flags. # Word-splitting is deliberate: EDITOR may carry flags.
+20 -2
View File
@@ -42,11 +42,29 @@ if [[ ! -f $templates/pacman-$channel.conf || ! -f $templates/mirrorlist-$channe
exit 1 exit 1
fi fi
conf=$templates/pacman-$channel.conf mirrorlist=$templates/mirrorlist-$channel
# Regions render x86 pacman only (omarchy #13690).
if [[ $platform == x86 ]]; then
# Render the channel templates plus this machine's regional additions as the
# caller, so root only copies finished files. The scratch directory goes on
# every exit, including a failed render, a refused sudo prompt, or a signal;
# revoking the sudo timestamp stays the last thing the exit path does.
rendered=$(mktemp -d)
cleanup_refresh() {
local status=$?
rm -rf "$rendered"
omarchy_security_exit_with_revoked_sudo "$status"
}
trap cleanup_refresh EXIT
"$OMARCHY_PATH/bin/omarchy-apply-pacman" --render "$channel" "$rendered"
conf=$rendered/pacman.conf mirrorlist=$rendered/mirrorlist
fi
sudo cp -f /etc/pacman.conf /etc/pacman.conf.bak sudo cp -f /etc/pacman.conf /etc/pacman.conf.bak
sudo cp -f /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak sudo cp -f /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
echo "Setting channel to $channel" echo "Setting channel to $channel"
sudo cp -f "$templates/pacman-$channel.conf" /etc/pacman.conf sudo cp -f "$conf" /etc/pacman.conf
sudo cp -f "$templates/mirrorlist-$channel" /etc/pacman.d/mirrorlist sudo cp -f "$mirrorlist" /etc/pacman.d/mirrorlist
# Allow user customization of /etc/pacman.conf before the upgrade runs, so # Allow user customization of /etc/pacman.conf before the upgrade runs, so
# custom repositories and IgnorePkg entries shape the downgrade-capable # custom repositories and IgnorePkg entries shape the downgrade-capable
+63
View File
@@ -0,0 +1,63 @@
#!/bin/bash
# omarchy:summary=Show or switch the region this machine is set up for
# omarchy:args=[global|cn]
# omarchy:examples=omarchy region | omarchy region cn
# omarchy:requires-sudo=true
set -euo pipefail
region_file=/etc/omarchy/region
if (($# == 0)); then
if [[ ! -e $region_file ]]; then
echo "Global"
elif [[ $(<"$region_file") == "cn" ]]; then
echo "China"
else
echo "Unknown region in $region_file: $(<"$region_file")" >&2
exit 1
fi
exit 0
fi
if [[ $1 != "global" && $1 != "cn" ]]; then
echo "Usage: omarchy-region [global|cn]" >&2
exit 1
fi
channel=$(omarchy-version-channel)
if [[ $channel != "stable" && $channel != "rc" && $channel != "edge" ]]; then
echo "Cannot tell this machine's package channel ($channel); run omarchy channel set first" >&2
exit 1
fi
# The cn profile renders x86 pacman only (omarchy #13690).
if [[ $1 == "cn" && $(omarchy-hw-platform) != "x86" ]]; then
echo "The China region needs an x86 machine; $(omarchy-hw-platform) has no China profile yet" >&2
exit 1
fi
if [[ $1 == "cn" ]]; then
# Upgrade first: the keyring install below syncs new databases.
omarchy-update-pacman -Syu --noconfirm
sudo env OMARCHY_REGION=cn OMARCHY_PATH="$OMARCHY_PATH" bash -e "$OMARCHY_PATH/install/config/region.sh"
# Trust ArchLinuxCN before the refresh upgrades through it.
rendered=$(mktemp -d)
trap 'rm -rf "$rendered"' EXIT
omarchy-apply-pacman --render "$channel" "$rendered"
mapfile -t profile_packages < <(grep -Ev '^[[:space:]]*(#|$)' "$OMARCHY_PATH/default/regions/cn/packages")
sudo pacman --config "$rendered/pacman.conf" -Sy --noconfirm --needed "${profile_packages[@]}"
sudo pacman-key --populate archlinuxcn
omarchy-refresh-pacman "$channel"
else
sudo env OMARCHY_REGION=global OMARCHY_PATH="$OMARCHY_PATH" bash -e "$OMARCHY_PATH/install/config/region.sh"
omarchy-refresh-pacman "$channel"
fi
# The developer mirrors reach only a new session, so offer one.
if [[ -t 0 && -t 1 ]] && gum confirm --affirmative "$(omarchy-text "Log out now")" --negative "$(omarchy-text "Later")" "$(omarchy-text "Log out now to switch the developer mirrors?")"; then
omarchy-system-logout
else
omarchy-text "Log back in to switch the developer mirrors."
fi
+15 -14
View File
@@ -57,16 +57,16 @@ show_reminders() {
[[ -f $reminder_dir/${timer%.timer}.message ]] && reminder_message=$(<"$reminder_dir/${timer%.timer}.message") [[ -f $reminder_dir/${timer%.timer}.message ]] && reminder_message=$(<"$reminder_dir/${timer%.timer}.message")
if [[ -n $reminder_message ]]; then if [[ -n $reminder_message ]]; then
body+="$reminder_message in $(format_remaining $remaining) ($(date -d "@$next" +%-H:%M))"$'\n' body+="$(omarchy-text "%1 in %2 (%3)" "$reminder_message" "$(format_remaining $remaining)" "$(date -d "@$next" +%-H:%M)")"$'\n'
else else
body+="${reminder_minutes}-min reminder in $(format_remaining $remaining) ($(date -d "@$next" +%-H:%M))"$'\n' body+="$(omarchy-text "%1-min reminder in %2 (%3)" "$reminder_minutes" "$(format_remaining $remaining)" "$(date -d "@$next" +%-H:%M)")"$'\n'
fi fi
done < <(active_reminder_timers "$now") done < <(active_reminder_timers "$now")
if [[ -z $body ]]; then if [[ -z $body ]]; then
omarchy-notification-send -g 󰢌 "Upcoming reminders" "No outstanding reminders" omarchy-notification-send -g 󰢌 "$(omarchy-text "Upcoming reminders")" "$(omarchy-text "No outstanding reminders")"
else else
omarchy-notification-send -g 󰢌 "Upcoming reminders" "${body%$'\n'}" omarchy-notification-send -g 󰢌 "$(omarchy-text "Upcoming reminders")" "${body%$'\n'}"
fi fi
} }
@@ -75,7 +75,8 @@ show_json() {
local reminder_dir="${XDG_RUNTIME_DIR:-/tmp}/omarchy-reminders" local reminder_dir="${XDG_RUNTIME_DIR:-/tmp}/omarchy-reminders"
local now=$(date +%s) local now=$(date +%s)
local count=0 local count=0
local tooltip="Set Reminder" local tooltip
tooltip=$(omarchy-text "Set Reminder")
while IFS=$'\t' read -r timer next; do while IFS=$'\t' read -r timer next; do
count=$((count + 1)) count=$((count + 1))
@@ -91,7 +92,7 @@ show_json() {
if [[ -n $reminder_message ]]; then if [[ -n $reminder_message ]]; then
label=$reminder_message label=$reminder_message
else else
label="${reminder_minutes}-min reminder" label=$(omarchy-text "%1-min reminder" "$reminder_minutes")
fi fi
item_json=$(jq -cn \ item_json=$(jq -cn \
@@ -109,9 +110,9 @@ show_json() {
done < <(active_reminder_timers "$now") done < <(active_reminder_timers "$now")
if ((count == 1)); then if ((count == 1)); then
tooltip="1 reminder" tooltip=$(omarchy-text "1 reminder")
elif ((count > 1)); then elif ((count > 1)); then
tooltip="$count reminders" tooltip=$(omarchy-text "%1 reminders" "$count")
fi fi
jq -cn --argjson count "$count" --arg tooltip "$tooltip" --argjson reminders "$reminders_json" '{count:$count,active:($count > 0),tooltip:$tooltip,reminders:$reminders}' jq -cn --argjson count "$count" --arg tooltip "$tooltip" --argjson reminders "$reminders_json" '{count:$count,active:($count > 0),tooltip:$tooltip,reminders:$reminders}'
@@ -129,7 +130,7 @@ clear_reminders() {
rm -f "$reminder_dir"/omarchy-reminder-*.message 2>/dev/null || true rm -f "$reminder_dir"/omarchy-reminder-*.message 2>/dev/null || true
refresh_indicator refresh_indicator
omarchy-notification-send -g 󰢌 "All reminders have been cleared" omarchy-notification-send -g 󰢌 "$(omarchy-text "All reminders have been cleared")"
} }
usage() { usage() {
@@ -176,7 +177,7 @@ if [[ -z $minutes ]] || [[ ! $minutes =~ ^[0-9]+$ ]] || ((minutes == 0)); then
fi fi
if [[ -z $message ]]; then if [[ -z $message ]]; then
message="Your ${minutes} minutes are up" message=$(omarchy-text "Your %1 minutes are up" "$minutes")
fi fi
set_at=$(date +%s) set_at=$(date +%s)
@@ -184,18 +185,18 @@ remind_at=$(date -d "+${minutes} minutes" +%H:%M)
unit="omarchy-reminder-${minutes}m-$set_at" unit="omarchy-reminder-${minutes}m-$set_at"
reminder_dir="${XDG_RUNTIME_DIR:-/tmp}/omarchy-reminders" reminder_dir="${XDG_RUNTIME_DIR:-/tmp}/omarchy-reminders"
message_file="$reminder_dir/$unit.message" message_file="$reminder_dir/$unit.message"
confirmation="You'll be reminded at $remind_at" confirmation=$(omarchy-text "You'll be reminded at %1" "$remind_at")
confirmation_title="Reminder set for ${minutes} minutes" confirmation_title=$(omarchy-text "Reminder set for %1 minutes" "$minutes")
mkdir -p "$reminder_dir" mkdir -p "$reminder_dir"
if [[ -n $custom_message ]]; then if [[ -n $custom_message ]]; then
printf "%s" "$custom_message" >"$message_file" printf "%s" "$custom_message" >"$message_file"
confirmation_title="$custom_message in ${minutes} minutes" confirmation_title=$(omarchy-text "%1 in %2 minutes" "$custom_message" "$minutes")
fi fi
systemd-run --user --quiet --collect --on-active="${minutes}m" --unit="$unit" \ systemd-run --user --quiet --collect --on-active="${minutes}m" --unit="$unit" \
bash -c 'omarchy-notification-send -g 󰢌 "Reminder" "$1"; rm -f "$2"; omarchy-shell -q omarchy.indicators refresh >/dev/null 2>&1 || true' bash "$message" "$message_file" bash -c 'omarchy-notification-send -g 󰢌 "$(omarchy-text "Reminder")" "$1"; rm -f "$2"; omarchy-shell -q omarchy.indicators refresh >/dev/null 2>&1 || true' bash "$message" "$message_file"
refresh_indicator refresh_indicator
omarchy-notification-send -g 󰢌 "$confirmation_title" "$confirmation" omarchy-notification-send -g 󰢌 "$confirmation_title" "$confirmation"
+1 -1
View File
@@ -6,7 +6,7 @@
nohup bash -c "sleep 2 && uwsm stop" >/dev/null 2>&1 & nohup bash -c "sleep 2 && uwsm stop" >/dev/null 2>&1 &
omarchy-osd -i logout -m "Logging out" -d 5000 omarchy-osd -i logout -m "$(omarchy-text "Logging out")" -d 5000
# Now close all windows # Now close all windows
omarchy-hyprland-window-close-all omarchy-hyprland-window-close-all
+1 -1
View File
@@ -8,7 +8,7 @@
# scope cannot terminate it before it runs. # scope cannot terminate it before it runs.
systemd-run --user --collect --quiet --on-active="2s" --timer-property=AccuracySec=100ms systemctl reboot --no-wall || exit 1 systemd-run --user --collect --quiet --on-active="2s" --timer-property=AccuracySec=100ms systemctl reboot --no-wall || exit 1
omarchy-osd -i reboot -m "Rebooting" -d 5000 omarchy-osd -i reboot -m "$(omarchy-text "Rebooting")" -d 5000
omarchy-state clear re*-required omarchy-state clear re*-required
+2 -2
View File
@@ -7,7 +7,7 @@
if [[ ${1:-} == "--inhibited" ]]; then if [[ ${1:-} == "--inhibited" ]]; then
# Close windows in the background so they cannot delay power-off. # Close windows in the background so they cannot delay power-off.
( (
omarchy-osd -i shutdown -m "Shutting down" -d 5000 omarchy-osd -i shutdown -m "$(omarchy-text "Shutting down")" -d 5000
omarchy-state clear re*-required omarchy-state clear re*-required
omarchy-hyprland-window-close-all omarchy-hyprland-window-close-all
) & ) &
@@ -21,7 +21,7 @@ elif [[ ${1:-} == "--inhibit" ]]; then
--who=Omarchy --why="Shutdown in progress" --mode=block \ --who=Omarchy --why="Shutdown in progress" --mode=block \
"$0" --inhibited || { "$0" --inhibited || {
status=$? status=$?
omarchy-notification-send -u critical "Shutdown failed" "Could not complete shutdown. Please try again." omarchy-notification-send -u critical "$(omarchy-text "Shutdown failed")" "$(omarchy-text "Could not complete shutdown. Please try again.")"
exit "$status" exit "$status"
} }
else else
+2 -2
View File
@@ -98,8 +98,8 @@ report_unsecured() {
"$1" >&2 "$1" >&2
omarchy-notification-send -u critical -g 󰌾 \ omarchy-notification-send -u critical -g 󰌾 \
"Screen did not lock before suspend" \ "$(omarchy-text "Screen did not lock before suspend")" \
"The session was left unlocked ($1)." >/dev/null 2>&1 || true "$(omarchy-text "The session was left unlocked (%1)." "$1")" >/dev/null 2>&1 || true
exit 1 exit 1
} }
+1 -1
View File
@@ -59,7 +59,7 @@ claim_path() {
announce() { announce() {
local path="$1" local path="$1"
local name="${path##*/}" local name="${path##*/}"
local args=("Received $name" "Saved to ${dir/#$HOME/~}" -u critical) local args=("$(omarchy-text "Received %1" "$name")" "$(omarchy-text "Saved to %1" "${dir/#$HOME/~}")" -u critical)
case "${name,,}" in case "${name,,}" in
*.png | *.jpg | *.jpeg | *.gif | *.webp | *.avif | *.bmp | *.tif | *.tiff) *.png | *.jpg | *.jpeg | *.gif | *.webp | *.avif | *.bmp | *.tif | *.tiff)
+4 -4
View File
@@ -27,8 +27,8 @@ if ((${#files[@]} == 0)); then
picked=$(omarchy-file-select --title "Send to $name" --multiple) || status=$? picked=$(omarchy-file-select --title "Send to $name" --multiple) || status=$?
if ((${status:-0} > 1)); then if ((${status:-0} > 1)); then
omarchy-notification-send -g "󰒊" -u critical "Could not send to $name" \ omarchy-notification-send -g "󰒊" -u critical "$(omarchy-text "Could not send to %1" "$name")" \
"The file chooser did not open" "$(omarchy-text "The file chooser did not open")"
exit 1 exit 1
fi fi
@@ -43,8 +43,8 @@ else
fi fi
if error=$(tailscale file cp --update-interval=0 -- "${files[@]}" "$machine:" 2>&1); then if error=$(tailscale file cp --update-interval=0 -- "${files[@]}" "$machine:" 2>&1); then
omarchy-notification-send -g "󰒊" "Sent to $name" "$what" omarchy-notification-send -g "󰒊" "$(omarchy-text "Sent to %1" "$name")" "$what"
else else
omarchy-notification-send -g "󰒊" -u critical "Could not send to $name" "${error:-Taildrop transfer failed}" omarchy-notification-send -g "󰒊" -u critical "$(omarchy-text "Could not send to %1" "$name")" "${error:-$(omarchy-text "Taildrop transfer failed")}"
exit 1 exit 1
fi fi
+38
View File
@@ -0,0 +1,38 @@
#!/bin/bash
# omarchy:summary=Print an Omarchy message in the session's language, with %1.. filled from the arguments
# omarchy:args=<english> [args...]
# omarchy:examples=omarchy-text "Sent to %1" phone
# omarchy:hidden=true
set -euo pipefail
if (($# < 1)); then
echo "Usage: omarchy-text <english> [args...]" >&2
exit 1
fi
text=$1
shift
# The shell's table is the one source: one JSON-encoded "english": "chinese" pair per line.
if [[ ${LANG:-} == zh_CN* ]]; then
translated=$(grep -E '^ ".*": ".*",?$' "$OMARCHY_PATH/shell/Commons/I18nZh.js" | sed 's/,$//' | paste -sd, |
sed 's/^/{/; s/$/}/' | jq -r --arg key "$text" '.[$key] // empty')
[[ -z $translated ]] || text=$translated
fi
# One pass over the template, so an argument that holds %2 is printed as given.
out=""
rest=$text
while [[ $rest =~ ^([^%]*)%(.)(.*)$ ]]; do
out+=${BASH_REMATCH[1]}
mark=${BASH_REMATCH[2]}
rest=${BASH_REMATCH[3]}
if [[ $mark == [1-9] ]] && ((mark <= $#)); then
out+=${!mark}
else
out+="%$mark"
fi
done
printf '%s\n' "$out$rest"
+2 -2
View File
@@ -10,12 +10,12 @@ toggle="$HOME/.local/state/omarchy/toggles/background-intros-off"
case ${1:-} in case ${1:-} in
enable) enable)
rm -f "$toggle" rm -f "$toggle"
omarchy-notification-send "Background Intros" "Enabled" omarchy-notification-send "$(omarchy-text "Background Intros")" "$(omarchy-text "Enabled")"
;; ;;
disable) disable)
mkdir -p "$(dirname "$toggle")" mkdir -p "$(dirname "$toggle")"
touch "$toggle" touch "$toggle"
omarchy-notification-send "Background Intros" "Disabled" omarchy-notification-send "$(omarchy-text "Background Intros")" "$(omarchy-text "Disabled")"
;; ;;
toggle) toggle)
if [[ -f $toggle ]]; then if [[ -f $toggle ]]; then
+1 -1
View File
@@ -17,7 +17,7 @@ mapfile -d '' -t BACKGROUNDS < <(
TOTAL=${#BACKGROUNDS[@]} TOTAL=${#BACKGROUNDS[@]}
if (( TOTAL == 0 )); then if (( TOTAL == 0 )); then
omarchy-notification-send "No background was found for theme" -t 2000 omarchy-notification-send "$(omarchy-text "No background was found for theme")" -t 2000
else else
# Get current background from symlink # Get current background from symlink
if [[ -L $CURRENT_BACKGROUND_LINK ]]; then if [[ -L $CURRENT_BACKGROUND_LINK ]]; then
+1 -1
View File
@@ -35,5 +35,5 @@ fi
# Now remove the theme directory for THEME_NAME # Now remove the theme directory for THEME_NAME
rm -rf "$THEME_PATH" rm -rf "$THEME_PATH"
omarchy-notification-send "Theme removed" "$THEME_NAME" || true omarchy-notification-send "$(omarchy-text "Theme removed")" "$THEME_NAME" || true
echo "Removed $THEME_NAME" echo "Removed $THEME_NAME"
+1 -1
View File
@@ -190,7 +190,7 @@ set_theme_background() {
if [[ -z $CHOSEN_THEME_BACKGROUND || ! -f $CHOSEN_THEME_BACKGROUND ]]; then if [[ -z $CHOSEN_THEME_BACKGROUND || ! -f $CHOSEN_THEME_BACKGROUND ]]; then
if ! choose_theme_background; then if ! choose_theme_background; then
omarchy-notification-send "No background was found for theme" -t 2000 omarchy-notification-send "$(omarchy-text "No background was found for theme")" -t 2000
shell_ipc shell applyTheme "$colors_payload" "$shell_payload" || true shell_ipc shell applyTheme "$colors_payload" "$shell_payload" || true
return return
fi fi
+2 -2
View File
@@ -16,7 +16,7 @@ off) omarchy-hyprland-toggle no-animations on ;;
esac esac
if omarchy-hyprland-toggle-enabled no-animations; then if omarchy-hyprland-toggle-enabled no-animations; then
omarchy-notification-send -g 󰗘 "Animations disabled" omarchy-notification-send -g 󰗘 "$(omarchy-text "Animations disabled")"
else else
omarchy-notification-send -g 󰗘 "Animations enabled" omarchy-notification-send -g 󰗘 "$(omarchy-text "Animations enabled")"
fi fi
+2 -2
View File
@@ -11,8 +11,8 @@ omarchy-toggle crash-capture-off
# starting only settles this session; the next login reads the flag itself. # starting only settles this session; the next login reads the flag itself.
if omarchy-toggle-enabled crash-capture-off; then if omarchy-toggle-enabled crash-capture-off; then
systemctl --user stop omarchy-crash-watch.service systemctl --user stop omarchy-crash-watch.service
omarchy-notification-send -g "$CRASH_GLYPH" "Crash capture disabled" omarchy-notification-send -g "$CRASH_GLYPH" "$(omarchy-text "Crash capture disabled")"
else else
systemctl --user start omarchy-crash-watch.service systemctl --user start omarchy-crash-watch.service
omarchy-notification-send -g "$CRASH_GLYPH" "Crash capture enabled" omarchy-notification-send -g "$CRASH_GLYPH" "$(omarchy-text "Crash capture enabled")"
fi fi
+2 -2
View File
@@ -5,7 +5,7 @@
omarchy-toggle screensaver-off omarchy-toggle screensaver-off
if omarchy-toggle-enabled screensaver-off; then if omarchy-toggle-enabled screensaver-off; then
omarchy-notification-send -g 󱄄 "Screensaver disabled" omarchy-notification-send -g 󱄄 "$(omarchy-text "Screensaver disabled")"
else else
omarchy-notification-send -g 󱄄 "Screensaver enabled" omarchy-notification-send -g 󱄄 "$(omarchy-text "Screensaver enabled")"
fi fi
+2 -2
View File
@@ -5,7 +5,7 @@
omarchy-toggle suspend-off omarchy-toggle suspend-off
if omarchy-toggle-enabled suspend-off; then if omarchy-toggle-enabled suspend-off; then
omarchy-notification-send -g 󰒲 "Suspend removed from system menu" omarchy-notification-send -g 󰒲 "$(omarchy-text "Suspend removed from system menu")"
else else
omarchy-notification-send -g 󰒲 "Suspend now available in system menu" omarchy-notification-send -g 󰒲 "$(omarchy-text "Suspend now available in system menu")"
fi fi
+2 -2
View File
@@ -5,7 +5,7 @@
omarchy-toggle herdr-theme-sync omarchy-toggle herdr-theme-sync
if omarchy-toggle-enabled herdr-theme-sync; then if omarchy-toggle-enabled herdr-theme-sync; then
omarchy-notification-send -g 󰸌 "Herdr theme sync enabled" omarchy-notification-send -g 󰸌 "$(omarchy-text "Herdr theme sync enabled")"
else else
omarchy-notification-send -g 󰸌 "Herdr theme sync disabled" omarchy-notification-send -g 󰸌 "$(omarchy-text "Herdr theme sync disabled")"
fi fi
+3 -3
View File
@@ -193,14 +193,14 @@ main() {
output=$(output_path "$input" "$format" "$resolution") output=$(output_path "$input" "$format" "$resolution")
if [[ $type == "video" ]]; then if [[ $type == "video" ]]; then
omarchy-notification-send -g  "Transcoding video…" "$(basename -- "$input") to $format ($resolution)" omarchy-notification-send -g  "$(omarchy-text "Transcoding video…")" "$(omarchy-text "%1 to %2 (%3)" "$(basename -- "$input")" "$format" "$resolution")"
transcode_video "$input" "$format" "$resolution" "$output" transcode_video "$input" "$format" "$resolution" "$output"
copy_to_clipboard "$output" copy_to_clipboard "$output"
omarchy-notification-send -g  "Transcoded to $resolution $format" "Saved and copied to clipboard." omarchy-notification-send -g  "$(omarchy-text "Transcoded to %1 %2" "$resolution" "$format")" "Saved and copied to clipboard."
else else
transcode_picture "$input" "$format" "$resolution" "$output" transcode_picture "$input" "$format" "$resolution" "$output"
copy_to_clipboard "$output" copy_to_clipboard "$output"
omarchy-notification-send -g  "Transcoded to $resolution $format" "Saved and copied to clipboard." omarchy-notification-send -g  "$(omarchy-text "Transcoded to %1 %2" "$resolution" "$format")" "Saved and copied to clipboard."
fi fi
} }
+1 -1
View File
@@ -37,5 +37,5 @@ icon_name=$(printf '%s\n' "$APP_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^[:
rm -f "$DESKTOP_DIR/$APP_NAME.desktop" rm -f "$DESKTOP_DIR/$APP_NAME.desktop"
rm -f "$ICON_DIR/$icon_name.png" "$ICON_DIR/$APP_NAME.png" "$OLD_ICON_DIR/$APP_NAME.png" rm -f "$ICON_DIR/$icon_name.png" "$ICON_DIR/$APP_NAME.png" "$OLD_ICON_DIR/$APP_NAME.png"
if [[ ${OMARCHY_REMOVE_NOTIFY:-true} != "false" ]]; then if [[ ${OMARCHY_REMOVE_NOTIFY:-true} != "false" ]]; then
omarchy-notification-send -g  "TUI removed" "$APP_NAME" omarchy-notification-send -g  "$(omarchy-text "TUI removed")" "$APP_NAME"
fi fi
+2 -2
View File
@@ -125,8 +125,8 @@ while true; do
--app-name omarchy-action \ --app-name omarchy-action \
--urgency critical \ --urgency critical \
--glyph 󰖀 \ --glyph 󰖀 \
"USB accessory blocked" \ "$(omarchy-text "USB accessory blocked")" \
"Click to review it. Keep it blocked unless you recognize the device." \ "$(omarchy-text "Click to review it. Keep it blocked unless you recognize the device.")" \
--exec omarchy-launch-floating-terminal-with-presentation \ --exec omarchy-launch-floating-terminal-with-presentation \
omarchy-usb-authorization-review "$token"; then omarchy-usb-authorization-review "$token"; then
exit 0 exit 0
+1 -1
View File
@@ -56,6 +56,6 @@ rm -f "${desktop_file:-$DESKTOP_DIR/$APP_NAME.desktop}"
rm -f "$ICON_DIR/$icon_name.png" "$ICON_DIR/$APP_NAME.png" "$OLD_ICON_DIR/$APP_NAME.png" rm -f "$ICON_DIR/$icon_name.png" "$ICON_DIR/$APP_NAME.png" "$OLD_ICON_DIR/$APP_NAME.png"
if [[ ${OMARCHY_REMOVE_NOTIFY:-true} != "false" ]]; then if [[ ${OMARCHY_REMOVE_NOTIFY:-true} != "false" ]]; then
omarchy-notification-send -g  "Web app removed" "$APP_NAME" omarchy-notification-send -g  "$(omarchy-text "Web app removed")" "$APP_NAME"
fi fi
update-desktop-database "$DESKTOP_DIR" &>/dev/null update-desktop-database "$DESKTOP_DIR" &>/dev/null
+1 -1
View File
@@ -1420,7 +1420,7 @@ launch_windows() {
if ! priv up_wait; then if ! priv up_wait; then
echo "❌ Failed to start Windows VM!" echo "❌ Failed to start Windows VM!"
echo " Try checking: omarchy-windows-vm status" echo " Try checking: omarchy-windows-vm status"
omarchy-notification-send -u critical "Windows VM" "Failed to start Windows VM" omarchy-notification-send -u critical "$(omarchy-text "Windows VM")" "$(omarchy-text "Failed to start Windows VM")"
exit 1 exit 1
fi fi
+19 -14
View File
@@ -10,6 +10,11 @@ import sys
import configure as setup import configure as setup
def text(english, *args):
"""English with %1.. filled, in the session's language, from the shell's table."""
return subprocess.run(["omarchy-text", english, *map(str, args)], capture_output=True, text=True, check=True).stdout.rstrip("\n")
def keyboard_catalog(): def keyboard_catalog():
# Read the same choices as the ISO and first-boot form, then convert console # Read the same choices as the ISO and first-boot form, then convert console
# keymaps through systemd's mapping, just as localectl does during install. # keymaps through systemd's mapping, just as localectl does during install.
@@ -64,7 +69,7 @@ def choose(title, catalog, selected, kind, overrides=None):
if result.returncode == 1: if result.returncode == 1:
return None return None
if result.returncode: if result.returncode:
raise RuntimeError(result.stderr.strip() or "The selection menu could not open") raise RuntimeError(result.stderr.strip() or text("The selection menu could not open"))
def input_catalog(items): def input_catalog(items):
@@ -78,7 +83,7 @@ def input_catalog(items):
def input_items(items, selected, overrides=None): def input_items(items, selected, overrides=None):
if not any(item[0].startswith("keyboard-") for item in items): if not any(item[0].startswith("keyboard-") for item in items):
raise RuntimeError("The current input group has no keyboard input") raise RuntimeError(text("The current input group has no keyboard input"))
# Retained entries keep their switching order; new engines follow them. # Retained entries keep their switching order; new engines follow them.
kept = [item for item in items if item[0].startswith("keyboard-") or item[0] in selected] kept = [item for item in items if item[0].startswith("keyboard-") or item[0] in selected]
current = dict(items) current = dict(items)
@@ -93,7 +98,7 @@ def set_inputs(group, layout, before, after):
setup.run(["fcitx5-remote", "-c"]) setup.run(["fcitx5-remote", "-c"])
setup.live_set(group, layout, after) setup.live_set(group, layout, after)
if setup.live_group() != (group, layout, after): if setup.live_group() != (group, layout, after):
raise RuntimeError("Fcitx did not retain the input selection") raise RuntimeError(text("Fcitx did not retain the input selection"))
except BaseException: except BaseException:
setup.live_set(group, layout, before) setup.live_set(group, layout, before)
raise raise
@@ -103,7 +108,7 @@ def configure_inputs():
group, layout, items = setup.live_group() group, layout, items = setup.live_group()
catalog, available = input_catalog(items) catalog, available = input_catalog(items)
current = [name for name, override in items if not name.startswith("keyboard-")] current = [name for name, override in items if not name.startswith("keyboard-")]
choose("Input Methods", catalog, current, "input", dict(items)) choose(text("Input Methods"), catalog, current, "input", dict(items))
def load_engines(names, catalog): def load_engines(names, catalog):
@@ -112,7 +117,7 @@ def load_engines(names, catalog):
if subprocess.run(["omarchy-pkg-present", package], capture_output=True).returncode] if subprocess.run(["omarchy-pkg-present", package], capture_output=True).returncode]
if absent or any(name not in setup.PRESETS for name in names): if absent or any(name not in setup.PRESETS for name in names):
labels = ", ".join(catalog.get(name, name) for name in names) labels = ", ".join(catalog.get(name, name) for name in names)
raise RuntimeError(f"Install {' '.join(absent) or 'its engine'} to use {labels}") raise RuntimeError(text("Install %1 to use %2", " ".join(absent) or text("its engine"), labels))
# Fcitx discovers engines only at startup, so one installed while it was # Fcitx discovers engines only at startup, so one installed while it was
# running (by an update, say) needs a restart before it can be selected. # running (by an update, say) needs a restart before it can be selected.
setup.run(["omarchy-restart-xcompose"]) setup.run(["omarchy-restart-xcompose"])
@@ -149,7 +154,7 @@ def add_input(method):
def keyboard_values(selected): def keyboard_values(selected):
if not selected: if not selected:
raise ValueError("Select at least one keyboard layout") raise ValueError(text("Select at least one keyboard layout"))
parts = [value.split(":", 1) for value in selected] parts = [value.split(":", 1) for value in selected]
# Preserve the installer's Latin-leading rule for desktop keybindings. # Preserve the installer's Latin-leading rule for desktop keybindings.
if parts[0][0] in setup.NON_LATIN: if parts[0][0] in setup.NON_LATIN:
@@ -176,19 +181,19 @@ def save_keyboard(selected):
expected = [layout + (":" + variant if variant else "") expected = [layout + (":" + variant if variant else "")
for layout, variant in zip(layouts.split(","), variants.split(","))] for layout, variant in zip(layouts.split(","), variants.split(","))]
if keyboard_selection() != expected: if keyboard_selection() != expected:
raise RuntimeError("Your personal keyboard layout override takes precedence over this selection") raise RuntimeError(text("Your personal keyboard layout override takes precedence over this selection"))
first_layout = layouts.split(",")[0] first_layout = layouts.split(",")[0]
first_variant = variants.split(",")[0] first_variant = variants.split(",")[0]
group_layout = first_layout + ("-" + first_variant if first_variant else "") group_layout = first_layout + ("-" + first_variant if first_variant else "")
primary = next((item[0] for item in before if item[0].startswith("keyboard-")), None) primary = next((item[0] for item in before if item[0].startswith("keyboard-")), None)
if primary is None: if primary is None:
raise RuntimeError("The current input group has no keyboard input") raise RuntimeError(text("The current input group has no keyboard input"))
keyboard = "keyboard-" + group_layout keyboard = "keyboard-" + group_layout
after = [[keyboard, ""]] + [item for item in before if item[0] not in (primary, keyboard)] after = [[keyboard, ""]] + [item for item in before if item[0] not in (primary, keyboard)]
group_changed = True group_changed = True
setup.live_set(group, group_layout, after) setup.live_set(group, group_layout, after)
if setup.live_group() != (group, group_layout, after): if setup.live_group() != (group, group_layout, after):
raise RuntimeError("Fcitx did not retain the keyboard selection") raise RuntimeError(text("Fcitx did not retain the keyboard selection"))
except BaseException: except BaseException:
if original is None: if original is None:
path.resolve().unlink(missing_ok=True) path.resolve().unlink(missing_ok=True)
@@ -205,7 +210,7 @@ def save_keyboard(selected):
def configure_keyboard(): def configure_keyboard():
current = keyboard_selection() current = keyboard_selection()
catalog = keyboard_catalog() catalog = keyboard_catalog()
choose("Keyboard Layouts", catalog, current, "keyboard") choose(text("Keyboard Layouts"), catalog, current, "keyboard")
def apply_selection(kind, context, values): def apply_selection(kind, context, values):
@@ -213,7 +218,7 @@ def apply_selection(kind, context, values):
rows = picker_rows(catalog, []) rows = picker_rows(catalog, [])
valid = {row[1:]: key for key, row in rows.items()} valid = {row[1:]: key for key, row in rows.items()}
if not isinstance(values, list) or any(not isinstance(value, str) or value not in valid for value in values): if not isinstance(values, list) or any(not isinstance(value, str) or value not in valid for value in values):
raise ValueError("The menu returned an invalid selection") raise ValueError(text("The menu returned an invalid selection"))
selected = list(dict.fromkeys(valid[value] for value in values)) selected = list(dict.fromkeys(valid[value] for value in values))
if kind == "input": if kind == "input":
save_inputs(selected, context.get("overrides")) save_inputs(selected, context.get("overrides"))
@@ -228,13 +233,13 @@ def main():
try: try:
add_input(sys.argv[2]) add_input(sys.argv[2])
except (OSError, ValueError, RuntimeError, subprocess.CalledProcessError) as error: except (OSError, ValueError, RuntimeError, subprocess.CalledProcessError) as error:
raise SystemExit(f"Input method could not be added: {error}") raise SystemExit(text("Input method could not be added: %1", error))
return return
applying = len(sys.argv) == 5 and sys.argv[1] == "apply" applying = len(sys.argv) == 5 and sys.argv[1] == "apply"
kind = sys.argv[2] if applying else sys.argv[1] if len(sys.argv) == 2 else "" kind = sys.argv[2] if applying else sys.argv[1] if len(sys.argv) == 2 else ""
if kind not in ("input", "keyboard"): if kind not in ("input", "keyboard"):
raise ValueError("Choose keyboard or input setup") raise ValueError("Choose keyboard or input setup")
title = "Input methods" if kind == "input" else "Keyboard layouts" title = text("Input methods could not be updated") if kind == "input" else text("Keyboard layouts could not be updated")
try: try:
if applying: if applying:
apply_selection(kind, json.loads(sys.argv[3]), json.loads(sys.argv[4])) apply_selection(kind, json.loads(sys.argv[3]), json.loads(sys.argv[4]))
@@ -243,7 +248,7 @@ def main():
else: else:
configure_keyboard() configure_keyboard()
except (OSError, ValueError, RuntimeError, subprocess.CalledProcessError) as error: except (OSError, ValueError, RuntimeError, subprocess.CalledProcessError) as error:
subprocess.run(["omarchy-notification-send", title + " could not be updated", str(error)], check=True) subprocess.run(["omarchy-notification-send", title, str(error)], check=True)
raise SystemExit(1) raise SystemExit(1)
+16
View File
@@ -212,6 +212,12 @@
"setup.default.editor.helix": {"icon":"","label":"Helix","checked":"[[ \"$(omarchy-default-editor)\" == \"helix\" ]]","action":"omarchy-default-editor helix"}, "setup.default.editor.helix": {"icon":"","label":"Helix","checked":"[[ \"$(omarchy-default-editor)\" == \"helix\" ]]","action":"omarchy-default-editor helix"},
"setup.default.editor.vim": {"icon":"","label":"Vim","checked":"[[ \"$(omarchy-default-editor)\" == \"vim\" ]]","action":"omarchy-default-editor vim"}, "setup.default.editor.vim": {"icon":"","label":"Vim","checked":"[[ \"$(omarchy-default-editor)\" == \"vim\" ]]","action":"omarchy-default-editor vim"},
"setup.default.editor.emacs": {"icon":" ","label":"Emacs","checked":"[[ \"$(omarchy-default-editor)\" == \"emacs\" ]]","action":"omarchy-default-editor emacs"}, "setup.default.editor.emacs": {"icon":" ","label":"Emacs","checked":"[[ \"$(omarchy-default-editor)\" == \"emacs\" ]]","action":"omarchy-default-editor emacs"},
"setup.language": {"icon":"󰗊","label":"Language"},
"setup.language.en": {"icon":"󰗊","label":"English","checked":"[[ \"$(omarchy-language)\" == \"en_US.UTF-8\" ]]","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-language en'"},
"setup.language.zh": {"icon":"󰗊","label":"简体中文","checked":"[[ \"$(omarchy-language)\" == \"zh_CN.UTF-8\" ]]","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-language zh'"},
"setup.region": {"icon":"󰇧","label":"Region"},
"setup.region.global": {"icon":"󰖟","label":"Global","checked":"[[ \"$(omarchy-region)\" == \"Global\" ]]","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-region global'"},
"setup.region.china": {"icon":"󰈻","label":"China","checked":"[[ \"$(omarchy-region)\" == \"China\" ]]","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-region cn'"},
"setup.plugin": {"icon":"󰐱","label":"Plugins","aliases":["plugin","plugins"]}, "setup.plugin": {"icon":"󰐱","label":"Plugins","aliases":["plugin","plugins"]},
"setup.plugin.enable": {"icon":"󰄬","label":"Enable Plugin","action":"omarchy-menu-plugin enable"}, "setup.plugin.enable": {"icon":"󰄬","label":"Enable Plugin","action":"omarchy-menu-plugin enable"},
"setup.plugin.disable": {"icon":"󰅖","label":"Disable Plugin","action":"omarchy-menu-plugin disable"}, "setup.plugin.disable": {"icon":"󰅖","label":"Disable Plugin","action":"omarchy-menu-plugin disable"},
@@ -259,6 +265,16 @@
"install.tui": {"icon":"","label":"TUI","action":"omarchy-launch-floating-terminal-with-presentation omarchy-tui-install"}, "install.tui": {"icon":"","label":"TUI","action":"omarchy-launch-floating-terminal-with-presentation omarchy-tui-install"},
"install.windows": {"icon":"󰍲","label":"Windows","when":"omarchy-hw-x86","disabled":"[[ -f $HOME/.local/share/applications/windows-vm.desktop ]]","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-windows-vm install'"}, "install.windows": {"icon":"󰍲","label":"Windows","when":"omarchy-hw-x86","disabled":"[[ -f $HOME/.local/share/applications/windows-vm.desktop ]]","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-windows-vm install'"},
"install.aur": {"icon":"󰣇","label":"AUR","action":"xdg-terminal-exec --app-id=org.omarchy.terminal omarchy-pkg-aur-install"}, "install.aur": {"icon":"󰣇","label":"AUR","action":"xdg-terminal-exec --app-id=org.omarchy.terminal omarchy-pkg-aur-install"},
"install.china": {"icon":"󰓜","label":"China Apps","when":"[[ \"$(omarchy-region)\" == \"China\" ]]"},
"install.china.wechat": {"icon":"󰘑","label":"WeChat","when":"[[ \"$(omarchy-region)\" == \"China\" ]]","disabled":"omarchy-pkg-present wechat-universal-bwrap","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-pkg-aur-add wechat-universal-bwrap'"},
"install.china.qq": {"icon":"󰘅","label":"QQ","when":"[[ \"$(omarchy-region)\" == \"China\" ]]","disabled":"omarchy-pkg-present linuxqq","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-pkg-aur-add linuxqq'"},
"install.china.feishu": {"icon":"󱗆","label":"Feishu","when":"[[ \"$(omarchy-region)\" == \"China\" ]]","disabled":"omarchy-pkg-present feishu-bin","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-pkg-aur-add feishu-bin'"},
"install.china.dingtalk": {"icon":"󰭹","label":"DingTalk","when":"[[ \"$(omarchy-region)\" == \"China\" ]]","disabled":"omarchy-pkg-present dingtalk-bin","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-pkg-aur-add dingtalk-bin'"},
"install.china.wemeet": {"icon":"󰕧","label":"Tencent Meeting","when":"[[ \"$(omarchy-region)\" == \"China\" ]]","disabled":"omarchy-pkg-present wemeet-bin","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-pkg-aur-add wemeet-bin'"},
"install.china.wps": {"icon":"󰈬","label":"WPS Office","when":"[[ \"$(omarchy-region)\" == \"China\" ]]","disabled":"omarchy-pkg-present wps-office-cn","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-pkg-aur-add wps-office-cn'"},
"install.china.tencent-docs": {"icon":"󰈙","label":"Tencent Docs","when":"[[ \"$(omarchy-region)\" == \"China\" ]]","disabled":"[[ -f \"$HOME/.local/share/applications/腾讯文档.desktop\" ]]","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-webapp-install 腾讯文档 https://docs.qq.com \"\"'"},
"install.china.yuque": {"icon":"󰠮","label":"Yuque","when":"[[ \"$(omarchy-region)\" == \"China\" ]]","disabled":"[[ -f \"$HOME/.local/share/applications/语雀.desktop\" ]]","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-webapp-install 语雀 https://www.yuque.com/dashboard \"\"'"},
"install.china.shimo": {"icon":"󰈙","label":"Shimo","when":"[[ \"$(omarchy-region)\" == \"China\" ]]","disabled":"[[ -f \"$HOME/.local/share/applications/石墨文档.desktop\" ]]","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-webapp-install 石墨文档 https://shimo.im/desktop \"\"'"},
"install.preinstalls": {"icon":"󰏓","label":"Preinstalls","disabled":"[[ ! -f $HOME/.local/state/omarchy/preinstalls-removed ]]","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-preinstalls"}, "install.preinstalls": {"icon":"󰏓","label":"Preinstalls","disabled":"[[ ! -f $HOME/.local/state/omarchy/preinstalls-removed ]]","action":"omarchy-launch-floating-terminal-with-presentation omarchy-install-preinstalls"},
"install.browser.chrome": {"icon":"","label":"Chrome","disabled":"omarchy-pkg-present google-chrome","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-install-browser chrome'"}, "install.browser.chrome": {"icon":"","label":"Chrome","disabled":"omarchy-pkg-present google-chrome","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-install-browser chrome'"},
"install.browser.edge": {"icon":"󰇩","label":"Edge","when":"omarchy-hw-x86","disabled":"omarchy-pkg-present microsoft-edge-stable-bin","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-install-browser edge'"}, "install.browser.edge": {"icon":"󰇩","label":"Edge","when":"omarchy-hw-x86","disabled":"omarchy-pkg-present microsoft-edge-stable-bin","action":"omarchy-launch-floating-terminal-with-presentation 'omarchy-install-browser edge'"},
+211
View File
@@ -0,0 +1,211 @@
// Chinese menu labels, overlaid on omarchy-menu.jsonc when LANG is zh_CN.
{
"apps": {"label":"应用"},
"learn": {"label":"学习"},
"trigger": {"label":"触发"},
"style": {"label":"风格"},
"setup": {"label":"设置"},
"install": {"label":"安装"},
"remove": {"label":"移除"},
"update": {"label":"更新"},
"about": {"label":"关于"},
"system": {"label":"系统"},
"system.screensaver": {"label":"屏保"},
"system.lock": {"label":"锁屏"},
"system.suspend": {"label":"睡眠"},
"system.hibernate": {"label":"休眠"},
"system.logout": {"label":"注销"},
"system.reboot": {"label":"重启"},
"system.shutdown": {"label":"关机"},
"learn.keybindings": {"label":"快捷键"},
"learn.omarchy": {"label":"Omarchy 手册"},
"learn.community": {"label":"社区"},
"trigger.emoji": {"label":"表情"},
"trigger.reminder": {"label":"提醒"},
"trigger.capture": {"label":"截取"},
"trigger.capture.screenshot": {"label":"截图"},
"trigger.capture.screenrecord.stop": {"label":"停止录屏"},
"trigger.capture.screenrecord": {"label":"录屏"},
"trigger.capture.text": {"label":"OCR 取字"},
"trigger.capture.qr": {"label":"二维码"},
"trigger.capture.color": {"label":"取色"},
"trigger.capture.screenrecord.no-audio": {"label":"无音频"},
"trigger.capture.screenrecord.desktop-audio": {"label":"含桌面音频"},
"trigger.capture.screenrecord.microphone": {"label":"含桌面与麦克风音频"},
"trigger.capture.screenrecord.webcam": {"label":"含桌面、麦克风与摄像头"},
"trigger.transcode": {"label":"转码"},
"trigger.share": {"label":"分享"},
"trigger.toggle": {"label":"开关"},
"trigger.hardware": {"label":"硬件"},
"trigger.tests": {"label":"测速"},
"trigger.hardware.laptop-display": {"label":"笔记本屏幕"},
"trigger.hardware.mirror-display": {"label":"镜像显示"},
"trigger.hardware.hybrid-gpu": {"label":"混合显卡"},
"trigger.hardware.touchpad": {"label":"触控板"},
"trigger.hardware.touchpad-haptics": {"label":"触控板振动"},
"trigger.hardware.touchpad-haptics.low": {"label":"低"},
"trigger.hardware.touchpad-haptics.mid": {"label":"中"},
"trigger.hardware.touchpad-haptics.high": {"label":"高"},
"trigger.hardware.touchscreen": {"label":"触摸屏"},
"trigger.reminder.set": {"label":"设一个提醒"},
"trigger.reminder.show": {"label":"查看全部"},
"trigger.reminder.clear": {"label":"清除全部"},
"trigger.share.clipboard": {"label":"剪贴板"},
"trigger.share.file": {"label":"文件"},
"trigger.share.folder": {"label":"文件夹"},
"trigger.share.receive": {"label":"接收"},
"trigger.toggle.idle-lock": {"label":"保持唤醒"},
"trigger.toggle.notifications": {"label":"通知"},
"trigger.toggle.crash-capture": {"label":"崩溃捕获"},
"trigger.toggle.screensaver": {"label":"屏保"},
"trigger.toggle.nightlight": {"label":"夜间模式"},
"trigger.tests.network-speedtest": {"label":"网络测速"},
"trigger.tests.disk-speedtest": {"label":"磁盘测速"},
"style.theme": {"label":"主题"},
"style.background": {"label":"壁纸"},
"style.unlock": {"label":"解锁画面"},
"style.font": {"label":"字体"},
"style.screensaver": {"label":"屏保"},
"style.about": {"label":"关于"},
"style.about.text": {"label":"编辑文字"},
"style.about.image": {"label":"取自图片"},
"style.about.default": {"label":"恢复默认"},
"style.screensaver.text": {"label":"编辑文字"},
"style.screensaver.image": {"label":"取自图片"},
"style.screensaver.default": {"label":"恢复默认"},
"setup.monitors": {"label":"显示器"},
"setup.keybindings": {"label":"快捷键"},
"setup.input": {"label":"输入设备"},
"setup.language": {"label":"语言"},
"setup.network": {"label":"网络"},
"setup.network.dns.custom": {"label":"自定义"},
"setup.network.qr": {"label":"二维码"},
"setup.default": {"label":"默认程序"},
"setup.default.agent": {"title":"默认 Agent"},
"setup.default.dictation": {"label":"语音听写","title":"默认语音听写"},
"setup.default.browser": {"label":"浏览器","title":"默认浏览器"},
"setup.default.terminal": {"label":"终端","title":"默认终端"},
"setup.default.editor": {"label":"编辑器","title":"默认编辑器"},
"setup.plugin": {"label":"插件"},
"setup.plugin.enable": {"label":"启用插件"},
"setup.plugin.disable": {"label":"停用插件"},
"setup.plugin.add": {"label":"添加插件"},
"setup.plugin.clone": {"label":"克隆插件"},
"setup.plugin.remove": {"label":"移除插件"},
"setup.security": {"label":"安全"},
"setup.config": {"label":"配置"},
"setup.security.fingerprint": {"label":"指纹"},
"setup.security.passwordless-sudo": {"label":"免密 sudo"},
"setup.security.sudoless-docker": {"label":"免 sudo Docker"},
"setup.direct-boot": {"label":"直接启动"},
"setup.reset": {"label":"恢复出厂设置"},
"install.package": {"label":"软件包"},
"install.service": {"label":"服务"},
"install.development": {"label":"开发环境"},
"install.editor": {"label":"编辑器"},
"install.style": {"label":"风格"},
"install.style.theme": {"label":"主题"},
"install.style.background": {"label":"壁纸"},
"install.style.font": {"label":"字体"},
"install.gaming": {"label":"游戏"},
"install.browser": {"label":"浏览器"},
"install.webapp": {"label":"网页应用"},
"install.terminal": {"label":"终端"},
"install.preinstalls": {"label":"预装应用"},
"install.service.chromium-account": {"label":"Chromium 账号"},
"install.gaming.xbox-cloud": {"label":"Xbox 云游戏"},
"install.gaming.xbox-controllers": {"label":"Xbox 手柄"},
"install.gaming.retro-launcher": {"label":"RetroArch 启动器"},
"install.development.docker-dbs": {"label":"Docker 数据库"},
"remove.package": {"label":"软件包"},
"remove.ai": {"title":"移除"},
"remove.service": {"label":"服务","title":"移除"},
"remove.development": {"label":"开发环境","title":"移除"},
"remove.theme": {"label":"主题"},
"remove.gaming": {"label":"游戏","title":"移除"},
"remove.browser": {"label":"浏览器","title":"移除"},
"remove.webapp": {"label":"网页应用"},
"remove.preinstalls": {"label":"预装应用"},
"remove.security": {"label":"安全","title":"移除"},
"remove.security.fingerprint": {"label":"指纹"},
"remove.security.sudoless-docker": {"label":"免 sudo Docker"},
"remove.dictation": {"label":"语音听写"},
"remove.gaming.xbox-cloud": {"label":"Xbox 云游戏"},
"remove.gaming.xbox-controllers": {"label":"Xbox 手柄 (󰂯)"},
"remove.development.javascript": {"title":"移除"},
"remove.development.php": {"title":"移除"},
"remove.development.elixir": {"title":"移除"},
"update.channel": {"label":"通道"},
"update.config": {"label":"配置","title":"重置为默认"},
"update.themes": {"label":"附加主题"},
"update.process": {"label":"进程","title":"重启"},
"update.hardware": {"label":"硬件","title":"重启"},
"update.firmware": {"label":"固件"},
"update.password": {"label":"密码"},
"update.timezone": {"label":"时区"},
"update.time": {"label":"时间"},
"update.hardware.audio": {"label":"音频"},
"update.hardware.bluetooth": {"label":"蓝牙"},
"update.hardware.trackpad": {"label":"触控板"},
"update.password.drive": {"label":"磁盘加密"},
"update.password.user": {"label":"用户"},
"update.channel.stable": {"label":"稳定版"},
"update.channel.rc": {"label":"候选版"},
"update.channel.edge": {"label":"尝鲜版"},
"update.channel.dev": {"label":"开发版"},
"trigger.appearance": {"label":"外观"},
"trigger.appearance.animations": {"label":"动画"},
"trigger.appearance.one-window-ratio": {"label":"单窗口比例"},
"trigger.appearance.theme-sync": {"label":"Herdr 主题同步"},
"trigger.appearance.top-bar": {"label":"菜单栏"},
"trigger.appearance.top-bar.show": {"label":"显示菜单栏"},
"trigger.appearance.top-bar.hide": {"label":"隐藏菜单栏"},
"trigger.appearance.top-bar.position": {"label":"菜单栏位置"},
"trigger.appearance.top-bar.position.top": {"label":"顶部"},
"trigger.appearance.top-bar.position.bottom": {"label":"底部"},
"trigger.appearance.top-bar.position.left": {"label":"左侧"},
"trigger.appearance.top-bar.position.right": {"label":"右侧"},
"trigger.appearance.top-bar.background": {"label":"菜单栏背景"},
"trigger.appearance.top-bar.background.opaque": {"label":"不透明"},
"trigger.appearance.top-bar.background.glassy": {"label":"毛玻璃"},
"trigger.appearance.top-bar.background.clear": {"label":"全透明"},
"trigger.appearance.top-bar.indicators": {"label":"菜单栏指示"},
"trigger.appearance.top-bar.indicators.battery-percentage": {"label":"电量百分比"},
"trigger.appearance.top-bar.indicators.clock": {"label":"时钟"},
"trigger.appearance.window-corners": {"label":"窗口圆角"},
"trigger.appearance.window-corners.theme": {"label":"跟随主题"},
"trigger.appearance.window-corners.rounded": {"label":"圆角"},
"trigger.appearance.window-corners.sharp": {"label":"直角"},
"trigger.appearance.window-gaps": {"label":"窗口间距"},
"trigger.appearance.window-transparency": {"label":"窗口透明度"},
"trigger.appearance.window-transparency.opaque": {"label":"不透明"},
"trigger.appearance.window-transparency.glassy": {"label":"毛玻璃"},
"trigger.appearance.window-transparency.transparent": {"label":"透明"},
"trigger.appearance.workspace-layout": {"label":"工作区布局","title":"默认工作区布局"},
"trigger.appearance.workspace-layout.dwindle": {"label":"平铺"},
"trigger.appearance.workspace-layout.scrolling": {"label":"滚动"},
"trigger.appearance.workspace-layout.floating": {"label":"浮动"},
"trigger.clipboard-history": {"label":"剪贴板历史"},
"setup.typing": {"label":"输入"},
"setup.typing.keyboard": {"label":"键盘布局"},
"setup.typing.input": {"label":"输入法"},
"setup.security.thunderbolt": {"label":"雷电接口"},
"setup.security.thunderbolt-boot": {"label":"开机时的雷电接口"},
"setup.security.usb-authorization": {"label":"USB 设备授权"},
"setup.security.usb-authorization-boot": {"label":"开机时的 USB"},
"remove.security.thunderbolt": {"label":"雷电接口"},
"remove.security.thunderbolt-boot": {"label":"开机时的雷电接口"},
"remove.security.usb-authorization": {"label":"USB 设备授权"},
"remove.security.usb-authorization-boot": {"label":"开机时的 USB"},
"setup.region": {"label":"地区"},
"setup.region.global": {"label":"全球"},
"setup.region.china": {"label":"中国"},
"install.china": {"label":"国内应用"},
"install.china.wechat": {"label":"微信"},
"install.china.feishu": {"label":"飞书"},
"install.china.dingtalk": {"label":"钉钉"},
"install.china.wemeet": {"label":"腾讯会议"},
"install.china.tencent-docs": {"label":"腾讯文档"},
"install.china.yuque": {"label":"语雀"},
"install.china.shimo": {"label":"石墨文档"},
}
+5
View File
@@ -0,0 +1,5 @@
[source.crates-io]
replace-with = "aliyun"
[source.aliyun]
registry = "sparse+https://mirrors.aliyun.com/crates.io-index/"
+8
View File
@@ -0,0 +1,8 @@
NPM_CONFIG_REGISTRY=https://registry.npmmirror.com
PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/
UV_DEFAULT_INDEX=https://mirrors.aliyun.com/pypi/simple/
GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
RUSTUP_DIST_SERVER=https://mirrors.aliyun.com/rustup
RUSTUP_UPDATE_ROOT=https://mirrors.aliyun.com/rustup/rustup
BUNDLE_MIRROR__ALL=https://mirrors.aliyun.com/rubygems/
MAVEN_ARGS=--global-settings /usr/share/omarchy/default/regions/cn/maven-settings.xml
+3
View File
@@ -0,0 +1,3 @@
---
:sources:
- https://mirrors.aliyun.com/rubygems/
+9
View File
@@ -0,0 +1,9 @@
<settings>
<mirrors>
<mirror>
<id>aliyun</id>
<mirrorOf>central</mirrorOf>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
</mirrors>
</settings>
+2
View File
@@ -0,0 +1,2 @@
# Installed from the ISO's offline repository before enabling ArchLinuxCN.
archlinuxcn-keyring
@@ -0,0 +1 @@
Server = https://mirror.omarchy.cn/$repo/os/$arch
@@ -0,0 +1 @@
Server = https://rc-mirror.omarchy.cn/$repo/os/$arch
@@ -0,0 +1 @@
Server = https://stable-mirror.omarchy.cn/$repo/os/$arch
@@ -0,0 +1,2 @@
[archlinuxcn]
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
+9
View File
@@ -0,0 +1,9 @@
# Installs in these timezones get this region. The installer's timezone list
# includes tzdata's backward-compatible names, so they are listed too.
Asia/Shanghai
Asia/Urumqi
Asia/Chongqing
Asia/Chungking
Asia/Harbin
Asia/Kashgar
PRC
+2
View File
@@ -56,6 +56,8 @@ or re-icon a row without re-declaring its action, and an overridden entry
keeps its original position in the list. New ids append. A `root` entry is keeps its original position in the list. New ids append. A `root` entry is
injected if neither file declares one. injected if neither file declares one.
When `LANG` starts with `zh_CN`, `default/omarchy/omarchy-menu.zh-cn.jsonc` is merged between the defaults and the user extension. It only retitles shipped ids, so a user extension still wins, and the language follows `/etc/locale.conf` instead of any file `omarchy update` rewrites.
The sample extension at `config/omarchy/extensions/omarchy-menu.jsonc` The sample extension at `config/omarchy/extensions/omarchy-menu.jsonc`
(refreshed into `~/.config/`) documents the format in its header and ships (refreshed into `~/.config/`) documents the format in its header and ships
only comments, so the default state adds nothing. only comments, so the default state adds nothing.
+49
View File
@@ -0,0 +1,49 @@
# Regional defaults
Regions customize bootstrap defaults independently of update channels and of the installer's language. Country identifiers are lowercase, officially assigned ISO 3166-1 alpha-2 codes. `global` is a reserved value for no country-specific additions. Only implemented profiles are accepted; currently `global` and `cn`.
## Runtime configuration
The ISO installer writes the region it derived to `/etc/omarchy/region` before target finalization. It is plain text, not executable configuration, owned by root and world-readable (`0644`), because refresh renders as the calling user. A missing file means `global`; an unsupported value is an error.
`omarchy-apply-pacman <stable|rc|edge> [target-root]` restores the selected channel's two pacman templates, appends the region's `pacman.conf.append` to `pacman.conf`, and puts the region's `mirrorlist-<channel>.prepend` ahead of the channel's mirrorlist. Both files are generated before either live file is replaced. Existing files are backed up with `.bak`. Dev uses the edge pacman channel, as before.
Both installation finalization and `omarchy-refresh-pacman` use this command. Explicit refreshes and channel changes restore regional defaults; ordinary updates do not enforce them. The existing `pre-refresh-pacman` user hook runs after regeneration and before the update, so users can maintain overrides there. Switching to the dev channel refuses a checkout that lacks this machine's region profile, because that checkout's own refresh would otherwise drop the regional repositories. Users can edit the files directly or set the region to `global` before a refresh to stop applying regional repository defaults. This does not uninstall packages or rewrite anything in existing home directories.
Refresh renders both files as the calling user and gives root only the finished copies, so the sudo boundary stays command-scoped. That boundary does not defend against other code already running as the same user: such code could change the rendered files while refresh waits for the password, as it could alter that user's own environment in other ways.
The China profile puts Omarchy's China replica of the channel's Arch mirror first (`stable-mirror.omarchy.cn`, `rc-mirror.omarchy.cn`, or `mirror.omarchy.cn` for edge and dev) and keeps the channel's `.org` mirror as the fallback. pacman tries servers in order and moves to the next one when a download fails, including a 404. After three failed downloads from one server, it skips that server for the rest of the transaction. It also takes the package databases from the first server that answers, without comparing them, so the China replicas must carry complete, current metadata. The profile also adds the ArchLinuxCN community repository from USTC's mirror, run by the University of Science and Technology of China. It does not change the `[omarchy]` package repository. ArchLinuxCN is rolling and built against current Arch, while stable and RC are snapshots, so its packages can need newer libraries than a stable machine has.
## Profile layout
Each profile lives in `default/regions/<code>/`:
- `timezones`: the timezones that select this region, one per line, with blank lines and `#` comments allowed. List tzdata's backward-compatible names too, since the installer's timezone list includes them. A timezone may belong to at most one profile.
- `packages`: additional target packages, in the same format. Every ISO carries every profile's packages in its offline repository; the installer installs them only on targets in that region. A package named `<name>-keyring` is the profile's trust anchor: the builder installs it through Arch's existing trust chain, and a regional target populates the `<name>` keyring.
- `pacman/`: `pacman.conf.append`, added after the channel's `pacman.conf`, and one `mirrorlist-<channel>.prepend` per channel (`stable`, `rc`, `edge`), placed ahead of the channel's mirrorlist so the regional mirror is tried first.
## ISO installer contract
There is one ISO for every region. The companion `omarchy-iso` repository reads the profiles from the runtime it bundles, so a region and its repository defaults can never disagree.
- **Build:** every profile's `packages` go into the offline repository, but not into the base package list. The builder adds each profile's community repository to its writable online config to download them; it does not change its Arch channel mirrors.
- **Install:** the installer maps the timezone the user picked to a region through the `timezones` files; a timezone no profile lists means `global`. It shows the result on the summary screen. Unattended installs can set the region explicitly instead. For a regional install it installs the profile's packages from the offline repository and writes `/etc/omarchy/region`; the runtime finalizer then applies the fragments.
- **Deferred installs** have no timezone until first boot, so they are `global` unless the unattended configuration sets a region.
For China, the builder installs `archlinuxcn-keyring` using the existing Arch trust chain before downloading ArchLinuxCN packages. Signature or keyring failures abort the build; no unverified keyserver trust or online signature bypass is added. On a China target the installer installs the keyring from the offline repository, then initializes and populates it before the online repositories are enabled. Global targets never populate ArchLinuxCN's keys. The ISO's existing offline repository verification policy is unchanged.
## Scope of the China profile
The China profile provides repository defaults and developer mirrors. Language is a separate installer choice, not part of a region: a Chinese speaker outside China keeps global mirrors, and a China install in English still gets the regional ones.
## Developer mirrors
The `cn` profile also points the common package managers at mirrors inside China: `environment.conf` (npm, PyPI and uv, Go, rustup, Bundler, and Maven through `MAVEN_ARGS`), `cargo.toml` for crates.io, `gemrc` for RubyGems, and `maven-settings.xml`, which Maven reads in place. During installation `install/config/region.sh` links the first three to `/etc/environment.d/90-omarchy-china.conf`, `/.cargo/config.toml` and `/etc/gemrc` when the marker says `cn`. It refuses to replace a regular file it did not create. The environment reaches sessions started after login.
`omarchy region cn|global` (_Setup > Region_) switches an installed machine. `cn` upgrades, installs and trusts the profile's keyring through a rendered China config, records the marker and links the developer mirrors through the same script, then refreshes pacman. `global` removes the marker and only the links that point into the profile, then refreshes. The region also shows _Install > China Apps_.
## Remaining release validation
Unit tests cover region/channel independence, the timezone mapping, generated pacman contents, repeat application, and refresh ordering; refresh itself is exercised only inside the sudo-boundary sandbox. They do not establish live mirror availability, real package trust, or successful offline installation. Before distribution, build from matching local checkouts on an x86_64 builder and run the disposable-VM acceptance workflow in `agents/skills/acceptance-tests.md`.
The acceptance run must install without network access in both directions: a non-China timezone must produce pacman files byte for byte identical to the channel templates, and `Asia/Shanghai` must produce the China profile, boot to a new user, and keep the regional mirrors, repository, marker, and keyring trust through `stable`, `rc`, and `edge` refreshes.
+1
View File
@@ -1,3 +1,4 @@
run_logged "$OMARCHY_INSTALL/config/region.sh"
run_logged "$OMARCHY_INSTALL/config/theme-system.sh" run_logged "$OMARCHY_INSTALL/config/theme-system.sh"
run_logged "$OMARCHY_INSTALL/config/browser-policy.sh" run_logged "$OMARCHY_INSTALL/config/browser-policy.sh"
run_logged "$OMARCHY_INSTALL/config/increase-lockout-limit.sh" run_logged "$OMARCHY_INSTALL/config/increase-lockout-limit.sh"
+44
View File
@@ -0,0 +1,44 @@
cn_links=(
"environment.conf /etc/environment.d/90-omarchy-china.conf"
"cargo.toml /.cargo/config.toml"
"gemrc /etc/gemrc"
)
# 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)
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"
if [[ -e $target && ! -L $target ]]; then
echo "Refusing to replace $target, which Omarchy did not create" >&2
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%/*}"
ln -sfn "$OMARCHY_PATH/default/regions/cn/$source" "$target"
done
;;
*)
echo "Unknown region: $region" >&2
exit 1
;;
esac
+7 -6
View File
@@ -11,11 +11,12 @@ tb_safe_text() {
} }
tb_notify() { tb_notify() {
local token=$1 retry=${2:-false} title='Thunderbolt accessory blocked' description local token=$1 retry=${2:-false} title description
description='Click to review it. Keep it blocked unless you recognize the device.' title=$(omarchy-text "Thunderbolt accessory blocked")
description=$(omarchy-text "Click to review it. Keep it blocked unless you recognize the device.")
if [[ $retry == "true" ]]; then if [[ $retry == "true" ]]; then
title='Thunderbolt approval needs retry' title=$(omarchy-text "Thunderbolt approval needs retry")
description='The last approval could not be confirmed. Click to retry it.' description=$(omarchy-text "The last approval could not be confirmed. Click to retry it.")
fi fi
omarchy-notification-wait 1 >/dev/null || return 1 omarchy-notification-wait 1 >/dev/null || return 1
timeout 10 omarchy-notification-send --app-name omarchy-action --urgency critical --glyph '󱐋' \ timeout 10 omarchy-notification-send --app-name omarchy-action --urgency critical --glyph '󱐋' \
@@ -26,14 +27,14 @@ tb_notify() {
tb_attention() { tb_attention() {
omarchy-notification-wait 1 >/dev/null || return 1 omarchy-notification-wait 1 >/dev/null || return 1
timeout 10 omarchy-notification-send --app-name omarchy-action --urgency critical \ timeout 10 omarchy-notification-send --app-name omarchy-action --urgency critical \
'Thunderbolt protection needs attention' 'The approval or firmware policy could not be confirmed. Click for details.' \ "$(omarchy-text "Thunderbolt protection needs attention")" "$(omarchy-text "The approval or firmware policy could not be confirmed. Click for details.")" \
--exec omarchy-launch-floating-terminal-with-presentation omarchy-setup-security-thunderbolt-authorization status --exec omarchy-launch-floating-terminal-with-presentation omarchy-setup-security-thunderbolt-authorization status
} }
tb_setup_notice() { tb_setup_notice() {
omarchy-notification-wait 1 >/dev/null || return 1 omarchy-notification-wait 1 >/dev/null || return 1
timeout 10 omarchy-notification-send --app-name omarchy-action --urgency critical \ timeout 10 omarchy-notification-send --app-name omarchy-action --urgency critical \
'Finish Thunderbolt protection setup' 'A connected accessory needs secure enrollment. Protection is not enabled. Click to finish safely.' \ "$(omarchy-text "Finish Thunderbolt protection setup")" "$(omarchy-text "A connected accessory needs secure enrollment. Protection is not enabled. Click to finish safely.")" \
--exec omarchy-launch-floating-terminal-with-presentation omarchy-setup-security-thunderbolt-authorization --exec omarchy-launch-floating-terminal-with-presentation omarchy-setup-security-thunderbolt-authorization
} }
+7 -2
View File
@@ -21,8 +21,13 @@ fi
# rc on aarch64) gets the platform's default channel instead. # rc on aarch64) gets the platform's default channel instead.
channel=${OMARCHY_MIRROR:-} channel=${OMARCHY_MIRROR:-}
[[ -n $channel && -f $templates/pacman-$channel.conf ]] || channel=$(omarchy_pacman_default_channel "$platform") [[ -n $channel && -f $templates/pacman-$channel.conf ]] || channel=$(omarchy_pacman_default_channel "$platform")
cp -f "$templates/pacman-$channel.conf" /etc/pacman.conf # Regions render x86 pacman only (omarchy #13690).
cp -f "$templates/mirrorlist-$channel" /etc/pacman.d/mirrorlist if [[ $platform == x86 && -e /etc/omarchy/region ]]; then
"$OMARCHY_PATH/bin/omarchy-apply-pacman" "$channel"
else
cp -f "$templates/pacman-$channel.conf" /etc/pacman.conf
cp -f "$templates/mirrorlist-$channel" /etc/pacman.d/mirrorlist
fi
# An image build leaves the keyring to each machine's first boot, so no two # An image build leaves the keyring to each machine's first boot, so no two
# share a master key (install/helpers/image-target.sh). # share a master key (install/helpers/image-target.sh).
+68 -16
View File
@@ -87,6 +87,39 @@ OMARCHY_RESERVED_USERNAMES='^(root|bin|daemon|mail|ftp|http|nobody|dbus|systemd-
OMARCHY_HOSTNAME_PATTERN='^[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?$' OMARCHY_HOSTNAME_PATTERN='^[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?$'
OMARCHY_HOSTNAME_DEFAULT='omarchy' OMARCHY_HOSTNAME_DEFAULT='omarchy'
# The ISO sets OMARCHY_INSTALL_LANG=zh in its CJK console; omarchy_text then prints the OMARCHY_ZH entry.
declare -gA OMARCHY_ZH=(
["Select keyboard layout"]="选择键盘布局"
["Alphanumeric without spaces (like dhh)"]="字母和数字,不含空格(如 dhh)"
["Username> "]="用户名> "
["Username is reserved for system"]="这个用户名由系统保留"
["That username already exists on this machine"]="本机已有这个用户名"
["Username must be alphanumeric with no spaces"]="用户名只能用字母和数字,不含空格"
["Used for user + root, and disk encryption when enabled"]="用于用户和 root,开启加密时也用于解锁磁盘"
["Password> "]="密码> "
["Must match the password you just typed"]="与刚才输入的密码一致"
["Confirm> "]="确认密码> "
["Your password can't be blank!"]="密码不能为空"
["Passwords didn't match!"]="两次输入的密码不一致"
["Used for git authentication (hit return to skip)"]="用于 git 身份(回车跳过)"
["Full name> "]="姓名> "
["Email address> "]="邮箱> "
["Letters, digits, and dashes (or return for 'omarchy')"]="字母、数字和连字符(回车用 omarchy)"
["Hostname> "]="主机名> "
["Hostname must be 1-63 letters, digits, or dashes, and cannot start or end with a dash"]="主机名为 1-63 个字母、数字或连字符,首尾不能是连字符"
["Timezone"]="时区"
)
omarchy_text() {
local text=$1
shift
if [[ ${OMARCHY_INSTALL_LANG:-} == "zh" && -n ${OMARCHY_ZH[$text]:-} ]]; then
text=${OMARCHY_ZH[$text]}
fi
# shellcheck disable=SC2059
printf -- "$text" "$@"
}
# Installer targets are empty, so any account is fair game; first-boot setup # Installer targets are empty, so any account is fair game; first-boot setup
# overrides this because its machine already has users. # overrides this because its machine already has users.
omarchy_username_taken() { return 1; } omarchy_username_taken() { return 1; }
@@ -95,10 +128,29 @@ omarchy_username_taken() { return 1; }
# by `status=$?`: one caller runs under `set -e`, where a cancelled prompt is a # by `status=$?`: one caller runs under `set -e`, where a cancelled prompt is a
# failing assignment that would kill the script before the status is read. # failing assignment that would kill the script before the status is read.
# English or Simplified Chinese; the Chinese name shows only in a CJK console.
omarchy_prompt_language() {
local chinese="Chinese" header="Select language" selected=English choice status
if [[ -n ${OMARCHY_CJK_CONSOLE:-} ]]; then
chinese="简体中文 Chinese"
header="Select language · 选择语言"
fi
[[ $language == "zh" ]] && selected=$chinese
choice=$(printf '%s\n' English "$chinese" | gum choose --selected "$selected" --header "$header") && status=0 || status=$?
((status == 0)) || return $status
if [[ $choice == "English" ]]; then
language=en
else
language=zh
fi
}
# Callers may name the layout to preselect.
omarchy_prompt_keyboard() { omarchy_prompt_keyboard() {
local choice status local choice status selected=${1:-English (US)}
choice=$(printf '%s\n' "$OMARCHY_KEYBOARD_LAYOUTS" | cut -d'|' -f1 | choice=$(printf '%s\n' "$OMARCHY_KEYBOARD_LAYOUTS" | cut -d'|' -f1 |
gum choose --height 10 --selected "English (US)" --header "Select keyboard layout") && status=0 || status=$? gum choose --height 10 --selected "${selected//,/\\,}" --header "$(omarchy_text "Select keyboard layout")") && status=0 || status=$?
((status == 0)) || return $status ((status == 0)) || return $status
local selection local selection
@@ -122,19 +174,19 @@ omarchy_persist_input_selection() {
omarchy_prompt_username() { omarchy_prompt_username() {
local status local status
while true; do while true; do
username=$(gum input --placeholder "Alphanumeric without spaces (like dhh)" --prompt.foreground="#845DF9" --prompt "Username> ") && status=0 || status=$? username=$(gum input --placeholder "$(omarchy_text "Alphanumeric without spaces (like dhh)")" --prompt.foreground="#845DF9" --prompt "$(omarchy_text "Username> ")") && status=0 || status=$?
((status == 0)) || return $status ((status == 0)) || return $status
if [[ "$username" =~ $OMARCHY_USERNAME_PATTERN ]]; then if [[ "$username" =~ $OMARCHY_USERNAME_PATTERN ]]; then
if [[ "$username" =~ $OMARCHY_RESERVED_USERNAMES ]]; then if [[ "$username" =~ $OMARCHY_RESERVED_USERNAMES ]]; then
notice "Username is reserved for system" 1 notice "$(omarchy_text "Username is reserved for system")" 1
elif omarchy_username_taken "$username"; then elif omarchy_username_taken "$username"; then
notice "That username already exists on this machine" 1 notice "$(omarchy_text "That username already exists on this machine")" 1
else else
return 0 return 0
fi fi
else else
notice "Username must be alphanumeric with no spaces" 1 notice "$(omarchy_text "Username must be alphanumeric with no spaces")" 1
fi fi
done done
} }
@@ -142,17 +194,17 @@ omarchy_prompt_username() {
omarchy_prompt_password() { omarchy_prompt_password() {
local status local status
while true; do while true; do
password=$(gum input --placeholder "Used for user + root, and disk encryption when enabled" --prompt.foreground="#845DF9" --password --prompt "Password> ") && status=0 || status=$? password=$(gum input --placeholder "$(omarchy_text "Used for user + root, and disk encryption when enabled")" --prompt.foreground="#845DF9" --password --prompt "$(omarchy_text "Password> ")") && status=0 || status=$?
((status == 0)) || return $status ((status == 0)) || return $status
password_confirmation=$(gum input --placeholder "Must match the password you just typed" --prompt.foreground="#845DF9" --password --prompt "Confirm> ") && status=0 || status=$? password_confirmation=$(gum input --placeholder "$(omarchy_text "Must match the password you just typed")" --prompt.foreground="#845DF9" --password --prompt "$(omarchy_text "Confirm> ")") && status=0 || status=$?
((status == 0)) || return $status ((status == 0)) || return $status
if [[ -n "$password" && "$password" == "$password_confirmation" ]]; then if [[ -n "$password" && "$password" == "$password_confirmation" ]]; then
return 0 return 0
elif [[ -z "$password" ]]; then elif [[ -z "$password" ]]; then
notice "Your password can't be blank!" 1 notice "$(omarchy_text "Your password can't be blank!")" 1
else else
notice "Passwords didn't match!" 1 notice "$(omarchy_text "Passwords didn't match!")" 1
fi fi
done done
} }
@@ -161,16 +213,16 @@ omarchy_prompt_password() {
# only Esc/Ctrl+C end the prompt early. # only Esc/Ctrl+C end the prompt early.
omarchy_prompt_identity() { omarchy_prompt_identity() {
local status local status
full_name=$(gum input --placeholder "Used for git authentication (hit return to skip)" --prompt.foreground="#845DF9" --prompt "Full name> ") && status=0 || status=$? full_name=$(gum input --placeholder "$(omarchy_text "Used for git authentication (hit return to skip)")" --prompt.foreground="#845DF9" --prompt "$(omarchy_text "Full name> ")") && status=0 || status=$?
((status == 0)) || return $status ((status == 0)) || return $status
email_address=$(gum input --placeholder "Used for git authentication (hit return to skip)" --prompt.foreground="#845DF9" --prompt "Email address> ") && status=0 || status=$? email_address=$(gum input --placeholder "$(omarchy_text "Used for git authentication (hit return to skip)")" --prompt.foreground="#845DF9" --prompt "$(omarchy_text "Email address> ")") && status=0 || status=$?
return $status return $status
} }
omarchy_prompt_hostname() { omarchy_prompt_hostname() {
local status local status
while true; do while true; do
hostname=$(gum input --placeholder "Letters, digits, and dashes (or return for 'omarchy')" --prompt.foreground="#845DF9" --prompt "Hostname> ") && status=0 || status=$? hostname=$(gum input --placeholder "$(omarchy_text "Letters, digits, and dashes (or return for 'omarchy')")" --prompt.foreground="#845DF9" --prompt "$(omarchy_text "Hostname> ")") && status=0 || status=$?
((status == 0)) || return $status ((status == 0)) || return $status
if [[ -z $hostname ]]; then if [[ -z $hostname ]]; then
@@ -179,7 +231,7 @@ omarchy_prompt_hostname() {
elif [[ "$hostname" =~ $OMARCHY_HOSTNAME_PATTERN ]]; then elif [[ "$hostname" =~ $OMARCHY_HOSTNAME_PATTERN ]]; then
return 0 return 0
else else
notice "Hostname must be 1-63 letters, digits, or dashes, and cannot start or end with a dash" 1 notice "$(omarchy_text "Hostname must be 1-63 letters, digits, or dashes, and cannot start or end with a dash")" 1
fi fi
done done
} }
@@ -191,9 +243,9 @@ omarchy_prompt_timezone() {
guess=$(tzupdate -p 2>/dev/null) || guess="" guess=$(tzupdate -p 2>/dev/null) || guess=""
if [[ -n $guess ]]; then if [[ -n $guess ]]; then
timezone=$(timedatectl list-timezones | gum choose --height 10 --selected "$guess" --header "Timezone") && status=0 || status=$? timezone=$(timedatectl list-timezones | gum choose --height 10 --selected "$guess" --header "$(omarchy_text "Timezone")") && status=0 || status=$?
else else
timezone=$(timedatectl list-timezones | gum filter --height 10 --header "Timezone") && status=0 || status=$? timezone=$(timedatectl list-timezones | gum filter --height 10 --header "$(omarchy_text "Timezone")") && status=0 || status=$?
fi fi
((status == 0)) || return $status ((status == 0)) || return $status
+2 -2
View File
@@ -5,7 +5,7 @@ set -e
# Omarchy ships no default agent, so invite once rather than picking one. An # Omarchy ships no default agent, so invite once rather than picking one. An
# agent already chosen means the invitation has nothing to offer. # agent already chosen means the invitation has nothing to offer.
if [[ -z $(omarchy-default-agent) ]] && omarchy-done ensure agent-setup-invitation; then if [[ -z $(omarchy-default-agent) ]] && omarchy-done ensure agent-setup-invitation; then
omarchy-notification-send -u critical -g 󰚩 "Set your default agent" \ omarchy-notification-send -u critical -g 󰚩 "$(omarchy-text "Set your default agent")" \
"Let your favorite agent help with Omarchy." \ "$(omarchy-text "Let your favorite agent help with Omarchy.")" \
--exec omarchy menu summon setup.default.agent --exec omarchy menu summon setup.default.agent
fi fi
@@ -6,7 +6,7 @@ set -e
# PAM file is the last thing the setup writes on success). # PAM file is the last thing the setup writes on success).
if omarchy-hw-fingerprint && [[ ! -f /etc/pam.d/omarchy-lock-fingerprint ]] && if omarchy-hw-fingerprint && [[ ! -f /etc/pam.d/omarchy-lock-fingerprint ]] &&
omarchy-done ensure fingerprint-setup-invitation; then omarchy-done ensure fingerprint-setup-invitation; then
omarchy-notification-send -u critical -g 󰈷 "Setup Fingerprint Reader" \ omarchy-notification-send -u critical -g 󰈷 "$(omarchy-text "Setup Fingerprint Reader")" \
"Enable sudo and unlocking with your fingerprint." \ "$(omarchy-text "Enable sudo and unlocking with your fingerprint.")" \
--exec omarchy-launch-floating-terminal-with-presentation omarchy-setup-security-fingerprint --exec omarchy-launch-floating-terminal-with-presentation omarchy-setup-security-fingerprint
fi fi
+2 -2
View File
@@ -1,5 +1,5 @@
# Real newlines, not a literal \n: the card renders the body as it arrives, and # Real newlines, not a literal \n: the card renders the body as it arrives, and
# elides past three lines. # elides past three lines.
omarchy-notification-send -u critical -g  "Learn Keybindings" \ omarchy-notification-send -u critical -g  "$(omarchy-text "Learn Keybindings")" \
$'Super + K for cheatsheet.\nSuper + Space for Omarchy Menu.' \ "$(omarchy-text $'Super + K for cheatsheet.\nSuper + Space for Omarchy Menu.')" \
--exec omarchy-menu-keybindings --exec omarchy-menu-keybindings
+2 -2
View File
@@ -1,10 +1,10 @@
notify_update() { notify_update() {
omarchy-notification-send -u critical -g  "Update System" "Click to update the system." \ omarchy-notification-send -u critical -g  "$(omarchy-text "Update System")" "$(omarchy-text "Click to update the system.")" \
--exec omarchy-launch-floating-terminal-with-presentation omarchy-update --exec omarchy-launch-floating-terminal-with-presentation omarchy-update
} }
notify_wifi() { notify_wifi() {
omarchy-notification-send -u critical -g 󰖩 "Setup Wi-Fi" "Click to configure the wireless network." \ omarchy-notification-send -u critical -g 󰖩 "$(omarchy-text "Setup Wi-Fi")" "$(omarchy-text "Click to configure the wireless network.")" \
--exec omarchy-shell shell toggle omarchy.network --exec omarchy-shell shell toggle omarchy.network
} }
+5 -1
View File
@@ -20,9 +20,13 @@ Now you're ready to Omarchy!
The full-disk encryption won't allow you to enter the password from a Bluetooth keyboard at startup. Just like you can't use a Bluetooth keyboard to enter the BIOS on a PC. You'll need a keyboard that either uses a 2.4ghz dongle or a cable (which is much nicer for latency anyway!). I personally love the [Lofree Flow84](https://www.lofree.co/products/lofree-flow-the-smoothest-mechanical-keyboard)! The full-disk encryption won't allow you to enter the password from a Bluetooth keyboard at startup. Just like you can't use a Bluetooth keyboard to enter the BIOS on a PC. You'll need a keyboard that either uses a 2.4ghz dongle or a cable (which is much nicer for latency anyway!). I personally love the [Lofree Flow84](https://www.lofree.co/products/lofree-flow-the-smoothest-mechanical-keyboard)!
### Installing in China
The installer's first screen asks for your language; pick _Chinese_ for a Chinese installer and system. The timezone you pick later decides the region: `Asia/Shanghai` brings Chinese package and developer mirrors and the China apps. See [China](52-china.md).
### Installing for another owner ### Installing for another owner
If you're setting up a machine for someone else — a family member, a new employee, a buyer — you shouldn't be answering the personal questions on their behalf. Hit `Ctrl + C` on the very first screen of the installer (the keyboard selection), and Omarchy will offer to prepare the machine for another owner instead. The system installs right away, but all the personal setup — keyboard layout, username, password — is deferred until the machine boots for the first time. The drive is still encrypted by default, and the password the new owner picks on that first boot becomes the encryption password too. (A machine you've already been using can be handed over without a reinstall too — see [resetting the computer](48-security.md).) If you're setting up a machine for someone else — a family member, a new employee, a buyer — you shouldn't be answering the personal questions on their behalf. Hit `Ctrl + C` on the very first screen of the installer (the language and keyboard selection), and Omarchy will offer to prepare the machine for another owner instead. The system installs right away, but all the personal setup — keyboard layout, username, password — is deferred until the machine boots for the first time. The drive is still encrypted by default, and the password the new owner picks on that first boot becomes the encryption password too. (A machine you've already been using can be handed over without a reinstall too — see [resetting the computer](48-security.md).)
### Unattended installs ### Unattended installs
+43
View File
@@ -0,0 +1,43 @@
# China
Omarchy works in mainland China without a VPN. Two installer answers set a machine up for China, and each stands on its own:
- **Language.** The installer's first screen asks for English or Simplified Chinese. Chinese puts the installer, the system language (`LANG=zh_CN.UTF-8`), the menus and the desktop shell in Chinese.
- **Region.** The timezone you pick decides the region. `Asia/Shanghai`, `Asia/Urumqi` and their older names select China; any other timezone is Global. The summary screen shows _Region: cn_ before anything touches the disk.
A Chinese speaker abroad keeps the global mirrors, and an English install in Shanghai still gets the China mirrors.
## What the China region sets up
| Area | China | Global |
|------|-------|--------|
| Arch packages | The channel's `.omarchy.cn` mirror first, its `.omarchy.org` mirror behind it, and the ArchLinuxCN repository with its keyring | `.omarchy.org` mirrors |
| Omarchy packages | `pkgs.omarchy.org` | `pkgs.omarchy.org` |
| Developer mirrors | npm, PyPI and uv, Go, rustup and crates.io, RubyGems and Bundler, Maven | Upstream registries |
| Software | _Install > China Apps_ | Hidden |
pacman tries the `.cn` mirror first. If it is unreachable or lacks a package, pacman falls through to `.org`, which works for anyone with their own VPN. The installer carries the China packages on the ISO, so a China install needs no network.
## Chinese input
After choosing Chinese, the installer's keyboard screen opens on _Chinese (Simplified, Pinyin)_; keep it and Fcitx5 Pinyin is ready at first login. Press `Super + I` to switch to Pinyin, and tap `Shift` to step between Chinese and Latin letters. Add or change an input method later under _Setup > Typing > Input Methods_. See [Keyboard, Mouse, Trackpad](34-keyboard-mouse-trackpad.md).
Chinese text renders in the right Noto CJK variant everywhere: Simplified for Chinese, Traditional for Taiwan and Hong Kong, Japanese and Korean for those languages.
## Developer mirrors
China machines point the common package managers at mirrors inside China. Environment variables in `/etc/environment.d/90-omarchy-china.conf` cover npm, PyPI and uv, Go, rustup, Bundler and Maven; they reach everything started from the desktop after your next login (not SSH or TTY shells), and they take precedence over npm, pip, uv and Go config files, so unset the variable in a shell to opt out. `/.cargo/config.toml` points crates.io at the mirror unless a project's `.cargo/config.toml` says otherwise, and `/etc/gemrc` sets the RubyGems source unless your `~/.gemrc` sets another. Omarchy never replaces one of those two files if it is a regular file you created. Toolchain downloads by mise, such as Node.js or Go themselves, still come from upstream.
## China Apps
_Install > China Apps_ installs WeChat, QQ, Feishu, DingTalk, Tencent Meeting and WPS Office from the AUR, and sets up Tencent Docs, Yuque and Shimo as web apps.
## Switching later
_Setup > Region_, or `omarchy region cn` and `omarchy region global`, switches the region. China runs a full system update, trusts the ArchLinuxCN keyring, records the region, moves pacman to the `.cn` mirrors and links the developer mirrors. Global moves pacman back to `.org`, removes the developer mirrors and hides _Install > China Apps_; apps you installed from it stay. The developer mirrors change at the next login, so the switch offers to log out.
_Setup > Language_, or `omarchy language zh` and `omarchy language en`, switches the system language. The menus and the desktop shell follow at the next login, so it offers to log out too.
Neither switch touches the other, the input methods or the CJK fonts. `omarchy update` never changes the region or the language.
A machine prepared for another owner keeps the language picked in the installer but installs Global, since its timezone is only set on first boot. Switch it under _Setup > Region_ once it is online.
+132
View File
@@ -0,0 +1,132 @@
# OmarchyCN task list
Progress source of truth for the `omarchycn` branches of `omarchy`, `omarchy-iso` and `omarchy-pkgs`. Work top to bottom, one item at a time. Each item closes only after a codex review (GPT 6.1 Sol, xhigh, in a herdr split) passes; at most 5 reviews per item.
## Decisions (confirmed with the owner, 2026-10-05)
- Region is machine state in `/etc/omarchy/region` (`china`); absent means Global.
- Arch and Omarchy repos follow the domain plan: every `*.omarchy.org` server gets a `*.omarchy.cn` twin listed first. `pkgs.omarchy.cn` is live; `stable-mirror`, `rc-mirror` and `mirror.omarchy.cn` do not resolve yet, so pacman falls through to `.org`.
- China means a Chinese UI: `LANG=zh_CN.UTF-8` and Chinese menu labels. Global means `en_US.UTF-8`. `omarchy update` never touches the locale.
- Input method: rime-ice-installer (omarchy-pkgs PR 265, not merged yet). The ISO bundles the package, the Rime Ice `full.zip` and the Wanxiang grammar model; the install finishes with Rime and US keyboard ready, Ctrl+Space toggles. The installer gets a local patch: `--asset-dir` and no sudo when its packages are present.
- China to Global: switch sources and language, keep CJK fonts and the input method, remove the Claude Code third-party provider entry and the env it wrote, hide the China software entry. Dim and Kimi stay for every region.
- Deferred provisioning and factory reset get the region's system setup but no offline input method (deferred).
## Decisions (owner and maintainers, 2026-10-08)
These replace the 2026-10-05 decisions where they disagree.
- Region and language are separate. Region comes from the timezone the user picks (omarchy #13690, omarchy-iso #241); the installer adds no region screen. Language is the first installer screen.
- The `.cn` pacman mirrors are #13690's `mirrorlist-<channel>.prepend` files. Our `servers.sed` twins and the USTC Arch fallback go; `[omarchy]` keeps only `pkgs.omarchy.org`, as in #13690.
- Input methods come from dhh's #14433 and omarchy-iso #237. Rime, `rime-ice-installer` and its bundled assets go.
- The language picker offers English and Simplified Chinese. Chinese reruns the installer in cage + foot with fonts unpacked from the offline repository's `noto-fonts-cjk`; the target gets `LANG=zh_CN.UTF-8`.
- Setup > Region switches mirrors, developer mirrors, the China apps entry and the Claude Code API entry. Setup > Language switches `LANG` and the Chinese UI. Neither touches the other.
## Decisions (owner, 2026-10-11, after the maintainers tested the ISO)
- Drop _Setup > Claude Code API_ (`omarchy-setup-claude-api`) and the Dim/Kimi agent roster and migration. `omarchy region global` no longer touches Claude settings.
- Drop the ISO's local-build pin (`pin_local_packages`, `IgnorePkg` and its hooks).
- Drop the `omarchy-pkg-add` change; it served Rime.
- PRs carry only our changes and never overlap Yunjie Dai's (#13690, iso #241) or David's (#14433, iso #237). Region work stacks on #13690; ISO work stacks on iso #241.
## Shipping prerequisites
- The region profile and timezone mapping wait on omarchy #13690 and omarchy-iso #241; input methods (omarchy #14433, omarchy-iso #237) are merged. The language screen, CJK console, Chinese UI, developer mirrors and China apps exist only on the `omarchycn` branches: build a test ISO with `./bin/omarchy-iso-make --local-source ../omarchy ../omarchy-pkgs` from `omarchy-iso/`.
- A local-source ISO builds `omarchy-dev` and `omarchy-settings-dev` under the published version number and does not pin them, so the next published release replaces them on `omarchy update`. Local test ISOs are for testing only.
- `stable-mirror.omarchy.cn`, `rc-mirror.omarchy.cn` and `mirror.omarchy.cn` resolve and serve `core.db` (checked 2026-10-09).
## PR branches (T32, 2026-10-12)
omarchy, each a fork branch:
- `cjk-variant-selection` on upstream `quattro`: the Noto CJK variant fontconfig.
- `chinese-language` on upstream `quattro`: `omarchy language`, Setup > Language, the installer's language prompt, the Chinese menu overlay, shell and notification text.
- `cn-developer-mirrors` on #13690: the `cn` developer mirrors at install.
- `cn-region-switch` on `cn-developer-mirrors`: `omarchy region`, Setup > Region, China Apps, `manual/52-china.md`; English only.
omarchy-iso: `chinese-installer` on iso #241 (the language screen, the CJK console, the translated installer, the target locale, the summary's keyboard label); `omarchycn` merges it onto iso `quattro`. omarchy-pkgs: `omarchycn` is upstream `master`.
omarchy `omarchycn` merges them onto `quattro` and adds what no PR can carry yet: the Chinese wording for Region and China Apps and the language half of the China manual (needs both language and region), and, until #13690 rebases onto upstream's ARM templates, an integration-only pacman resolution and a guard that refuses `omarchy region cn` off x86. Known failure there: `pacman-templates-test` expects x86 refresh to copy templates directly, which #13690 replaces with a render.
## Tasks
- [x] T0 Branches and this list
- [x] T1 China package sources (PRD 1): region state, `omarchy-region` reader, `default/region/china/pacman.sed`, applied by `omarchy-refresh-pacman` and `install/post-install/pacman.sh`; tests
- [x] T2 Region choice in the installer (PRD 2): `omarchy_prompt_region` in `setup-form.sh`, ISO configurator screen, orchestrator passes `OMARCHY_REGION`, `install/config/region.sh` records it
- [x] T3 Input method (PRD 3): rime-ice-installer patch and PKGBUILD in omarchy-pkgs, IME packages in `omarchy-other.packages`, install-time package add, user step runs the installer from bundled assets, ISO build bundles assets and the package
- [x] T4 CJK fontconfig fix (PRD 4): rebuild PR 9693 on the current base
- [x] T5 AI (PRD 5): Dim and Kimi Code for every region (rebuild PR 9694), Claude Code third-party provider setup shown only in China
- [x] T6 Developer mirrors (PRD 6): npm, PyPI/uv, Go, rustup, crates.io, RubyGems, Maven via system drop-ins under `default/region/china/`
- [x] T7 China software (PRD 7): Install menu entry shown only in China
- [x] T8 Region switching and Chinese UI (PRD 8): `omarchy-region china|global`, Setup > Region, locale, Chinese menu overlay chosen by `LANG`
- [x] T9 Logo (PRD 9): stock Omarchy logo everywhere
- [x] T10 Docs: `AGENTS.md`, manual
- [x] T11 Test ISO build (local source)
- [x] T12 QEMU install and verification: China and Global installs, region switch, `omarchy update` keeps region and language
- [x] T13 Acceptance checklist
- [x] T14 Chinese installer (owner request, parity with the old OmarchyCN ISO): choosing China on the VT reruns the installer in cage + foot with CJK fonts and a US keyboard, falling back to the English VT; there the region screen is bilingual and Global returns to the VT; every later installer screen, the shared setup form and the install dashboard read in Chinese
- [x] T15 Global to China fails on local-source installs (owner report): `rime-ice-installer` lives only in the ISO's offline mirror, so a Global install cannot fetch it later; local-source installs install every pinned local build, and `install/config/region.sh` installs the China packages before it writes any region state
- [x] T16 A region switch offers to log out at once, since the language and the developer mirrors only reach a new session (owner request)
- [x] T17 The desktop shell reads in Chinese under `zh_CN` (owner report): notifications, the bar panels (agents, network, display and the rest), the menu's search prompt — review cap reached: five codex rounds; the round-5 findings (user text translated at display, custom reminder list lines, reminder tooltips and errors) are fixed by wording every notification at its sender and verified by tests and in the China VM, without a sixth review
- [x] T18 Merge the official region-profile PRs (omarchy #13690, #14399; omarchy-iso #206, #236) and align to them: region code `cn` in `/etc/omarchy/region`, China files under `default/regions/cn/`, pacman rendered by `omarchy-apply-pacman` (`.cn` twins first, USTC fallback, ArchLinuxCN with its keyring), offline timezone `Asia/Shanghai`; the ISO keeps the first-screen region choice and bundles the China profile, `--region cn` preselects China
- [x] T19 Merge the reworked #13690 (timezone-derived region) and align: `mirrorlist-<channel>.prepend` and `timezones` replace `servers.sed`, `mirrorlist.append` and `timezone`; drop #14399's timezone preselection (closed upstream); `install/config/region.sh` reads `/etc/omarchy/region` instead of `OMARCHY_REGION`; drop the dead `china` rename migration
- [x] T20 Merge #14433 (input methods) and remove Rime: packages, `install/user/region.sh`, the Rime steps in `install/config/region.sh` and `omarchy-region`
- [x] T21 Split language from region: `omarchy-language en|zh` and Setup > Language own `LANG`; `omarchy-region` and `install/config/region.sh` stop touching the locale
- [x] T22 omarchy-pkgs: revert the `rime-ice-installer` package
- [x] T23 omarchy-iso: merge upstream `quattro` (#237) and #241; remove `--region`, `prepare-region.sh`, the region skel, the region preselected timezone, Rime bundling and its pin
- [x] T24 omarchy-iso: the language screen replaces the region screen; Chinese reruns in cage + foot with `noto-fonts-cjk` unpacked from the offline repository (no font packages added to the ISO); the CJK console lists only US-keymap keyboards and preselects Chinese (Simplified, Pinyin); the target gets `zh_CN.UTF-8` through `locale_config`; the harness takes `--language zh`
- [x] T25 Docs: `AGENTS.md`, `docs/regions.md`, `manual/52-china.md`, omarchy-iso README
- [x] T26 Build the local-source ISO and test in QEMU: Chinese + `Asia/Shanghai`, English + `America/New_York`, runtime region and language switches
- [x] T27 Acceptance checklist for T19–T26
- [x] T28 Drop the Claude Code API setup, the Dim/Kimi roster and migration, and the `omarchy-pkg-add` change (omarchy)
- [x] T29 Drop `pin_local_packages` and the pin list (omarchy-iso)
- [x] T30 The CJK console skips the second language screen; the summary's keyboard row shows the chosen layout, not its keymap (omarchy-iso)
- [x] T31 The CJK console fills the screen and the summary keeps the logo in view (omarchy-iso)
- [x] T32 Rebuild omarchy as PR branches on current upstream: CJK fontconfig, language and menus, shell text, cn developer mirrors (on #13690), Setup > Region and China Apps; `omarchycn` becomes their merge
- [x] T33 Rebuild omarchy-iso as one PR branch on iso #241 and current upstream; `omarchycn` becomes it; omarchy-pkgs follows upstream master
- [x] T34 Build the local-source ISO and test in QEMU: Chinese offline, English
- [x] T35 Acceptance checklist for T28–T34
- [ ] T36 Open the PRs one at a time from Raiden-MeixElysia
## Acceptance checklist for T28–T34 (maintainers' ISO test, 2026-10-11)
| # | Request | Result | Evidence |
|---|---|---|---|
| 1 | Drop `pin_local_packages` and its hooks | Pass | omarchy-iso 2a589e9; installed `pacman.conf` has no `IgnorePkg`, `/etc/pacman.d/hooks` holds only upstream hooks (30-state). |
| 2 | Drop `omarchy-setup-claude-api` and the Dim/Kimi roster and migration | Pass | omarchy f2af41bb; nothing of them in any PR branch; `omarchy region global` touches no Claude settings. |
| 3 | No second language screen in the CJK console | Pass | omarchy-iso 2c523af; cage + foot opens on the keyboard screen (04-keyboard). |
| 4 | No black strip; logo whole on the summary; keyboard row shows Pinyin | Pass | omarchy-iso 411acd6 (`[csd] preferred=none`, `line-height=22px`) and 2c523af (`keyboard_label`); 04-keyboard, 14-summary. |
| 5 | PRs carry only our changes, stacked on #13690; ISO bundles David's #14433 | Pass | T32/T33 branches; #14433 and iso #237 come from upstream `quattro`; region branches stack on #13690, the ISO branch on iso #241. |
| - | Rebuilt ISO, Chinese offline and English | Pass | T34 evidence below. |
| - | Automated tests | No new failures | Per-branch shell tests pass on their bases; `fontconfig-cjk-test` needs the installed font set and passes in full on the T34 VM (48-fontconfig-test); the integration suite fails only where upstream fails, plus `pacman-templates-test` until #13690 rebases; ISO unit tests fail only `test_keyboard` (no `localectl`), as upstream. |
Open: `pacman-templates-test` and the ARM guard wait on #13690's rebase; the Chinese wording for Region and China Apps waits on the language and region PRs; the upstream menu acceptance test still walks Style > Menu Bar.
## T34 evidence (2026-10-12)
ISO `release/omarchy-2026.10.12-x86_64-local.iso` from omarchy `omarchycn`, omarchy-iso `omarchycn` (c407101), omarchy-pkgs upstream master (d47199f2). Screenshots in `~/omarchy-vm/shots/`.
- Chinese, offline (`OFFLINE=on`): the VT language screen, then cage + foot opens straight on the keyboard screen with Pinyin preselected and no strip (04-keyboard); the summary keeps the whole logo and shows `键盘 Chinese (Simplified, Pinyin)` (14-summary); installed in 4m 0s (18-progress). First boot: Chinese desktop and notifications (21-desktop); `LANG=zh_CN.UTF-8`, region `cn`, `mirror.omarchy.cn` first, `[archlinuxcn]`, no `IgnorePkg` or pin hooks, developer mirror links and `NPM_CONFIG_REGISTRY`/`GOPROXY` in the session, Fcitx5 profile with Pinyin (30-state); `Super + I`, `nihao`, Space typed 你好 (31-pinyin); Setup shows 语言 and 地区 (34-setup); `fc-match` gives SC for untagged Han under zh_CN and TC, HK, JP, KR for tagged text, Liberation Sans for tagged Latin (36-fonts).
- Runtime, online: `omarchy region global` → Global, no marker, `.org` mirror, no ArchLinuxCN, links gone, `LANG` kept, Chinese logout prompt (42, 43); `omarchy language en` → `en_US.UTF-8`, English logout prompt (44); `omarchy region cn` → China, `.cn` first, ArchLinuxCN, links back, `LANG` kept (45, 46); `omarchy language zh` → `zh_CN.UTF-8` (47). The `.cn` edge mirror lagged `.org` by one sqlite release, which the cn refresh downgraded.
- English, harness: install and first boot pass; four acceptance failures, all upstream: Mozc Qt, weather OCR, `omarchy-bore` vs `linux-omarchy`, and the menu test still walking Style > Menu Bar, which upstream moved to Trigger > Appearance.
## Acceptance checklist
Evidence comes from the T26 runs of `omarchy-iso/release/omarchy-2026.10.09-x86_64-local.iso` (omarchy fcd681c0, omarchy-iso 30f63b6, omarchy-pkgs a4cc3234): run A in host QEMU with the guest cut off from the network during install, run B in the ISO test harness.
| # | Requirement (discussion of 2026-10-08) | Result | Evidence |
|---|---|---|---|
| 1 | Language picker on the first screen; Chinese gets cage + foot | Pass | Run A: the VT screen offers English and Chinese; Chinese reruns in cage + foot on a bilingual language screen, and every later screen and the install dashboard read in Chinese. |
| 2 | CJK font from the offline repository, not added to the ISO | Pass | `unpack_cjk_font` extracts `NotoSansCJK-Regular.ttc` from the offline mirror's `noto-fonts-cjk`; the ISO package list drops `ttf-jetbrains-mono` and `wqy-microhei` and keeps only `cage` and `foot`. |
| 3 | Translated installer strings and the target locale | Pass | Run A: summary, finish screen and dashboard in Chinese; installed `LANG=zh_CN.UTF-8` through `locale_config`. Run B: English throughout, `LANG=en_US.UTF-8`. |
| 4 | Region from the timezone, no extra step (#13690, #241) | Pass | Run A: `Asia/Shanghai` shows 区域 cn on the summary and writes `/etc/omarchy/region` = `cn`. Run B: `America/New_York` installs Global with no marker. |
| 5 | Offline install ready without network | Pass | Run A installed in 8m13s with the guest network cut off; ArchLinuxCN keyring trusted, `mirror.omarchy.cn` first, Pinyin ready at first login. |
| 6 | `.cn` pacman mirrors from #13690; ours dropped | Pass | China: `mirror.omarchy.cn` before `mirror.omarchy.org`, `[archlinuxcn]` from USTC. Global: mirrorlist equals the channel template; `pacman.conf` differs only by the local-build `IgnorePkg` pin. |
| 7 | Developer mirrors on the cn profile | Pass | China links `/etc/environment.d/90-omarchy-china.conf`, `/.cargo/config.toml`, `/etc/gemrc`; Global removes them and `NPM_CONFIG_REGISTRY` is gone after relogin. |
| 8 | Input methods from dhh's #14433; Rime removed | Pass | Chinese preselects Chinese (Simplified, Pinyin); `INPUT_METHOD=pinyin`; `Ctrl + Shift + Space` then `nihao` typed 你好. No Rime package, asset or pin remains. |
| 9 | Region and language switch separately at runtime | Pass | `omarchy region global` and `cn` leave `LANG` alone; `omarchy language en` and `zh` leave the region alone; each offers logout in the right language; Claude Code API and China Apps follow the region. |
| 10 | `omarchy update` keeps region and language | Pass | After `omarchy update -y`: `LANG=zh_CN.UTF-8`, region `cn`, `mirror.omarchy.cn` first, `[archlinuxcn]` present. |
| - | Automated tests | Pass, no new regressions | omarchy shell suite in an Arch container: every failure is environmental and predates these tasks; some sit in branch-only tests (`fontconfig-cjk-test` needs the Omarchy font set, `hyprland-jis-bindings-test` needs `lua`, `menu-plugin-test` and `tailscale-receive-test` chmod a symlink on the read-only mount). omarchy-iso `./test/all` passes apart from `test_keyboard` (needs systemd's `localectl`). Harness acceptance: four failures outside this branch (Mozc Qt; weather and reminder prompts on screen but missed by OCR; `linux-omarchy` vs `omarchy-bore` kernel). |
Open items outside this branch: the shipping prerequisites above; the four acceptance failures listed; `.automated_script.sh` exits 1 when its dashboard returns without rebooting after the mirror warm-up has finished, from upstream's `EXIT` trap under `set -e`; each `omarchy region` switch asks for the sudo password several times through refresh's command-scoped `sudo` calls.
+16
View File
@@ -0,0 +1,16 @@
pragma Singleton
import QtQuick
import "Tr.js" as Tr
// tr("English %1", arg) returns the Chinese entry under zh_CN; plain JS imports Tr.js for the same.
QtObject {
readonly property bool chinese: Tr.chinese
function tr() {
return Tr.tr.apply(null, arguments)
}
function trMatch(text, templates) {
return Tr.trMatch(text, templates)
}
}
+653
View File
@@ -0,0 +1,653 @@
// Chinese for the shell, keyed by the English text each I18n.tr() call passes; %1, %2 are arguments.
.pragma library
var table = {
// Agents panel
"Agents": "AI 代理",
"Monthly": "每月",
"Weekly": "每周",
"Session": "会话",
"Limit": "额度",
"now": "现在",
"%1d %2h": "%1天 %2小时",
"%1h %2m": "%1小时 %2分",
"%1m": "%1分钟",
"%1 free reset": "%1 次免费重置",
"%1 free resets": "%1 次免费重置",
"%1 spent of %2 funded": "已用 %1,共充值 %2",
"estimated": "估算",
"%1 tokens this week": "本周 %1 tokens",
"%1 tokens today": "今天 %1 tokens",
"Mostly %1": "主要使用 %1",
"Busiest day: %1": "最忙的一天:%1",
"%1 prompt today": "今天 %1 条提示",
"%1 prompts today": "今天 %1 条提示",
"%1 session today": "今天 %1 个会话",
"%1 sessions today": "今天 %1 个会话",
"Merged from %1 device": "合并自 %1 台设备",
"Merged from %1 devices": "合并自 %1 台设备",
"Add an account": "添加账户",
"Add an %1 account": "添加 %1 账户",
"Add a %1 account": "添加 %1 账户",
"The sign-in didn't finish.": "登录没有完成。",
"Back to the limits": "返回额度",
"Add a subscription": "添加订阅",
"Start the default agent": "启动默认 AI 代理",
"MAKE SOMETHING COOL": "做点有意思的",
"Sign in to an AI coding subscription, and this panel keeps track of how much of it you have left.": "登录一个 AI 编程订阅,这个面板会记录剩余额度。",
"Name this account. It signs in through a private window, so your browser's current account isn't picked up.": "给这个账户起个名字。登录在隐私窗口中进行,不会用到浏览器当前登录的账户。",
"Work": "工作",
"Confirm this code in your browser": "在浏览器中确认这个代码",
"If the page shows a code instead of finishing, paste it here.": "如果页面显示代码而没有完成,把代码粘贴到这里。",
"Code": "代码",
"Open the sign-in page again": "重新打开登录页",
"Sign in to %1 again": "重新登录 %1",
"Balance": "余额",
"Start your default agent on a new %1": "用默认 AI 代理新建一个%1",
"Sign in to this account again": "重新登录这个账户",
"ACTIVE": "使用中",
"Autoswitch": "自动切换",
"Stop switching automatically": "停止自动切换",
"Switch here automatically at %1%": "用到 %1% 时自动切换到这里",
"Use": "使用",
"Usage unavailable": "用量不可用",
"Usage has not been updated yet.": "用量还没有更新。",
"%1: %2% used": "%1:已用 %2%",
"resets in %1": "%1后重置",
"Last updated %1 ago": "%1前更新",
"Last updated less than a minute ago": "不到一分钟前更新",
"Last updated time unavailable": "更新时间不可用",
"Theme": "主题",
"Plugin": "插件",
"App": "应用",
"Sunday": "星期日",
"Monday": "星期一",
"Tuesday": "星期二",
"Wednesday": "星期三",
"Thursday": "星期四",
"Friday": "星期五",
"Saturday": "星期六",
"%1: %2% of its %3 allowance": "%1:占%3额度的 %2%",
"Subscriptions": "订阅",
"next expires in %1": "下一次%1后过期",
"Installing the %1 CLI…": "正在安装 %1 命令行…",
"Sign in to %1 again in the browser window that opens.": "在打开的浏览器窗口中重新登录 %1。",
"Sign in to %1 in the browser window that opens.": "在打开的浏览器窗口中登录 %1。",
"Sign in again as this account in the private window that opens.": "在打开的隐私窗口中以这个账户重新登录。",
"Sign in as the account you're adding in the private window that opens.": "在打开的隐私窗口中登录要添加的账户。",
"Signed in to %1 again.": "已重新登录 %1。",
"Signed in to %1.": "已登录 %1。",
"The %1 sign-in didn't finish.": "%1 登录没有完成。",
"Added %1.": "已添加 %1。",
"Starting…": "正在开始…",
"Checking the code…": "正在核对代码…",
"Run `claude auth login` to restore authoritative usage.": "运行 `claude auth login` 恢复准确的用量。",
"Run `codex login` to authenticate.": "运行 `codex login` 完成认证。",
"Set FIREWORKS_API_KEY, run `firectl set-api-key`, or sign in to Fireworks in pi or opencode.": "设置 FIREWORKS_API_KEY,运行 `firectl set-api-key`,或在 pi 或 opencode 中登录 Fireworks。",
"Start Grok, or run `grok login`, to sign in.": "启动 Grok 或运行 `grok login` 登录。",
"Start Grok to see its limits; signing in again is not needed.": "启动 Grok 查看额度,不需要重新登录。",
"Grok's saved sign-in expired. Start Grok to refresh it.": "Grok 保存的登录已过期,启动 Grok 刷新。",
"Fireworks unavailable": "Fireworks 不可用",
"Fireworks usage scan failed": "Fireworks 用量扫描失败",
"Balance unavailable": "余额不可用",
"Claude limits unavailable": "Claude 额度不可用",
"Codex limits unavailable": "Codex 额度不可用",
"Codex unavailable": "Codex 不可用",
"Grok limits unavailable": "Grok 额度不可用",
"Limits paused": "额度已暂停",
"Sign-in expired": "登录已过期",
"Waiting for auth": "等待认证",
"Anthropic's usage endpoint is rate limiting checks right now (retry after %1s). Local Claude Code stats are still shown.": "Anthropic 用量接口正在限制查询频率(%1 秒后重试)。仍显示本地 Claude Code 统计。",
"Anthropic's usage endpoint returned status %1. Local Claude Code stats are still shown.": "Anthropic 用量接口返回状态 %1。仍显示本地 Claude Code 统计。",
"Claude Code's access token has lapsed — showing the last known limits. Start Claude Code to refresh it; signing in again is not needed.": "Claude Code 的访问令牌已过期,显示上次的额度。启动 Claude Code 即可刷新,不需要重新登录。",
"Claude Code's access token has lapsed. Start Claude Code to refresh it; signing in again is not needed.": "Claude Code 的访问令牌已过期。启动 Claude Code 即可刷新,不需要重新登录。",
"Claude Code's saved sign-in expired — showing the last known limits. Start Claude Code, or run `claude auth login`, to refresh it.": "Claude Code 保存的登录已过期,显示上次的额度。启动 Claude Code 或运行 `claude auth login` 刷新。",
"Claude Code's saved sign-in expired. Start Claude Code, or run `claude auth login`, to refresh it.": "Claude Code 保存的登录已过期。启动 Claude Code 或运行 `claude auth login` 刷新。",
"Couldn't reach Anthropic's usage endpoint. Retrying shortly. Local Claude Code stats are still shown.": "无法连接 Anthropic 用量接口,稍后重试。仍显示本地 Claude Code 统计。",
"Anthropic's usage endpoint returned no limits. Local Claude Code stats are still shown.": "Anthropic 用量接口没有返回额度。仍显示本地 Claude Code 统计。",
"Anthropic's usage endpoint is rate limiting checks right now. Local Claude Code stats are still shown.": "Anthropic 用量接口正在限制查询频率。仍显示本地 Claude Code 统计。",
// Network panel
"Wiring bits": "接线中",
"Handling packets": "处理数据包",
"Sorting frames": "整理数据帧",
"Hauling bytes": "搬运字节",
"Routing crumbs": "转发碎片",
"Counting collisions": "清点冲突",
"Bending light": "弯折光线",
"Turn Wi-Fi off": "关闭 Wi-Fi",
"Turn Wi-Fi on": "打开 Wi-Fi",
"WI-FI BAND": "WI-FI 频段",
"WI-FI BAND: %1": "WI-FI 频段:%1",
"Auto": "自动",
"Let Wi-Fi pick the band": "由 Wi-Fi 自动选择频段",
"Stay on %1": "固定在 %1",
"Timeout": "超时",
"KNOWN NETWORKS": "已知网络",
"OTHER NETWORKS": "其他网络",
"Ethernet": "有线网络",
"Passphrase required": "需要密码",
"Wrong password": "密码错误",
"Network lost": "网络丢失",
"Disconnected": "已断开",
"Connection failed": "连接失败",
"Failed to connect": "无法连接",
"Timed out connecting": "连接超时",
"Timed out disconnecting": "断开超时",
"Timed out forgetting": "忘记网络超时",
"Sign in to this network": "登录这个网络",
"Limited internet access": "互联网访问受限",
"Show QR code": "显示二维码",
"Run a speed test": "测速",
"No connection": "无连接",
"SIGN-IN REQUIRED": "需要登录",
"LIMITED INTERNET ACCESS": "互联网访问受限",
"NOT CONNECTED": "未连接",
"Open Captive Portal": "打开认证页面",
"Sign in or accept this network’s terms to access the internet.": "登录或接受这个网络的条款后才能上网。",
"AUTOMATIC": "自动",
"DNS PROVIDER": "DNS 服务商",
"Use DNS from DHCP": "使用 DHCP 提供的 DNS",
"Set DNS to %1": "DNS 设为 %1",
"Set custom DNS servers": "设置自定义 DNS 服务器",
"Custom": "自定义",
"SCANNING WI-FI…": "正在扫描 WI-FI…",
"Connecting…": "正在连接…",
"Disconnecting…": "正在断开…",
"Forgetting…": "正在忘记…",
"Failed": "失败",
"Sign-in required": "需要登录",
"Connected": "已连接",
"Forget network": "忘记网络",
"Hidden": "隐藏网络",
"Identity (user@domain)": "身份(user@domain)",
"Passphrase": "密码",
"Connect": "连接",
"Copy to clipboard": "复制到剪贴板",
"Ping": "延迟",
"Packet Loss": "丢包",
"Receiving": "接收",
"Sending": "发送",
"Downloaded": "已下载",
"Uploaded": "已上传",
"IP Address": "IP 地址",
"Gateway": "网关",
"Copy IP": "复制 IP",
"Copy gateway": "复制网关",
"Connecting...": "正在连接…",
// Display panel
"Display": "显示",
"FIXED BRIGHTNESS": "亮度固定",
"BRIGHTNESS": "亮度",
"TEXT SIZE": "文字大小",
"SCALE": "缩放",
"DISPLAYS": "显示器",
"Sun blast": "烈日当空",
"Solar flare": "耀眼",
"Golden hour": "黄金时刻",
"Even day": "白昼",
"Soft glow": "柔光",
"Lamp light": "灯光",
"Candlelit": "烛光",
"Night owl": "夜猫子",
"focused": "当前",
// Audio panel
"Audio": "音频",
"OUTPUT": "输出",
"INPUT": "输入",
"SOURCES": "音源",
"Mute": "静音",
"Unmute": "取消静音",
"Muted": "已静音",
"Silenced": "无声",
"Concert hall": "音乐厅",
"Party mode": "派对模式",
"Cranked up": "开大了",
"Steady groove": "稳稳的节奏",
"Easy listening": "轻松聆听",
"Murmur": "低语",
"Whisper": "耳语",
// Bluetooth panel
"Untangling wires": "理顺线缆",
"Streaming vikings": "维京人在传输",
"Pairing mysteries": "配对谜题",
"Herding headsets": "召集耳机",
"Taming radios": "驯服无线电",
"Summoning speakers": "召唤音箱",
"Wrangling codecs": "摆弄编解码器",
"Polishing packets": "打磨数据包",
"Bluetooth": "蓝牙",
"CONNECTED": "已连接",
"Forget": "忘记",
"No adapter": "没有适配器",
"Turned Off": "已关闭",
"Turn Bluetooth off": "关闭蓝牙",
"Turn Bluetooth on": "打开蓝牙",
"PAIRED": "已配对",
"AVAILABLE": "可用",
"No Bluetooth adapter": "没有蓝牙适配器",
"Turn Bluetooth on to scan": "打开蓝牙后扫描",
"Scanning for devices…": "正在扫描设备…",
"Disconnect": "断开",
"Pair": "配对",
"Device": "设备",
// Power panel
"Pumping power": "注入电力",
"Injecting electrons": "注入电子",
"Pouring juice": "倒入电量",
"Amassing watts": "积攒瓦特",
"Hoarding joules": "囤积焦耳",
"Sucking volts": "吸收伏特",
"Topping reserves": "补满储备",
"Soaking amps": "吸饱安培",
"Inhaling kilowatts": "吸入千瓦",
"Slurping power": "啜饮电力",
"Spending joules": "花费焦耳",
"Draining watts": "消耗瓦特",
"Burning electrons": "燃烧电子",
"Sipping juice": "小口用电",
"Spending coulombs": "花费库仑",
"Bleeding amps": "流失安培",
"Guzzling volts": "狂饮伏特",
"Munching reserves": "啃食储备",
"Battery": "电池",
"POWER PROFILE": "电源模式",
"Fully charged": "已充满",
"Threshold": "充电上限",
"On battery": "使用电池",
"Charging": "正在充电",
"Battery size": "电池容量",
"Charge cycles": "充电次数",
"Charge limit": "充电上限",
"Time left": "剩余时间",
"Time to full": "充满还需",
"Battery state": "电池状态",
"Discharging": "正在放电",
"Holding": "保持中",
"Performance": "性能",
"Balanced": "均衡",
"Power-saver": "省电",
// Tailscale panel
"Encrypting connections": "加密连接",
"Sending secrets": "传递秘密",
"Guarding wires": "守护线路",
"Braiding packets": "编织数据包",
"Polishing tunnels": "打磨隧道",
"Hiding routes": "隐藏路由",
"Sealing ports": "封好端口",
"Sorting tailnets": "整理 tailnet",
"Shuffling keys": "洗牌密钥",
"Watching machines": "照看机器",
"Tailscale CLI is not installed or not on PATH.": "没有安装 Tailscale 命令行,或它不在 PATH 中。",
"CONNECTIONS": "连接",
"EXIT NODES": "出口节点",
"Search regions": "搜索地区",
"No Mullvad regions found.": "没有找到 Mullvad 地区。",
"MACHINES": "机器",
"No machines found on this tailnet.": "这个 tailnet 上没有机器。",
"Authorize Tailscale operator": "授权 Tailscale 操作员",
"Allow this user to operate this Tailscale profile": "允许这个用户操作这个 Tailscale 配置",
"Send files": "发送文件",
"Turn Tailscale off": "关闭 Tailscale",
"Authorize this device": "授权这台设备",
"Turn Tailscale on": "打开 Tailscale",
"Choose Mullvad region": "选择 Mullvad 地区",
"Tailscale is disconnected": "Tailscale 已断开",
"Account": "账户",
"Starting Tailscale login…": "正在开始 Tailscale 登录…",
"Authorizing Tailscale operator...": "正在授权 Tailscale 操作员…",
"Tailscale login link not available yet": "Tailscale 登录链接还不可用",
"Authorize Tailscale operator to show connections": "授权 Tailscale 操作员后显示连接",
"Could not list Tailscale connections": "无法列出 Tailscale 连接",
"Tailscale command failed": "Tailscale 命令失败",
"Account switch failed": "切换账户失败",
"Exit node selection failed": "选择出口节点失败",
"Tailscale authorization failed": "Tailscale 授权失败",
"Tailscale operator authorized": "Tailscale 操作员已授权",
"Unknown": "未知",
// Dropbox panel
"Filing files": "归档文件",
"Distributing data": "分发数据",
"Shuffling folders": "整理文件夹",
"Boxing bytes": "装箱字节",
"Sorting stuff": "分拣东西",
"Syncing secrets": "同步秘密",
"Packing packets": "打包数据包",
"Moving memories": "搬运回忆",
"Wrangling revisions": "整理修订",
"Cataloging chaos": "编目混乱",
"RECENT FILES": "最近文件",
"No synced files found.": "没有找到同步的文件。",
"Pause syncing": "暂停同步",
"Resume syncing": "继续同步",
"Syncing paused": "同步已暂停",
"Stored": "已存储",
"Login to Dropbox": "登录 Dropbox",
"Dropbox CLI is not installed": "没有安装 Dropbox 命令行",
"Start the authentication flow": "开始认证",
"Install Dropbox from the service menu": "从服务菜单安装 Dropbox",
"Untitled": "未命名",
"%1 of %2": "%1 / %2",
"Just now": "刚刚",
"Unknown time": "时间未知",
"%1mo ago": "%1个月前",
"%1m ago": "%1分钟前",
"%1h ago": "%1小时前",
"%1d ago": "%1天前",
"%1y ago": "%1年前",
"Starting Dropbox login…": "正在开始 Dropbox 登录…",
"Opened Dropbox login": "已打开 Dropbox 登录",
"Failed to read Dropbox status": "无法读取 Dropbox 状态",
"Could not read Dropbox status": "无法读取 Dropbox 状态",
"Dropbox login failed": "Dropbox 登录失败",
"Dropbox command failed": "Dropbox 命令失败",
"Failed to parse Dropbox status": "无法解析 Dropbox 状态",
// Weather panel
"Search city": "搜索城市",
"FEELS": "体感",
"WIND": "风",
"HUMID": "湿度",
"Fetching forecast…": "正在获取天气预报…",
// Wi-Fi QR panel
"Generating QR code…": "正在生成二维码…",
"Scan to join this network": "扫码加入这个网络",
"Could not generate the Wi-Fi QR code": "无法生成 Wi-Fi 二维码",
"Could not read the Wi-Fi password": "无法读取 Wi-Fi 密码",
"Show password": "显示密码",
// Speed tests
"Speed test failed": "测速失败",
"DOWNLOAD": "下载",
"UPLOAD": "上传",
"Measure again via fast.com": "通过 fast.com 重新测速",
"Disk speed test failed": "磁盘测速失败",
"READ": "读取",
"WRITE": "写入",
"Measure again": "重新测速",
"Run Again": "再测一次",
// Lock screen
"Enter Password": "输入密码",
"Checking…": "正在验证…",
"Fingerprint reader unavailable": "指纹识别器不可用",
"Authentication failed (%1)": "认证失败(%1)",
// Authentication prompt
"Authentication is needed...": "需要认证…",
"Wrong": "错误",
"Checking...": "正在验证…",
"Enter password": "输入密码",
// Reminders
"Reminder message": "提醒内容",
"Remind in minutes": "几分钟后提醒",
"%1 in %2 (%3)": "%1,还有 %2(%3)",
"Set Reminder": "设置提醒",
"1 reminder": "1 个提醒",
"%1 reminders": "%1 个提醒",
"Invalid reminder": "无效的提醒",
"Enter the number of minutes": "输入分钟数",
// Notifications
"No recent notifications": "没有最近的通知",
// Bar
"Microphone muted": "麦克风已静音",
"Microphone in use": "麦克风使用中",
"Microphone live": "麦克风已开启",
"Pending Omarchy Updates": "有待安装的 Omarchy 更新",
"Tray icons": "托盘图标",
"Pinned icons stay visible. Hidden icons never show.": "固定的图标一直显示,隐藏的图标不再显示。",
"No tray items reporting.": "没有托盘项目。",
"Unpin": "取消固定",
"Pin": "固定",
"Show": "显示",
"Hide": "隐藏",
"Allow Notifications": "允许通知",
"Silence Notifications": "静默通知",
"Day Light": "日间光线",
"Night Light": "夜间光线",
"Stop recording": "停止录屏",
"Screen Recording": "录屏",
"Allow Idle Lock & Screensaver": "允许空闲锁屏和屏保",
"Stay Awake": "保持唤醒",
// Shared controls
"Cancel": "取消",
"Confirm": "确认",
"Search...": "搜索…",
"No options": "没有选项",
"None selected": "未选择",
"Loading…": "正在加载…",
"No matches": "没有匹配项",
// Notifications and on-screen messages
"Learn Keybindings": "了解快捷键",
"Super + K for cheatsheet.\nSuper + Space for Omarchy Menu.": "Super + K 查看快捷键速查表。\nSuper + Space 打开 Omarchy 菜单。",
"Update System": "更新系统",
"Click to update the system.": "点击更新系统。",
"Setup Wi-Fi": "设置 Wi-Fi",
"Click to configure the wireless network.": "点击配置无线网络。",
"All reminders have been cleared": "所有提醒已清除",
"Animations disabled": "动画已关闭",
"Animations enabled": "动画已开启",
"Can't disable the only active display": "不能关闭唯一的显示器",
"Copied text from selection to clipboard": "已把选中文字复制到剪贴板",
"Could not complete shutdown. Please try again.": "无法完成关机,请重试。",
"Could not share": "无法分享",
"Crash capture disabled": "崩溃捕获已关闭",
"Crash capture enabled": "崩溃捕获已开启",
"Disable single-window square aspect ratio": "关闭单窗口方形比例",
"Enable single-window square aspect ratio": "开启单窗口方形比例",
"Download failed": "下载失败",
"Editing config file": "正在编辑配置文件",
"Extended mode restored": "已恢复扩展模式",
"Failed to start Windows VM": "无法启动 Windows 虚拟机",
"Herdr theme sync disabled": "Herdr 主题同步已关闭",
"Herdr theme sync enabled": "Herdr 主题同步已开启",
"Laptop display disabled": "笔记本屏幕已关闭",
"Laptop display enabled": "笔记本屏幕已开启",
"Logging out": "正在注销",
"Microphone on": "麦克风已开启",
"No QR code found": "没有找到二维码",
"No RetroArch cores found": "没有找到 RetroArch 核心",
"No audio devices found": "没有找到音频设备",
"No background was found for theme": "这个主题没有壁纸",
"No external monitors found for mirror": "没有可镜像的外接显示器",
"No laptop display found": "没有找到笔记本屏幕",
"No laptop monitor found to mirror": "没有可镜像的笔记本屏幕",
"No outstanding reminders": "没有待办提醒",
"No video found for download": "没有可下载的视频",
"No webcam devices found": "没有找到摄像头",
"QR code copied to clipboard": "二维码已复制到剪贴板",
"Rebooting": "正在重启",
"Recording process had to be force-killed. Video may be corrupted.": "录屏进程被强制结束,视频可能已损坏。",
"Refusing unsafe monitor name": "拒绝不安全的显示器名称",
"Reminder": "提醒",
"Restore using Super + Home on this workspace.": "在这个工作区用 Super + Home 恢复。",
"Saved and copied to clipboard.": "已保存并复制到剪贴板。",
"Screen recording error": "录屏出错",
"Screensaver disabled": "屏保已关闭",
"Screensaver enabled": "屏保已开启",
"Screensaver only runs in Alacritty, Foot, Ghostty, or Kitty": "屏保只能在 Alacritty、Foot、Ghostty 或 Kitty 中运行",
"Select a region containing a QR code": "框选包含二维码的区域",
"Shutdown failed": "关机失败",
"Shutting down": "正在关机",
"Start it with Super + Space": "用 Super + Space 启动",
"Suspend now available in system menu": "系统菜单中已加入挂起",
"Suspend removed from system menu": "系统菜单中已移除挂起",
"TUI removed": "TUI 已移除",
"The file chooser did not open": "文件选择器没有打开",
"Theme removed": "主题已移除",
"Time to recharge!": "该充电了!",
"Transcoding video…": "正在转码视频…",
"URL copied to clipboard": "链接已复制到剪贴板",
"Upcoming reminders": "即将到来的提醒",
"Use Super + Alt + Home to save one for this workspace.": "用 Super + Alt + Home 为这个工作区保存一个。",
"Voxtype Dictation Ready": "Voxtype 语音输入就绪",
"Web app removed": "网页应用已移除",
"Windows VM": "Windows 虚拟机",
"Battery is down to %1%": "电量降到 %1%",
"Could not send to %1": "无法发送给 %1",
"Couldn't add the %1 account": "无法添加 %1 账户",
"Mirroring enabled (%1)": "已开启镜像(%1)",
"New %1 sessions now use %2": "新的 %1 会话现在使用 %2",
"No saved width found for %1 on workspace %2": "工作区 %2 没有为 %1 保存的宽度",
"Saved width for %1 on workspace %2": "已为工作区 %2 的 %1 保存宽度",
"Sent to %1": "已发送给 %1",
"Timezone is now set to %1": "时区已设为 %1",
"Transcoded to %1 %2": "已转码为 %1 %2",
"Workspace layout set to %1": "工作区布局已设为 %1",
"Workspace layout set to %1 but could not be saved": "工作区布局已设为 %1,但未能保存",
"Workspace layout needs a Hyprland reload": "工作区布局需要重新加载 Hyprland",
"New workspaces use the %1 layout": "新工作区使用 %1 布局",
"Screen recording directory does not exist: %1": "录屏目录不存在:%1",
"Recording without %1 audio": "录屏不含%1音频",
"The %1 audio could not be added to this recording.": "无法把%1音频加入这段录屏。",
"desktop": "桌面",
"Corners follow the theme": "圆角跟随主题",
"Sharp corners for all themes": "所有主题使用直角",
"Rounded corners for all themes": "所有主题使用圆角",
"Opaque windows": "窗口不透明",
"Transparent windows": "窗口透明",
"Glassy windows": "窗口毛玻璃",
"USB accessory blocked": "已拦截 USB 配件",
"Click to review it. Keep it blocked unless you recognize the device.": "点击查看。除非认得这个设备,否则保持拦截。",
"Thunderbolt accessory blocked": "已拦截雷电接口配件",
"Thunderbolt approval needs retry": "雷电接口授权需要重试",
"The last approval could not be confirmed. Click to retry it.": "上次授权未能确认。点击重试。",
"Thunderbolt protection needs attention": "雷电接口保护需要处理",
"The approval or firmware policy could not be confirmed. Click for details.": "授权或固件策略未能确认。点击查看详情。",
"Finish Thunderbolt protection setup": "完成雷电接口保护设置",
"A connected accessory needs secure enrollment. Protection is not enabled. Click to finish safely.": "已连接的配件需要安全登记,保护尚未开启。点击完成设置。",
"Input Methods": "输入法",
"Keyboard Layouts": "键盘布局",
"Input methods could not be updated": "无法更新输入法",
"Keyboard layouts could not be updated": "无法更新键盘布局",
"Input method could not be added: %1": "无法添加输入法:%1",
"The selection menu could not open": "选择菜单无法打开",
"The current input group has no keyboard input": "当前输入组没有键盘输入",
"Fcitx did not retain the input selection": "Fcitx 没有保留输入法选择",
"Fcitx did not retain the keyboard selection": "Fcitx 没有保留键盘选择",
"Select at least one keyboard layout": "至少选择一个键盘布局",
"Your personal keyboard layout override takes precedence over this selection": "你自己的键盘布局设置优先于这个选择",
"The menu returned an invalid selection": "菜单返回了无效的选择",
"Install %1 to use %2": "安装 %1 后才能使用 %2",
"its engine": "对应的输入引擎",
"Apply": "应用",
"%1 selected": "已选 %1 项",
"microphone": "麦克风",
"%1 is now the default browser": "%1 现在是默认浏览器",
"%1 is now the default editor": "%1 现在是默认编辑器",
"%1 is now the default terminal": "%1 现在是默认终端",
"%1 installed": "%1 已安装",
"Screen recording saved": "录屏已保存",
"Open with Super + Alt + , (or click this)": "用 Super + Alt + , 打开(或点击这里)",
"Download complete": "下载完成",
"Restart Foot to apply the new terminal font size": "重启 Foot 以应用新的终端字号",
"You must restart Ghostty to see font change": "需要重启 Ghostty 才能看到字体变化",
"You must restart Foot to see font change": "需要重启 Foot 才能看到字体变化",
"Pending Omarchy Migrations": "有待运行的 Omarchy 迁移",
"Click to run 1 pending migration.": "点击运行 1 个待运行的迁移。",
"Editing Cloned Plugin": "正在编辑克隆的插件",
"Original plugin has been replace by clone.": "原插件已被克隆替换。",
"Click to diagnose with AI": "点击用 AI 诊断",
"Screen did not lock before suspend": "挂起前屏幕没有锁定",
"Taildrop transfer failed": "Taildrop 传输失败",
"Setup Fingerprint Reader": "设置指纹识别器",
"Enable sudo and unlocking with your fingerprint.": "用指纹进行 sudo 和解锁。",
"Set your default agent": "设置默认 AI 代理",
"Let your favorite agent help with Omarchy.": "让你喜欢的 AI 代理帮你使用 Omarchy。",
"All %1 accounts are over %2%": "所有 %1 账户都超过 %2%",
"Staying on %1. %2 resets in %3.": "继续使用 %1。%2 将在 %3 后重置。",
"Staying on %1.": "继续使用 %1。",
"%1 is at %2% of a %3 limit": "%1 已用到 %3 额度的 %2%",
"New %1 sessions now use %2 (%3%). Running sessions stay on %4.": "新的 %1 会话现在使用 %2(%3%)。正在运行的会话仍使用 %4。",
"%1 is at %2%. Click to switch new sessions to it.": "%1 已用到 %2%。点击把新会话切换到它。",
"Running sessions stay on %1.": "正在运行的会话仍使用 %1。",
"Click to run %1 pending migrations.": "点击运行 %1 个待运行的迁移。",
"Process crashed: %1": "进程崩溃:%1",
"You'll be reminded at %1": "将在 %1 提醒你",
"Reminder set for %1 minutes": "已设置 %1 分钟后的提醒",
"%1 in %2 minutes": "%2 分钟后:%1",
"Received %1": "已收到 %1",
"Saved to %1": "已保存到 %1",
"The session was left unlocked (%1).": "会话没有锁定(%1)。",
"%1 to %2 (%3)": "%1 转为 %2(%3)",
"Battery %1% · Holding at %2 · %3W / %4Wh": "电池 %1% · 保持在 %2 · %3W / %4Wh",
"Battery %1% · %2 to full ·  %3W / %4Wh": "电池 %1% · %2 后充满 ·  %3W / %4Wh",
"Battery %1% · %2 left ·  %3W / %4Wh": "电池 %1% · 剩余 %2 ·  %3W / %4Wh",
"Week %1": "第 %1 周",
"Installing the %1 CLI didn't finish.": "%1 命令行没有装完。",
"No %1 account named %2.": "没有名为 %2 的 %1 账户。",
"No %1 account named %2": "没有名为 %2 的 %1 账户",
"Couldn't set up a home for the new account.": "无法为新账户准备目录。",
"%1 is not a pending %2 login": "%1 不是待完成的 %2 登录",
"The login didn't finish, so no account was added.": "登录没有完成,没有添加账户。",
"That's %1 (%2). Try again, and sign in as the other account in the private window.": "这是 %1(%2)。请重试,并在隐私窗口中登录另一个账户。",
"already added": "已添加",
"Give the account a name": "给账户起个名字",
"%1 is the login in %2; it can't be removed here.": "%1 是 %2 中的登录,不能在这里移除。",
"A running %1 session uses %2. Quit it first, then remove the account.": "有一个正在运行的 %1 会话使用 %2。先退出它,再移除账户。",
"Switch mode is manual or auto": "切换模式为手动或自动",
"The threshold is a percentage between 50 and 100": "阈值是 50 到 100 之间的百分比",
"%1-min reminder in %2 (%3)": "%1 分钟提醒,还有 %2(%3)",
"%1-min reminder": "%1 分钟提醒",
"Your %1 minutes are up": "%1 分钟到了",
"No plugin to enable": "没有可启用的插件",
"No plugin to disable": "没有可停用的插件",
"No plugin to clone": "没有可克隆的插件",
"No plugin to remove": "没有可移除的插件",
// Clock
"Right-click to toggle format": "右键切换格式",
"Back to today": "回到今天",
"BORN": "出生",
"LIVE TO": "活到",
"LIFE": "人生",
"Start weeks on %1": "每周从%1开始",
"Previous month": "上个月",
"Next month": "下个月",
"year": "年份",
// Menu
"Go": "前往",
"Input": "输入",
"Select": "选择",
"Do you want to uninstall %1?": "要卸载 %1 吗?",
"Uninstall": "卸载",
"No matches for “%1”": "没有匹配“%1”的结果",
"Nothing here yet": "这里还没有内容",
// World clock, emojis, clipboard
"Search cities…": "搜索城市…",
"World": "世界",
"Clock": "时钟",
"Remove": "移除",
"World clock": "世界时钟",
"Delete entire clipboard history?": "删除全部剪贴板历史?",
"Delete": "删除",
"Clipboard is empty": "剪贴板是空的",
"Sunrise": "日出",
"Sunset": "日落",
"It's %1 here": "这里现在是 %1",
"Jump to a city": "跳到一个城市",
"Add a city": "添加城市",
"Loading zones…": "正在加载时区…",
"Tomorrow": "明天",
"Yesterday": "昨天",
" in %1": "(%1)",
"Loading cities…": "正在加载城市…",
"Search clipboard…": "搜索剪贴板…",
"Search emojis…": "搜索表情…",
"+%1 days": "%1 天后",
"%1 days": "%1 天",
// Media
"Pause": "暂停",
"Play": "播放",
"Next": "下一首",
"Previous": "上一首",
"Disable Passwordless Sudo": "关闭免密码 sudo",
"Passwordless Sudo": "免密码 sudo",
"Could not disable passwordless sudo": "无法关闭免密码 sudo",
"Check the sudo configuration and try again.": "请检查 sudo 配置后重试。",
"Log out now": "立即注销",
"Later": "稍后",
"Log out now to switch the language?": "立即注销以切换语言?",
"Log back in to switch the language.": "重新登录后切换语言。",
"Log out now to switch the developer mirrors?": "立即注销以切换开发工具镜像?",
"Log back in to switch the developer mirrors.": "重新登录后切换开发工具镜像。",
"Superwhisper Dictation Ready": "Superwhisper 语音输入就绪",
"Hold Right Alt or F9 to dictate (or toggle with Super + Ctrl + X).": "按住右 Alt 或 F9 说话(或用 Super + Ctrl + X 切换)。",
"Background Intros": "背景开场动画",
"Enabled": "已开启",
"Disabled": "已关闭"
}
+24
View File
@@ -0,0 +1,24 @@
.pragma library
.import "I18nZh.js" as Zh
// Shell text in the session's language; QML reaches this through the I18n singleton, plain JS imports it.
var chinese = Qt.locale().name.indexOf("zh_CN") === 0
function tr(text) {
var args = arguments
var template = chinese && Object.prototype.hasOwnProperty.call(Zh.table, text) ? Zh.table[text] : text
// One pass, so an argument that itself contains %2 stays as given.
return String(template).replace(/%(\d)/g, function(match, n) {
return n > 0 && n < args.length ? String(args[n]) : match
})
}
// Text a panel's own model builds in known formats: the first matching template is translated with what %1.. captured.
function trMatch(text, templates) {
for (var i = 0; i < templates.length; i++) {
var pattern = "^" + templates[i].replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/%\d/g, "(.+)") + "$"
var match = String(text).match(new RegExp(pattern))
if (match) return tr.apply(null, [templates[i]].concat(match.slice(1)))
}
return tr(text)
}
Loaded 100 of 170 files, more files were not shown because too many files have changed in this diff. Show more