Make a keyboard layout switch reach apps when fcitx5 keeps typing US
Issue #9552 (open) supports the symptom, the cause and option B, and a 2026-10-04 comment on 4.0.4-1 with us,es/cat confirms option A with keyboard-es-cat and ShareInputState=All. Confirmed on this workstation: /usr/lib/environment.d/10-omarchy-fcitx.conf is owned by omarchy-settings 4.0.4-1 and sets INPUT_METHOD, QT_IM_MODULE, XMODIFIERS and SDL_IM_MODULE as the cause says, omarchy-fcitx5.service has WantedBy=graphical-session.target and is enabled by a symlink in ~/.config/systemd/user, so systemctl --user disable --now works, and only first-run and migration 1785167800 enable it (a migration runs once, so an update does not re-enable it). ~/.config/fcitx5/profile holds only keyboard-us. fcitx5-remote and fcitx5-configtool both ship in fcitx5 5.1.22-1. Issue #8060 comments confirm stop, edit, start because restart reverts the profile. One defect: option B ends with "Log out and back in so the session environment is rebuilt". Disabling the unit changes nothing in the environment, since 10-omarchy-fcitx.conf still exports QT_IM_MODULE=fcitx, and the #9552 reporter saw switching work in all apps immediately. The corrected fix replaces that line. The upstream fix, PR #9565, is open. Not exercised: editing the profile or stopping fcitx5.
Symptom
On Omarchy 4 with two layouts configured (for example kb_layout = "us,ir" or "us,es"), Alt+Shift or a click on the bar's keyboard-layout widget changes the label (EN to FA), and hyprctl devices -j shows the physical keyboard's active_keymap switched, but GTK, Qt and Chromium apps keep typing the old layout.
Cause
Omarchy runs fcitx5 in every session through omarchy-fcitx5.service, for XCompose sequences, and /usr/lib/environment.d/10-omarchy-fcitx.conf sets INPUT_METHOD=fcitx, QT_IM_MODULE=fcitx, XMODIFIERS=@im=fcitx and SDL_IM_MODULE=fcitx. Apps on that path get their keys processed by fcitx5 against its own virtual keyboard. The shipped ~/.config/fcitx5/profile contains only keyboard-us (DefaultIM=keyboard-us), and fcitx5 does not follow Hyprland's XKB group, so compositor-side switches never change what fcitx5 commits.
Fix
Pick one.
**A. Keep fcitx5 and give it your layouts.** fcitx5 writes its in-memory profile back on exit, so stop it first, edit, then start it. restart silently reverts your edit.
systemctl --user stop omarchy-fcitx5.service
# ~/.config/fcitx5/profile
[Groups/0]
Name=Default
Default Layout=us
DefaultIM=keyboard-us
[Groups/0/Items/0]
Name=keyboard-us
[Groups/0/Items/1]
Name=keyboard-es-cat
[GroupOrder]
0=Default
The item name is keyboard-<layout> or keyboard-<layout>-<variant>. fcitx5-configtool lists the exact names. Share the active layout across windows:
# ~/.config/fcitx5/config
[Behavior]
ShareInputState=All
systemctl --user start omarchy-fcitx5.service
fcitx5-remote -n
Switch with fcitx5's own hotkey (Ctrl+Space by default). The bar widget still switches only the compositor layout.
**B. You type no CJK and do not need fcitx5.** Disable it and Hyprland's XKB switching reaches every app. You lose Compose-key sequences that fcitx5 was providing:
systemctl --user disable --now omarchy-fcitx5.service
Restart any app that was already open. The session still exports QT_IM_MODULE=fcitx from /usr/lib/environment.d/10-omarchy-fcitx.conf, and with fcitx5 stopped apps fall back to the compositor keymap, so no logout is needed for the switch to take effect. To undo: systemctl --user enable --now omarchy-fcitx5.service.
Verify
Switch layout, open a GTK or Chromium text field and type a key that differs between layouts. fcitx5-remote -n reports the second keyboard-* item after switching (option A).