Repository navigation
[feat] Korean input: fcitx5-hangul in its own group, ko_KR for Korean Macs - #320
Merged
Merged
Conversation
Install fcitx5-hangul and seed a second fcitx5 group, Korean (US + Hangul), so the Default group (US + Chewing) stays unchanged. Generate ko_KR.UTF-8, prefer Noto CJK KR glyphs for Korean text, and map a Mac whose primary language is Korean to ko_KR.UTF-8. On ko_KR initialization, try-omarchy-locale moves the Korean group first in /etc/skel's fcitx5 profile, only while GroupOrder is still the factory order, so the owner account starts with Ctrl+Space toggling US and Hangul. A symlinked or non-regular profile is refused before either file is written. The factory advertises tryomarchy.locale_support=3. Disks that only advertise =2 have no Korean locale or group, so the launcher sends them en_US.UTF-8 for a Korean Mac, as today. The package lock adds only fcitx5-hangul, libhangul and the new requestedFileSha256; a full refresh currently pulls hyprland -4, which the patched Hyprland build does not accept (omacom#280, omacom#285). Refs omacom#293 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019giKJAi15aAheoMjWCsizr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #293.
What changed and why
Korean users can read Korean in the guest since #188, but they cannot type it:
the factory image has no Hangul engine. This adds
fcitx5-hanguland theKorean counterparts of the zh-TW pieces from #188 —
ko_KR.UTF-8, a KR glyphpreference, and Mac-language detection. Every new image gets the package, locale, font rules
and the extra group; a Mac that is not set to Korean keeps today's locale
mapping and starts in the
Defaultgroup as before.#293 offered two scopes. This is the fuller one, adapted to
main: thestart-menu Language row it mentioned no longer exists, so Korean follows the
Mac's primary language the same way Traditional and Simplified Chinese already
do.
What changes
fcitx5-hangul(pullslibhangul)ko_KR.UTF-8alongside the existing three inconfigure-rootfs.sh; allow it intry-omarchy-localeandrun-qemu-gpu.sh30-try-omarchy.confprefersNoto Sans/Serif/Mono CJK KRforko; the TC rules are untouchedKorean(keyboard-us,hangul). TheDefaultgroup (US + Chewing) is unchangedkomaps toko_KR.UTF-8(LanguagePreferences.swift)ko_KR.UTF-8,try-omarchy-localemovesKoreanfirst in/etc/skel/.config/fcitx5/profile, so the owner account starts in the Korean group andCtrl + Spacetoggles US ↔ HangulWhy a separate group
A tap of
Ctrl + Spacetoggles between the group's first item and the lastused input method; reaching a third item means holding Ctrl and cycling with
Space. With Hangul as a third item in
Default(US, Chewing, Hangul), Chineseand Korean users would share that cycle. A separate group leaves
Default'sitems unchanged and gives Korean users a predictable US ↔ Hangul toggle.
fcitx5-remote -g Korean/-g Defaultswitches groups byhand, and fcitx5 saves the choice.
The reorder only runs when the profile's
GroupOrderis still exactly thefactory's
0=Default/1=Korean, and each file is replaced atomically. Aprofile that is a symlink or any other non-regular file is refused before
either file is written, and the pending marker stays, so the next boot
retries. The unit already runs
Before=omarchy-provision-owner.service, which is what copies/etc/skel.Compatibility
The new image advertises
tryomarchy.locale_support=3. A disk with=2has noko_KRlocale and no Korean group, so for a Korean Mac the launcher sendstryomarchy.locale=en_US.UTF-8to such a disk instead, which is today'sbehavior.
=1and older disks are handled as before. Existing VMs keep theirpackages and profile; README says these defaults apply to new or reset guests.
Deliberately excluded
Ctrl + Spaceconflict. macOS uses it for "Select the previousinput source", so the key can be taken before it reaches the guest. Changing
the trigger (e.g. to Caps Lock) touches Omarchy's
compose:caps; I kept thedefaults and put the options in a comment on Korean input: ship fcitx5-hangul (and optionally a Korean language option) #293 instead.
says the setup wizard and menus stay in English.
Package lock
This is the part I could not do the way #188 did. The lock here is the
committed lock plus three hand-merged entries —
fcitx5-hangul 5.1.11-1,libhangul 0.2.0-1and the newrequestedFileSha256— not a fresh resolve.A real
--refresh-package-lockagainst current ALARM moves 30 existing pins,including
hyprland 0.56.2-3 → -4.spec.jsonandregister-patched-hyprland.shexpect-3, somake gueststops atregister-patched-hyprland: unexpected upstream Hyprland package version.After adjusting those to
-4in a scratch tree, it then fails withtarget not found: cmake=4.4.3-2andmeson=1.12.1-1, the pinned builddependencies of the patched Hyprland.
mainitself does not build todayeither (#280), and #285 looks like the real fix, so I kept this PR's lock
change minimal rather than folding a Hyprland bump into it. Happy to rerun the
refresh once #280/#285 settle.
Testing
Tests —
make testpasses on this branch: 425 Swift tests, the guestsuite (373 Python tests, 1 skipped) and the native guest contract.
test_locale.pyhas 16 cases, including Korean GroupOrder reordering only fromthe factory order, customized orders left alone, symlinked or non-regular
profiles refused with
locale.confuntouched and the pending marker kept, a missing profile not recreated,and idempotency.
verify.pychecks the expected Korean group and item lines, noItems/2in either group, the factoryGroupOrderat the end, and the KR fontrules.
run-qemu-ssh-contract.test.shcovers the Korean hint against no capability,=2(falls back toen_US.UTF-8) and=3(passed through).Fonts — on a running guest, with this branch's
30-try-omarchy.confswapped into a copy of
/etc/fonts,fc-matchresolveslang=kotoNoto Sans CJK KR/Noto Serif CJK KR/Noto Sans Mono CJK KRforsans-serif / serif / monospace (today: Liberation Sans / Liberation Serif /
JetBrainsMono Nerd Font).
en,zh-cnandzh-twresolve exactly as they dotoday.
Image — not built, for the reason above.
Input, on a running guest — on an existing guest with
fcitx5 5.1.23-1andfcitx5-hangul 5.1.11-1installed, in an isolated/tmphome:try-omarchy-localewithtryomarchy.locale=ko_KR.UTF-8against this branch's profile fragment:rc 0,
LANG=ko_KR.UTF-8,GroupOrderbecame0=Korean/1=Default,marker consumed.
Korean, input methodkeyboard-us.use):
gksrmfpassed through as plain US input;Ctrl + Spaceswitched tohangul, andgksrmfcommitted한글;Ctrl + Spaceagain returned tokeyboard-us.I could not run a second Hyprland session for this, so the Wayland
input-method path inside Hyprland is not covered by the above; it is the same
fcitx5 instance and engine that Chewing already uses there.
Drafted with help from Claude (an Anthropic AI model).
🤖 Generated with Claude Code