input methods: add kime
This commit is contained in:
parent
7ba68694a0
commit
767cc9fa4d
@ -29,7 +29,7 @@ in
|
|||||||
options.i18n = {
|
options.i18n = {
|
||||||
inputMethod = {
|
inputMethod = {
|
||||||
enabled = mkOption {
|
enabled = mkOption {
|
||||||
type = types.nullOr (types.enum [ "ibus" "fcitx" "fcitx5" "nabi" "uim" "hime" ]);
|
type = types.nullOr (types.enum [ "ibus" "fcitx" "fcitx5" "nabi" "uim" "hime" "kime" ]);
|
||||||
default = null;
|
default = null;
|
||||||
example = "fcitx";
|
example = "fcitx";
|
||||||
description = ''
|
description = ''
|
||||||
@ -46,6 +46,7 @@ in
|
|||||||
<listitem><para>nabi: A Korean input method based on XIM. Nabi doesn't support Qt 5.</para></listitem>
|
<listitem><para>nabi: A Korean input method based on XIM. Nabi doesn't support Qt 5.</para></listitem>
|
||||||
<listitem><para>uim: The universal input method, is a library with a XIM bridge. uim mainly support Chinese, Japanese and Korean.</para></listitem>
|
<listitem><para>uim: The universal input method, is a library with a XIM bridge. uim mainly support Chinese, Japanese and Korean.</para></listitem>
|
||||||
<listitem><para>hime: An extremely easy-to-use input method framework.</para></listitem>
|
<listitem><para>hime: An extremely easy-to-use input method framework.</para></listitem>
|
||||||
|
<listitem><para>kime: Koream IME.</para></listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -40,6 +40,11 @@
|
|||||||
Hime: An extremely easy-to-use input method framework.
|
Hime: An extremely easy-to-use input method framework.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Kime: Korean IME
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
<section xml:id="module-services-input-methods-ibus">
|
<section xml:id="module-services-input-methods-ibus">
|
||||||
<title>IBus</title>
|
<title>IBus</title>
|
||||||
@ -264,6 +269,23 @@ i18n.inputMethod = {
|
|||||||
i18n.inputMethod = {
|
i18n.inputMethod = {
|
||||||
<link linkend="opt-i18n.inputMethod.enabled">enabled</link> = "hime";
|
<link linkend="opt-i18n.inputMethod.enabled">enabled</link> = "hime";
|
||||||
};
|
};
|
||||||
|
</programlisting>
|
||||||
|
</section>
|
||||||
|
<section xml:id="module-services-input-methods-kime">
|
||||||
|
<title>Kime</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Kime is Korean IME. it's built with Rust language and let you get simple, safe, fast Korean typing
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The following snippet can be used to configure Kime:
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
i18n.inputMethod = {
|
||||||
|
<link linkend="opt-i18n.inputMethod.enabled">enabled</link> = "kime";
|
||||||
|
};
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</section>
|
</section>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
49
nixos/modules/i18n/input-method/kime.nix
Normal file
49
nixos/modules/i18n/input-method/kime.nix
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{ config, pkgs, lib, generators, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.i18n.inputMethod.kime;
|
||||||
|
yamlFormat = pkgs.formats.yaml { };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
i18n.inputMethod.kime = {
|
||||||
|
config = mkOption {
|
||||||
|
type = yamlFormat.type;
|
||||||
|
default = { };
|
||||||
|
example = literalExample ''
|
||||||
|
{
|
||||||
|
daemon = {
|
||||||
|
modules = ["Xim" "Indicator"];
|
||||||
|
};
|
||||||
|
|
||||||
|
indicator = {
|
||||||
|
icon_color = "White";
|
||||||
|
};
|
||||||
|
|
||||||
|
engine = {
|
||||||
|
hangul = {
|
||||||
|
layout = "dubeolsik";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
kime configuration. Refer to <link xlink:href="https://github.com/Riey/kime/blob/v${pkgs.kime.version}/docs/CONFIGURATION.md"/> for details on supported values.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf (config.i18n.inputMethod.enabled == "kime") {
|
||||||
|
i18n.inputMethod.package = pkgs.kime;
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
GTK_IM_MODULE = "kime";
|
||||||
|
QT_IM_MODULE = "kime";
|
||||||
|
XMODIFIERS = "@im=kime";
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc."xdg/kime/config.yaml".text = replaceStrings [ "\\\\" ] [ "\\" ] (builtins.toJSON cfg.config);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -92,6 +92,7 @@
|
|||||||
./i18n/input-method/ibus.nix
|
./i18n/input-method/ibus.nix
|
||||||
./i18n/input-method/nabi.nix
|
./i18n/input-method/nabi.nix
|
||||||
./i18n/input-method/uim.nix
|
./i18n/input-method/uim.nix
|
||||||
|
./i18n/input-method/kime.nix
|
||||||
./installer/tools/tools.nix
|
./installer/tools/tools.nix
|
||||||
./misc/assertions.nix
|
./misc/assertions.nix
|
||||||
./misc/crashdump.nix
|
./misc/crashdump.nix
|
||||||
|
Loading…
x
Reference in New Issue
Block a user