i18n.inputMethod.ibus: add waylandFrontend option

With this option GTK_IM_MODULE and QT_IM_MODULE env vars are not set.
This is recommended by some popular Linux distributions. For instance,
this will move IME candidate pane next to input field instead of on top
of it in Firefox on GNOME, so you can see what you type.
This commit is contained in:
Andrew Voynov
2025-02-24 09:09:12 +03:00
parent 4d8e519ff1
commit f88dbc2108
+12 -1
View File
@@ -56,6 +56,15 @@ in
example = lib.literalExpression ''"''${pkgs.kdePackages.plasma-desktop}/libexec/kimpanel-ibus-panel"'';
description = "Replace the IBus panel with another panel.";
};
waylandFrontend = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Use the Wayland input method frontend.
This doesn't set `GTK_IM_MODULE` and `QT_IM_MODULE` environment variables.
See [Using Fcitx 5 on Wayland](https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland#GTK_IM_MODULE).
'';
};
};
};
@@ -76,9 +85,11 @@ in
];
environment.variables = {
XMODIFIERS = "@im=ibus";
}
// lib.optionalAttrs (!cfg.waylandFrontend) {
GTK_IM_MODULE = "ibus";
QT_IM_MODULE = "ibus";
XMODIFIERS = "@im=ibus";
};
xdg.portal.extraPortals = lib.mkIf config.xdg.portal.enable [