diff --git a/home/modules/i18n/default.custom.yaml b/home/modules/i18n/default.custom.yaml index d09e481..ef8d2af 100644 --- a/home/modules/i18n/default.custom.yaml +++ b/home/modules/i18n/default.custom.yaml @@ -2,6 +2,7 @@ patch: "__include": rime_ice_suggestion:/ "schema_list": - schema: double_pinyin_flypy + - schema: yustar_sc "menu/page_size": 7 "switcher/caption": 「方案选单」 "switcher/hotkeys": @@ -12,7 +13,7 @@ patch: - emoji - full_shape - search_single_char - "switcher/fold_options": false + "switcher/fold_options": true "ascii_composer/good_old_caps_lock": true "ascii_composer/switch_key/Caps_Lock": clear "ascii_composer/switch_key/Shift_L": noop @@ -85,3 +86,5 @@ patch: - { accept: KP_Add, send: plus, when: composing } - { accept: KP_Subtract, send: minus, when: composing } - { accept: KP_Divide, send: slash, when: composing } + + - { accept: Control+space, toggle: ascii_mode, when: always } diff --git a/home/modules/i18n/default.nix b/home/modules/i18n/default.nix index 0e78253..7c5048d 100644 --- a/home/modules/i18n/default.nix +++ b/home/modules/i18n/default.nix @@ -7,6 +7,7 @@ xdg.dataFile = { "fcitx5/rime/default.custom.yaml".source = ./default.custom.yaml; "fcitx5/rime/double_pinyin_flypy.custom.yaml".source = ./double_pinyin_flypy.custom.yaml; + "fcitx5/rime/yustar_sc.custom.yaml".source = ./yustar_sc.custom.yaml; }; }; } diff --git a/home/modules/i18n/yustar_sc.custom.yaml b/home/modules/i18n/yustar_sc.custom.yaml new file mode 100644 index 0000000..27f1041 --- /dev/null +++ b/home/modules/i18n/yustar_sc.custom.yaml @@ -0,0 +1,2 @@ +patch: + "style/horizontal": false diff --git a/nixos/modules/i18n.nix b/nixos/modules/i18n.nix index 5c628b5..0be8387 100644 --- a/nixos/modules/i18n.nix +++ b/nixos/modules/i18n.nix @@ -38,6 +38,7 @@ in { rime-ice rime-zhwiki rime-moegirl + rime-yuhaostar ]; }) ]; @@ -46,7 +47,56 @@ in { # ignoreUserConfig = false; settings = { addons = { - classicui.globalSection.Theme = "FluentDark-solid"; + classicui.globalSection = { + Theme = "FluentDark-solid"; + "Vertical Candidate List" = true; + }; + notifications.globalSection = { + HiddenNotifications = ""; + }; + clipboard.globalSection = { + TriggerKey = ""; + PastePrimaryKey = ""; + }; + }; + globalOptions = { + HotKey = { + ActivateKeys = ""; + AltTriggerKeys = ""; + DeactivateKeys = ""; + EnumerateBackwardKeys = ""; + EnumerateForwardKeys = ""; + EnumerateGroupBackwardKeys = ""; + EnumerateGroupForwardKeys = ""; + EnumerateSkipFirst = false; + EnumerateWithTriggerKeys = true; + ModifierOnlyKeyTimeout = "250"; + NextCandidate = ""; + NextPage = ""; + PrevCandidate = ""; + PrevPage = ""; + TogglePreedit = ""; + TriggerKeys = ""; + }; + Behavior = { + ActiveByDefault = false; + AllowInputMethodForPassword = false; + AutoSavePeriod = 30; + CompactInputMethodInformation = true; + CustomXkbOption = ""; + DefaultPageSize = 7; + DisabledAddons = ""; + EnabledAddons = ""; + OverrideXkbOption = false; + PreeditEnabledByDefault = true; + PreloadInputMethod = true; + ShareInputState = "No"; + ShowFirstInputMethodInformation = true; + ShowInputMethodInformation = true; + ShowPreeditForPassword = false; + resetStateWhenFocusIn = "No"; + showInputMethodInformationWhenFocusIn = false; + }; }; inputMethod = { "Groups/0" = { @@ -55,13 +105,12 @@ in { DefaultIM = "keyboard-us"; }; "Groups/0/Items/0" = { - Name = "keyboard-us"; - Layout = ""; - }; - "Groups/0/Items/1" = { Name = "rime"; Layout = ""; }; + "GroupOrder" = { + "0" = "Default"; + }; }; }; }; diff --git a/overlays/additions/default.nix b/overlays/additions/default.nix index 0be1dc4..4825574 100644 --- a/overlays/additions/default.nix +++ b/overlays/additions/default.nix @@ -8,6 +8,7 @@ in ./radicle-ci-broker.nix ./wallpapers.nix ./waydroid-script.nix + ./rime-yuhaostar.nix ./pkgsNoCuda.nix ] diff --git a/overlays/additions/rime-yuhaostar.nix b/overlays/additions/rime-yuhaostar.nix new file mode 100644 index 0000000..b9de88e --- /dev/null +++ b/overlays/additions/rime-yuhaostar.nix @@ -0,0 +1,5 @@ +{outputs, ...}: _final: prev: let + inherit (prev.stdenv.hostPlatform) system; +in { + inherit (outputs.packages.${system}) rime-yuhaostar; +} diff --git a/pkgs/_sources/generated.json b/pkgs/_sources/generated.json index aefd66d..88deee2 100644 --- a/pkgs/_sources/generated.json +++ b/pkgs/_sources/generated.json @@ -150,6 +150,21 @@ }, "version": "d5f684b2ec12dc875ec0278c8e2fe71faaa88d38" }, + "rime-yuhaostar": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "rime-yuhaostar", + "passthru": null, + "pinned": false, + "src": { + "name": "yustar_v3.8.0.zip", + "sha256": "sha256-aUMsuXkiK/FVVi6qPg+dphAOpRyGiDKsT2wD2VBShKo=", + "type": "url", + "url": "http://ys-j.ysepan.com/wap/zhuyuhao/91SbOjgNKE7A2PMH8A/we7hF96sa52g4EccbuakeGd8LE3NGc/宇浩星陳_v3.8.0.zip" + }, + "version": "v3.8.0" + }, "spotx": { "cargoLocks": null, "date": "2025-07-02", diff --git a/pkgs/_sources/generated.nix b/pkgs/_sources/generated.nix index de096a0..af9baef 100644 --- a/pkgs/_sources/generated.nix +++ b/pkgs/_sources/generated.nix @@ -96,6 +96,15 @@ }; date = "2025-06-27"; }; + rime-yuhaostar = { + pname = "rime-yuhaostar"; + version = "v3.8.0"; + src = fetchurl { + url = "http://ys-j.ysepan.com/wap/zhuyuhao/91SbOjgNKE7A2PMH8A/we7hF96sa52g4EccbuakeGd8LE3NGc/\23431\28009\26143\38515_v3.8.0.zip"; + name = "yustar_v3.8.0.zip"; + sha256 = "sha256-aUMsuXkiK/FVVi6qPg+dphAOpRyGiDKsT2wD2VBShKo="; + }; + }; spotx = { pname = "spotx"; version = "a0df4fcaace5efc1b58acd39b2c4d1750bb81057"; diff --git a/pkgs/default.nix b/pkgs/default.nix index b01f306..a914938 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -21,6 +21,7 @@ in { editor-runtime = callPackage ./editor-runtime.nix {}; cliphist = callPackage ./cliphist.nix {}; radicle-ci-broker = callPackage ./radicle-ci-broker.nix {}; + rime-yuhaostar = callPackage ./rime-yuhaostar {}; noto-serif-cjk = callPackage ./noto-serif-cjk.nix {}; noto-sans-cjk = callPackage ./noto-sans-cjk.nix {}; diff --git a/pkgs/nvfetcher.toml b/pkgs/nvfetcher.toml index 6d97a42..26b6d2d 100644 --- a/pkgs/nvfetcher.toml +++ b/pkgs/nvfetcher.toml @@ -49,3 +49,8 @@ fetch.url = "http://wallpaper.youthlic.social/hieda-no-akyuu-touhou.1920x1080.mp ["wallpaper_outer-wilds.3840x2160.mp4"] src.cmd = "curl -sL http://wallpaper.youthlic.social/outer-wilds.3840x2160.mp4 | sha256sum | cut -d ' ' -f 1" fetch.url = "http://wallpaper.youthlic.social/outer-wilds.3840x2160.mp4" + +[rime-yuhaostar] +src.github = "forfudan/yuhao-ime-release" +fetch.url = "http://ys-j.ysepan.com/wap/zhuyuhao/91SbOjgNKE7A2PMH8A/we7hF96sa52g4EccbuakeGd8LE3NGc/宇浩星陳_$ver.zip" +url.name = "yustar_$ver.zip" diff --git a/pkgs/rime-yuhaostar/default.nix b/pkgs/rime-yuhaostar/default.nix new file mode 100644 index 0000000..3da59ba --- /dev/null +++ b/pkgs/rime-yuhaostar/default.nix @@ -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 + ''; + } diff --git a/pkgs/rime-yuhaostar/key_binder.patch b/pkgs/rime-yuhaostar/key_binder.patch new file mode 100644 index 0000000..35f7c84 --- /dev/null +++ b/pkgs/rime-yuhaostar/key_binder.patch @@ -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 } diff --git a/pkgs/rime-yuhaostar/punctuator.patch b/pkgs/rime-yuhaostar/punctuator.patch new file mode 100644 index 0000000..b299c05 --- /dev/null +++ b/pkgs/rime-yuhaostar/punctuator.patch @@ -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: + "`": "`" + "#": "#"