Here’s the snippet that I use:
i18n = {
inputMethod = {
enable = true;
type = "fcitx5";
fcitx5 = {
ignoreUserConfig = true;
waylandFrontend = true;
addons = with pkgs; [
fcitx5-mozc
];
settings.inputMethod = {
"Groups/0" = {
Name = "Default";
"Default Layout" = "us";
DefaultIM = "mozc";
};
"Groups/0/Items/0" = {
Name = "keyboard-us";
Layout = "";
};
"Groups/0/Items/1" = {
Name = "mozc";
Layout = "";
};
"GroupOrder" = {
"0" = "Default";
};
};
settings = {
globalOptions = {
Behavior = {
ActiveByDefault = true;
};
};
};
sessionVariables = {
GLFW_IM_MODULE = "ibus";
SDL_IM_MODULE = "fcitx";
XMODIFIERS="@im=fcitx";
QT_IM_MODULE="fcitx";
GTK_IM_MODULE="fcitx";
};
};
};
};
Also, if it matters, I have this chunk added to the wayland.windowManager.sway.extraConfig:
input type:keyboard {
xkb_layout us,ru
xkb_options grp:alt_shift_toggle
}
From what I understand, my problem is quite similar to this one
The problem is that my declared Fcitx5 settings are being ignored.
What I get are the default settings.
And even if I set them manually via fcitx-configtool, they still get reset each time that I turn off the computer.
P.S. Would like to add that I’ve been using the aforementioned code for at least half a year, and it only worked from time to time, which has been driving me crazy.
And what I mean by “time to time” is that sometimes it worked on launch and sometimes not, but recently it completely stopped working.
Help is greatly appreciated.
Please, I beg of you, help me :-)