fcitx5: add waylandFrontend option to not set env vars
This commit is contained in:
parent
e3ad5108f5
commit
befd927ddc
|
@ -18,6 +18,15 @@ in {
|
|||
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 = {
|
||||
GLFW_IM_MODULE = "ibus"; # IME support in kitty
|
||||
GTK_IM_MODULE = "fcitx";
|
||||
QT_IM_MODULE = "fcitx";
|
||||
XMODIFIERS = "@im=fcitx";
|
||||
QT_PLUGIN_PATH =
|
||||
"$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 = {
|
||||
|
|
|
@ -6,9 +6,12 @@
|
|||
i18n.inputMethod = {
|
||||
enabled = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [ fcitx5-chinese-addons ];
|
||||
fcitx5.waylandFrontend = true;
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
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