Introducing a new way to review your PRs.

Read the announcement

omacom / omarchy

Beautiful, Modern & Opinionated Linux

View on GitHub

29 documents · Updated Nov 23, 2026

docs / input-methods-and-language-support

Input methods and language support

Omarchy makes multilingual text entry a desktop-wide service. A language choice sets the session locale, while keyboard layouts and Fcitx5 input methods control how users enter text. Together they provide language-aware text entry, CJK font fallback, desktop switching, and a supervised input service for Wayland applications. The command surface belongs to the CLI command platform, while its menu and session behavior connects to launchers, menus, and application lifecycle.

Language selection

The language registry maps a user-facing language choice to its native name, English name, locale, number format, and text direction where needed. default/…/locales.json is the shared source for the supported language list and locale values.

omarchy-language reads and writes the selected language for the user. When a language changes, it generates the matching system locale if needed, saves the choice only after locale setup succeeds, and writes the session LANG value for the next login. In a live Hyprland session, it also updates the environment used by new applications and refreshes the shell that starts them. Existing applications keep the locale from which they started. During installation, its seed mode writes the initial language and session environment without replacing a language that the user already chose.

Locale generation can use the installed helper without a password when the system grants that operation. A terminal can accept a normal sudo prompt, while a menu action without a terminal uses a graphical authorization prompt. This keeps locale creation available from both the command line and the desktop setup flow.

The language choice is separate from the desktop keyboard and input-method choices. Japanese, Korean, Simplified Chinese, and Traditional Chinese also seed a matching composition method when the current Fcitx group has no composition engine. This gives a new CJK language a useful starting point without replacing an existing multilingual setup.

flowchart LR
    A[Language choice] --> B[Locale registry]
    B --> C[Generate locale]
    C --> D[Session LANG]
    A --> E[CJK typing seed]
    E --> F[Fcitx input group]
    D --> G[New applications]

References: bin/omarchy-language• L3-10 bin/omarchy-language• L19-55 bin/omarchy-language• L57-101 bin/omarchy-language• L104-157 bin/omarchy-language• L159-191 default/…/locales.json• L1-25 default/…/typing_setup.py• L151-162

Input-method presets

Input-method presets describe the supported composition engines as user choices. A preset connects a readable label with its required package and, where relevant, a CJK font form or a keyboard position rule. default/…/presets.json defines the standard choices for keyboard-only entry, Japanese, Korean, Simplified Chinese, Taiwan, and Hong Kong.

The setup flow preserves the keyboard entry in an Fcitx group and adds selected composition engines after it. It keeps the selected order for switching and does not remove an engine package when a user removes it from the active list. If an engine is installed but Fcitx has not loaded it, the service restarts and the setup waits for the engine to become available.

Preset familyMain text-entry useSpecial desktop concern
JapaneseJapanese composition through MozcUses Japanese CJK forms
KoreanHangul compositionKeeps Korean input keys and US positions where needed
Simplified ChinesePinyin compositionUses Simplified Chinese CJK forms
TaiwanZhuyin compositionKeeps positional keys on non-US layouts
Hong KongCangjie compositionKeeps positional keys on non-US layouts

References: default/…/presets.json• L1-8 default/…/typing_setup.py• L70-87 default/…/typing_setup.py• L110-141

Keyboard and input setup

Keyboard layouts and input methods are two linked but separate selections. The keyboard selector controls the compositor layouts. The input-method selector controls the non-keyboard entries in the active Fcitx group. Both use the current state as the starting point and apply changes at once.

The leading keyboard layout establishes the group layout used by Fcitx. Non-Latin layouts retain a Latin-leading layout for desktop shortcuts. Positional engines such as Hangul, Zhuyin, and Cangjie can keep US key positions when the user selects another Latin layout. Korean and Japanese layouts retain their own special keys.

Keyboard changes are saved as user data and then checked against the running compositor and Fcitx group. If validation fails, the saved choice and the live input group return to their previous state. This keeps compositor bindings and text entry aligned.

sequenceDiagram
    participant User
    participant Menu as Setup menu
    participant Hyprland
    participant Fcitx as Fcitx group
    User->>Menu: Select layouts or input methods
    Menu->>Hyprland: Apply keyboard layouts
    Menu->>Fcitx: Update keyboard and engines
    Fcitx-->>Menu: Confirm saved group
    Menu-->>User: Keep the new selection or restore the old one

References: default/…/typing_setup.py• L39-68 default/…/typing_setup.py• L79-101 default/…/typing_setup.py• L164-220 default/…/input-method.lua• L17-29

Fcitx5 service integration

Fcitx5 is the shared input service that turns selected engines and compose rules into text for desktop applications. Its environment settings point toolkit input interfaces at Fcitx, so Qt, SDL, X11-compatible, and Wayland applications can use the same service.

Omarchy runs one supervised Fcitx5 instance per graphical user session. The user service starts only when the Wayland session environment is present, follows the graphical session lifetime, and restarts when the service exits. D-Bus activation points the org.fcitx.Fcitx5 name to this service instead of starting an unsupervised second instance. The desktop autostart entry is hidden to prevent a competing launch path.

flowchart TD
    A[Graphical session] --> B[User service]
    B --> C[Fcitx5]
    D[D-Bus activation] --> B
    E[Desktop applications] --> F[Toolkit input variables]
    F --> C
    C --> G[Selected keyboard and composition methods]

References: default/…/omarchy-fcitx5.service• L1-34 default/…/org.fcitx.Fcitx5.service• L1-5 default/…/10-omarchy-fcitx.conf• L1-4 config/…/org.fcitx.Fcitx5.desktop• L1-2

Input switching

The desktop input switcher presents the current Fcitx method and keyboard layout as one cycle. Super+I moves forward and Super+Shift+I moves back. With several compositor layouts, the cycle visits those layouts before it visits the configured composition engines, so the shortcut remains useful even when Fcitx is not running.

The bar reads Fcitx state through a long-running reader. It follows the Fcitx D-Bus name and its saved profile because Fcitx does not provide a reliable signal for every method switch or group edit. The reader polls only when more than one choice can change, and it waits for the first application input context before applying a pending choice.

Ctrl+Space has a separate role in terminals: it returns Fcitx to direct input before the next key reaches the terminal multiplexer. Omarchy removes that key from Fcitx's toggle defaults while preserving other user-defined trigger keys.

References: default/…/indicator.py• L46-77 default/…/indicator.py• L80-137 default/…/indicator.py• L197-315 default/…/input-method.lua• L17-29 default/…/configure.py• L75-87

Language-aware font fallback

Language support also includes the glyph forms used for CJK text. The system font rules select Japanese, Korean, Simplified Chinese, Traditional Chinese, or Hong Kong forms from language tags. A user-selected CJK preference can provide the fallback for untagged text without replacing the chosen Latin interface and terminal fonts.

Input-method presets and language changes seed a CJK preference only when the user has not already chosen one. The preference is separate from the locale and from the active input method, so changing the interface language does not silently change an established typing or font setup.

References: default/…/50-omarchy.conf• L11-35 default/…/50-omarchy.conf• L130-238 default/…/configure.py• L215-241 bin/omarchy-language• L120-132

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep each language registry code mapped to a valid generated locale and to the session language behavior.
  • Keep locale-generation authorization aligned with the installed helper and with both terminal and menu language changes.
  • Keep the install-time language seed from overwriting an existing user choice.
  • Keep each input preset aligned with its package, Fcitx name, CJK font form, and any positional keyboard rule.
  • Keep the Fcitx D-Bus service name, systemd unit, and environment input variables consistent so activation cannot start a second daemon.
  • Keep keyboard-layout changes synchronized across the saved user choice, compositor state, and Fcitx group layout.
  • Keep the input cycle and bar reader aware of changes to Fcitx switching behavior or profile location.

Important failure modes

TriggerConsequenceGuard
A requested locale is not generatedThe language switch stops before it saves the choiceGenerate only registry-backed locale values and persist after success
Locale generation has no usable authorization pathA language change from the command line or menu cannot finishUse the installed helper with passwordless authorization when available and provide terminal or graphical fallback
An input engine package is absentThe engine cannot be added to the active groupCheck preset packages before changing Fcitx
Fcitx starts outside the graphical sessionApplications have no usable Wayland input serviceRequire the session environment and bind the unit to the graphical target
A keyboard choice fails compositor or Fcitx validationShortcuts and text entry can disagreeRestore the prior saved layout and live group
Fcitx is not running during a switchComposition changes cannot applyContinue cycling compositor layouts and report service absence for Fcitx methods

Key files

FileWhy to read it
bin/omarchy-languageLanguage selection, locale setup, session LANG, authorization paths, installation seeding, and CJK typing seeding
default/…/locales.jsonSupported language and locale registry
bin/omarchy-input-methodCommand boundary for status, setup, and input cycling
default/…/presets.jsonSupported input-method choices and package relationships
default/…/typing_setup.pyUser-facing keyboard and input-method selection flow
default/…/configure.pyShared Fcitx defaults, profile alignment, and font preference rules
default/systemd/user/omarchy-fcitx5.serviceFcitx session lifetime and supervision contract
default/…/indicator.pyLive input state, cycling, and bar integration
default/hypr/bindings/input-method.luaDesktop shortcuts and terminal direct-input behavior
default/fontconfig/conf.avail/50-omarchy.confLanguage-aware glyph fallback and Latin font preservation