mirror of
https://github.com/nix-community/home-manager
synced 2024-11-13 00:17:10 +00:00
fcitx5: add waylandFrontend option to not set env vars
This commit is contained in:
parent
e3ad5108f5
commit
befd927ddc
2 changed files with 15 additions and 2 deletions
|
@ -18,6 +18,15 @@ in {
|
||||||
Enabled Fcitx5 addons.
|
Enabled Fcitx5 addons.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
waylandFrontend = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Use the Wayland input method frontend.
|
||||||
|
See [Using Fcitx 5 on Wayland](https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland).
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -26,11 +35,12 @@ in {
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
GLFW_IM_MODULE = "ibus"; # IME support in kitty
|
GLFW_IM_MODULE = "ibus"; # IME support in kitty
|
||||||
GTK_IM_MODULE = "fcitx";
|
|
||||||
QT_IM_MODULE = "fcitx";
|
|
||||||
XMODIFIERS = "@im=fcitx";
|
XMODIFIERS = "@im=fcitx";
|
||||||
QT_PLUGIN_PATH =
|
QT_PLUGIN_PATH =
|
||||||
"$QT_PLUGIN_PATH\${QT_PLUGIN_PATH:+:}${fcitx5Package}/${pkgs.qt6.qtbase.qtPluginPrefix}";
|
"$QT_PLUGIN_PATH\${QT_PLUGIN_PATH:+:}${fcitx5Package}/${pkgs.qt6.qtbase.qtPluginPrefix}";
|
||||||
|
} // lib.optionalAttrs (!cfg.waylandFrontend) {
|
||||||
|
GTK_IM_MODULE = "fcitx";
|
||||||
|
QT_IM_MODULE = "fcitx";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services.fcitx5-daemon = {
|
systemd.user.services.fcitx5-daemon = {
|
||||||
|
|
|
@ -6,9 +6,12 @@
|
||||||
i18n.inputMethod = {
|
i18n.inputMethod = {
|
||||||
enabled = "fcitx5";
|
enabled = "fcitx5";
|
||||||
fcitx5.addons = with pkgs; [ fcitx5-chinese-addons ];
|
fcitx5.addons = with pkgs; [ fcitx5-chinese-addons ];
|
||||||
|
fcitx5.waylandFrontend = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nmt.script = ''
|
nmt.script = ''
|
||||||
assertFileExists home-files/.config/systemd/user/fcitx5-daemon.service
|
assertFileExists home-files/.config/systemd/user/fcitx5-daemon.service
|
||||||
|
assertFileNotRegex home-path/etc/profile.d/hm-session-vars.sh 'GTK_IM_MODULE'
|
||||||
|
assertFileNotRegex home-path/etc/profile.d/hm-session-vars.sh 'QT_IM_MODULE'
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue