Use fcitx wayland best practice

This commit is contained in:
Natsu Kagami 2024-05-28 22:02:11 +02:00
parent 381520a013
commit 666478ad36
Signed by: nki
GPG key ID: 55A032EB38B49ADB
2 changed files with 4 additions and 0 deletions

View file

@ -159,6 +159,8 @@ in
# Startup programs
{ command = "${cfg.browser}"; }
{ command = "thunderbird"; }
# IME
{ command = "fcitx5"; }
] ++ (if cfg.discord != null then [
{ command = "${cfg.discord}"; }
] ++ lib.lists.optional
@ -346,6 +348,7 @@ in
export SDL_VIDEODRIVER=wayland
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
export QT_IM_MODULE=fcitx
# export NIXOS_OZONE_WL=1 # Yeah this fucks up IMEs
'' + (if config.services.gnome-keyring.enable then ''

View file

@ -249,6 +249,7 @@ in
# Input methods (only fcitx5 works reliably on Wayland)
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.waylandFrontend = true;
fcitx5.addons = with pkgs; [
fcitx5-mozc
fcitx5-unikey