diff --git a/home/applications/fcitx5/default.nix b/home/applications/fcitx5/default.nix index 2c90744..c44e609 100644 --- a/home/applications/fcitx5/default.nix +++ b/home/applications/fcitx5/default.nix @@ -1,13 +1,27 @@ -{pkgs, ...}: { - i18n.inputMethod = { - enabled = "fcitx5"; - fcitx5.addons = with pkgs; [ +{ + lib, + pkgs, + ... +}: let + package = pkgs.qt6Packages.fcitx5-with-addons.override { + addons = with pkgs; [ qt6Packages.fcitx5-chinese-addons fcitx5-pinyin-minecraft fcitx5-pinyin-moegirl fcitx5-pinyin-zhwiki ]; }; +in { + home.packages = [ + package + ]; + + systemd.user.services.fcitx5-daemon = { + Unit.Description = "Fcitx5 input method editor"; + Unit.PartOf = ["graphical-session.target"]; + Service.ExecStart = lib.getExe' package "fcitx5"; + Install.WantedBy = ["graphical-session.target"]; + }; xdg.configFile."fcitx5/conf/classicui.conf".text = '' Vertical Candidate List=True diff --git a/home/applications/sway/default.nix b/home/applications/sway/default.nix index da3360d..a7f5194 100644 --- a/home/applications/sway/default.nix +++ b/home/applications/sway/default.nix @@ -11,9 +11,6 @@ ../mako ../swayidle ../swaylock - - # FIXME: hack - ./unset-im-module.nix ]; home.sessionVariables = { diff --git a/home/applications/sway/unset-im-module.nix b/home/applications/sway/unset-im-module.nix deleted file mode 100644 index 34cc0aa..0000000 --- a/home/applications/sway/unset-im-module.nix +++ /dev/null @@ -1,5 +0,0 @@ -{lib, ...}: { - options.home.sessionVariables = lib.mkOption { - apply = x: removeAttrs x ["QT_IM_MODULE" "GTK_IM_MODULE"]; - }; -} diff --git a/overlays/default.nix b/overlays/default.nix index ab8459a..a4ff93a 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -23,10 +23,15 @@ in { # HACK: no more qt5 libsForQt5 = prev.libsForQt5.overrideScope (_qt5final: _qt5prev: { - fcitx5-with-addons = prev.qt6Packages.fcitx5-with-addons; fcitx5-qt = prev.emptyDirectory; }); + # HACK: no more gtk2 + gtk2 = prev.emptyDirectory; + gnome-themes-extra = prev.gnome-themes-extra.overrideAttrs { + configureFlags = ["--disable-gtk2-engine"]; + }; + sway-unwrapped = addPatches prev.sway-unwrapped [ # text_input: Implement input-method popups # https://github.com/swaywm/sway/pull/7226 @@ -35,7 +40,7 @@ in { url = "https://github.com/swaywm/sway/commit/de74d1f6360810c0a5fd11d8022fbffe56fc97c5.patch"; hash = "sha256-iTZIYHBp8vxjVdmH/k+jlN0/Zj6Ofe/qefv7ubtowHs="; }) - (prev.fetchpatch2 { + (prev.fetchpatch2 { name = "0002-chore-fractal-scale-handle.patch"; url = "https://github.com/swaywm/sway/commit/2aa72e8dfd3b3d051fdec6b2d05c5635adcfb57b.patch"; hash = "sha256-aJYXoZ7xEEy8J8DjxANOe14HdHRni6IXSNcAzLzNvIo=";