module(i18n): Config yuhao_star ime to work with rime-ice ime
This commit is contained in:
parent
20f1284263
commit
fc757e6613
8 changed files with 164 additions and 7 deletions
27
pkgs/rime-yuhaostar/default.nix
Normal file
27
pkgs/rime-yuhaostar/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
srcs,
|
||||
stdenv,
|
||||
unzip,
|
||||
}: let
|
||||
inherit (srcs.rime-yuhaostar) src version;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "rime-yuhaostar";
|
||||
version = version;
|
||||
inherit src;
|
||||
nativeBuildInputs = [unzip];
|
||||
|
||||
sourceRoot = "schema";
|
||||
|
||||
patches = [./punctuator.patch ./key_binder.patch];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/share/rime-data
|
||||
cp -rt $out/share/rime-data -- ./*
|
||||
rm $out/share/rime-data/default.custom.yaml
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
48
pkgs/rime-yuhaostar/key_binder.patch
Normal file
48
pkgs/rime-yuhaostar/key_binder.patch
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
diff --git a/yuhao_pinyin.schema.yaml b/yuhao_pinyin.schema.yaml
|
||||
index 7b5f1cb..d82945d 100644
|
||||
--- a/yuhao_pinyin.schema.yaml
|
||||
+++ b/yuhao_pinyin.schema.yaml
|
||||
@@ -75,6 +75,7 @@ punctuator:
|
||||
"|": "|"
|
||||
|
||||
key_binder:
|
||||
+ import_preset: default
|
||||
bindings:
|
||||
- { when: always, accept: "Control+period", toggle: ascii_punct }
|
||||
- { when: always, accept: "Control+Shift+period", toggle: ascii_punct }
|
||||
diff --git a/yustar.schema.yaml b/yustar.schema.yaml
|
||||
index 96aaded..5f1adaf 100644
|
||||
--- a/yustar.schema.yaml
|
||||
+++ b/yustar.schema.yaml
|
||||
@@ -307,6 +307,7 @@ punctuator:
|
||||
"|": "|"
|
||||
|
||||
key_binder:
|
||||
+ import_preset: default
|
||||
bindings:
|
||||
- { when: always, accept: "Control+period", toggle: ascii_punct }
|
||||
- { when: always, accept: "Control+Shift+period", toggle: ascii_punct }
|
||||
diff --git a/yustar_sc.schema.yaml b/yustar_sc.schema.yaml
|
||||
index c2019b6..5a255ea 100644
|
||||
--- a/yustar_sc.schema.yaml
|
||||
+++ b/yustar_sc.schema.yaml
|
||||
@@ -301,6 +301,7 @@ punctuator:
|
||||
"|": "|"
|
||||
|
||||
key_binder:
|
||||
+ import_preset: default
|
||||
bindings:
|
||||
- { when: always, accept: "Control+period", toggle: ascii_punct }
|
||||
- { when: always, accept: "Control+Shift+period", toggle: ascii_punct }
|
||||
diff --git a/yustar_tw.schema.yaml b/yustar_tw.schema.yaml
|
||||
index aa9bfdd..e08e66e 100644
|
||||
--- a/yustar_tw.schema.yaml
|
||||
+++ b/yustar_tw.schema.yaml
|
||||
@@ -298,6 +298,7 @@ punctuator:
|
||||
"|": "|"
|
||||
|
||||
key_binder:
|
||||
+ import_preset: default
|
||||
bindings:
|
||||
- { when: always, accept: "Control+period", toggle: ascii_punct }
|
||||
- { when: always, accept: "Control+Shift+period", toggle: ascii_punct }
|
||||
52
pkgs/rime-yuhaostar/punctuator.patch
Normal file
52
pkgs/rime-yuhaostar/punctuator.patch
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
diff --git a/yuhao_pinyin.schema.yaml b/yuhao_pinyin.schema.yaml
|
||||
index 7b5f1cb..f036a64 100644
|
||||
--- a/yuhao_pinyin.schema.yaml
|
||||
+++ b/yuhao_pinyin.schema.yaml
|
||||
@@ -60,7 +60,7 @@ translator:
|
||||
- xform/([jqxy])v/$1u/
|
||||
|
||||
punctuator:
|
||||
- import_preset: symbols
|
||||
+ import_preset: default
|
||||
half_shape:
|
||||
"`": "`"
|
||||
"#": "#"
|
||||
diff --git a/yustar.schema.yaml b/yustar.schema.yaml
|
||||
index 96aaded..2805afc 100644
|
||||
--- a/yustar.schema.yaml
|
||||
+++ b/yustar.schema.yaml
|
||||
@@ -292,7 +292,7 @@ yuhao_macro:
|
||||
expr: return require("yuhao.yuhao_core").unicode()
|
||||
|
||||
punctuator:
|
||||
- import_preset: symbols
|
||||
+ import_preset: default
|
||||
half_shape:
|
||||
"`": "`"
|
||||
"#": "#"
|
||||
diff --git a/yustar_sc.schema.yaml b/yustar_sc.schema.yaml
|
||||
index c2019b6..3a5a434 100644
|
||||
--- a/yustar_sc.schema.yaml
|
||||
+++ b/yustar_sc.schema.yaml
|
||||
@@ -286,7 +286,7 @@ yuhao_macro:
|
||||
expr: return require("yuhao.yuhao_core").unicode()
|
||||
|
||||
punctuator:
|
||||
- import_preset: symbols
|
||||
+ import_preset: default
|
||||
half_shape:
|
||||
"`": "`"
|
||||
"#": "#"
|
||||
diff --git a/yustar_tw.schema.yaml b/yustar_tw.schema.yaml
|
||||
index aa9bfdd..1530250 100644
|
||||
--- a/yustar_tw.schema.yaml
|
||||
+++ b/yustar_tw.schema.yaml
|
||||
@@ -283,7 +283,7 @@ yuhao_macro:
|
||||
expr: return require("yuhao.yuhao_core").unicode()
|
||||
|
||||
punctuator:
|
||||
- import_preset: symbols
|
||||
+ import_preset: default
|
||||
half_shape:
|
||||
"`": "`"
|
||||
"#": "#"
|
||||
Loading…
Add table
Add a link
Reference in a new issue