feat: rime-data for both linux & macOS

This commit is contained in:
Ryan Yin
2023-07-17 13:19:10 +08:00
parent cc6e5ea071
commit 32429619ab
10 changed files with 116 additions and 35 deletions
+1
View File
@@ -6,6 +6,7 @@
./core.nix ./core.nix
./nushell.nix ./nushell.nix
./rime-squirrel.nix
]; ];
# Home Manager needs a bit of information about you and the # Home Manager needs a bit of information about you and the
+10
View File
@@ -0,0 +1,10 @@
{ pkgs, ... }:
{
# Squirrel Input Method
home.file."Library/Rime" = {
# my custom squirrel data (flypy input method)
source = "${pkgs.flypy-squirrel}/share/rime-data";
recursive = true;
};
}
+3 -1
View File
@@ -1,4 +1,4 @@
{ ... }: { ... } @ args:
############################################################# #############################################################
# #
@@ -17,6 +17,8 @@ in
../../secrets/darwin.nix ../../secrets/darwin.nix
]; ];
nixpkgs.overlays = import ../../overlays args;
networking.hostName = name; networking.hostName = name;
networking.computerName = name; networking.computerName = name;
system.defaults.smb.NetBIOSName = name; system.defaults.smb.NetBIOSName = name;
+8 -2
View File
@@ -1,14 +1,20 @@
# Fcitx5-Rime + Flypy # rime-data for flypy input method
- fcitx5 input method - currently not work in vscode, and failed to add flypy input method Useful for Linux(fcitx5-rime) & macOS(squirrel).
## Hisotry Problems ## Hisotry Problems
## Linux(fcitx5-rime)
1. pay attention to the `rm -rf .local/share/fcitx5/rime/`, which may contains some auto generated rime config files, which may cause flypy not the default scheme for rime 1. pay attention to the `rm -rf .local/share/fcitx5/rime/`, which may contains some auto generated rime config files, which may cause flypy not the default scheme for rime
2. manage `~/.config/fcitx5/profile` in ../home/hyprland/default.nix, which hardcode rime as the default input method, so you do not need to use fcitx-configtool to set rime as the default input method. 2. manage `~/.config/fcitx5/profile` in ../home/hyprland/default.nix, which hardcode rime as the default input method, so you do not need to use fcitx-configtool to set rime as the default input method.
3. fcitx5-rime still cannot use on vscode & chrome now... need more time to figure out why and resolve it. 3. fcitx5-rime still cannot use on vscode & chrome now... need more time to figure out why and resolve it.
## macOS(squirrel)
1. pay attention to the `rm -rf ~/Library/Rime/`, which may contains some auto generated rime config files.
## Docs about fcitx5 ## Docs about fcitx5
- [Fcitx5 - Arch Linux Wiki](https://wiki.archlinux.org/title/Fcitx5) - [Fcitx5 - Arch Linux Wiki](https://wiki.archlinux.org/title/Fcitx5)
+3
View File
@@ -7,4 +7,7 @@
# 我仅修改了 default.yaml 文件,将其中的半角括号改为了直角括号「 与 」。 # 我仅修改了 default.yaml 文件,将其中的半角括号改为了直角括号「 与 」。
rime-data = ./rime-data-flypy; rime-data = ./rime-data-flypy;
fcitx5-rime = super.fcitx5-rime.override { rimeDataPkgs = [ ./rime-data-flypy ]; }; fcitx5-rime = super.fcitx5-rime.override { rimeDataPkgs = [ ./rime-data-flypy ]; };
# used by macOS Squirrel
flypy-squirrel = ./rime-data-flypy;
}) })
@@ -0,0 +1,41 @@
customization:
distribution_code_name: Squirrel
distribution_version: 2019-06-23
rime_version: 1.5.3
patch:
schema_list:
- schema: flypy # 添加小鹤音形
#
# 可用的按键有 Caps_Lock, Shift_L, Shift_R, Control_L, control_R
# Mac 系统上的鼠须管不能区分左、右,因此只有对 Shift_L, Control_L 的设定起作用
#
# 已输入编码时按切换键,可以进一步设定输入法中西文切换的形式
# 可选的临时切换策略有三:
# inline_ascii 在输入法的临时西文编辑区内输入字母、数字、符号、空格等,回车上屏后自动复位到中文
# commit_text 已输入的候选文字上屏并切换至西文输入模式
# commit_code 已输入的编码字符上屏并切换至西文输入模式
# 设为 noop, 屏蔽该切换键
#
# 如果要把Caps Lock 设为只改变字母的大小写而不做中西文切换,可将 Caps_Lock 对应的切换方式设为 noop
# 如果要以Caps Lock 切换到西文模式,默认输出小写字母,请置 ascii_composer/good_old_caps_lock: false
# 如果要以Caps Lock 切换到西文模式,默认输出大写字母,请置 ascii_composer/good_old_caps_lock: true
ascii_composer/good_old_caps_lock: true
ascii_composer/switch_key:
Caps_Lock: noop
Shift_L: commit_code
Shift_R: noop
Control_L: noop
Control_R: noop
key_binder/bindings:
- when: paging
accept: bracketleft
send: Page_Up
- when: has_menu
accept: bracketright
send: Page_Down
@@ -1,4 +1,4 @@
# 小鹤双拼自定义方案配置 # Rime default settings
# encoding: utf-8 # encoding: utf-8
config_version: "0.38" config_version: "0.38"
@@ -24,7 +24,7 @@ menu:
page_size: 5 page_size: 5
punctuator: punctuator:
half_shape: &half_shape full_shape: # replace full_shape with half_shape
',' : { commit: } ',' : { commit: }
'.' : { commit: 。 } '.' : { commit: 。 }
'<' : [ 《, 〈, «, ] '<' : [ 《, 〈, «, ]
@@ -53,17 +53,45 @@ punctuator:
'_' : —— '_' : ——
'+' : '+' '+' : '+'
'=' : '=' '=' : '='
# '[' : { commit: '【' } '[' : [ 「, 【, , ]
# ']' : { commit: '】' } ']' : [ 」, 】, , ]
# '{' : { commit: '' } '{' : [ 『, 〖, ]
# '}' : { commit: '' } '}' : [ 』, 〗, ]
# 直角空格更好看,改成它
'[' : { commit: '「' }
']' : { commit: '」' } half_shape:
'{' : { commit: '『' } ',' : { commit: }
'}' : { commit: '』' } '.' : { commit: 。 }
# 这个全宽字符非常恶心, 没啥用,老搞出全宽空格,禁用掉! '<' : [ 《, 〈, «, ]
full_shape: *half_shape '>' : [ 》, 〉, », ]
'/' : { commit: 、 }
'?' : { commit: }
';' : { commit: }
':' : { commit: }
'''' : { pair: [ '', '' ] }
'"' : { pair: [ '“', '”' ] }
'\' : { commit: 、 }
'|' : '|'
'`' : '`'
'~' : { commit: }
'!' : { commit: }
'@' : '@'
'#' : '#'
'%' : { commit: '%' }
'$' : { commit: "$" }
'^' : { commit: …… }
'&' : '&'
'*' : { commit: '*' }
'(' :
')' :
'-' : '-'
'_' : ——
'+' : '+'
'=' : '='
'[' : [ 「, 【, , ]
']' : [ 」, 】, , ]
'{' : [ 『, 〖, ]
'}' : [ 』, 〗, ]
key_binder: key_binder:
bindings: bindings:
@@ -4,7 +4,7 @@
schema: schema:
schema_id: flypy schema_id: flypy
name: 小鹤音形 name: 小鹤音形
version: "10.9.3" version: "10.9.4"
author: author:
- 方案设计:何海峰 <flypy@qq.com> - 方案设计:何海峰 <flypy@qq.com>
description: | description: |
@@ -25,14 +25,14 @@ https://help.flypy.com/#/gn orm
· ;y · ;y
+ ;u + ;u
- ;i - ;i
* ;o [ ;o
/ ;p ] ;p
;a ;a
…… ;s …… ;s
、 ;d 、 ;d
《 ;g 《 ;g
[ ;h * ;h
] ;j / ;j
( ;k ( ;k
) ;l ) ;l
“ ;z “ ;z
@@ -73,7 +73,6 @@ https://help.flypy.com/#/gn orm
魅力 mwli 魅力 mwli
极为 jiww 极为 jiww
按键 aj 按键 aj
不懂 bd
背景 bj 背景 bj
参加 cj 参加 cj
从前 cq 从前 cq
@@ -131,6 +130,7 @@ https://help.flypy.com/#/gn orm
伤害 uh 伤害 uh
世纪 uj 世纪 uj
试试 uu 试试 uu
食物 uw
这次 vc 这次 vc
直到 vd 直到 vd
征服 vf 征服 vf
@@ -338,7 +338,6 @@ https://help.flypy.com/#/gn orm
板上钉钉 budd 板上钉钉 budd
部队 budv 部队 budv
不施粉黛 bufd 不施粉黛 bufd
备受关注 bugv
补救 bujq 补救 bujq
不胜枚举 bumj 不胜枚举 bumj
跋山涉水 buuu 跋山涉水 buuu
@@ -353,7 +352,6 @@ https://help.flypy.com/#/gn orm
背弃 bwqi 背弃 bwqi
不外如是 bwru 不外如是 bwru
百无一用 bwyy 百无一用 bwyy
百味杂陈 bwzi
报喜不报忧 bxby 报喜不报忧 bxby
巴西利亚 bxly 巴西利亚 bxly
百依百顺 bybu 百依百顺 bybu
@@ -383,7 +381,6 @@ https://help.flypy.com/#/gn orm
胆大妄为 ddww 胆大妄为 ddww
大跌眼镜 ddyj 大跌眼镜 ddyj
多多益善 ddyu 多多益善 ddyu
第二现场 dexi
达官贵人 dggr 达官贵人 dggr
蹬踏 dgta 蹬踏 dgta
电光石火 dguh 电光石火 dguh
@@ -1180,7 +1177,6 @@ https://help.flypy.com/#/gn orm
水银 uvyb 水银 uvyb
受制于人 uvyr 受制于人 uvyr
少之又少 uvyu 少之又少 uvyu
省委书记 uwuj
顺我者昌 uwvi 顺我者昌 uwvi
双喜临门 uxlm 双喜临门 uxlm
蛇蝎心肠 uxxi 蛇蝎心肠 uxxi
@@ -1210,7 +1206,6 @@ https://help.flypy.com/#/gn orm
政权 vgqr 政权 vgqr
争执 vgvi 争执 vgvi
中规中矩 vgvj 中规中矩 vgvj
周公之礼 vgvl
至高无上 vgwu 至高无上 vgwu
这个月 vgy 这个月 vgy
正义 vgyi 正义 vgyi
@@ -1307,7 +1302,6 @@ https://help.flypy.com/#/gn orm
无理 wuli 无理 wuli
忤逆 wuni 忤逆 wuni
万水千山 wuqu 万水千山 wuqu
往事如烟 wury
无事生非 wuuf 无事生非 wuuf
巫山 wuuj 巫山 wuuj
午睡 wuuv 午睡 wuuv
@@ -1338,7 +1332,6 @@ https://help.flypy.com/#/gn orm
惟有饮者留其名 wyym 惟有饮者留其名 wyym
心急 xbji 心急 xbji
心理 xbli 心理 xbli
性别歧视 xbqu
小不忍则乱大谋 xbrm 小不忍则乱大谋 xbrm
心比天高 xbtg 心比天高 xbtg
刑不上大夫 xbuf 刑不上大夫 xbuf
@@ -1414,7 +1407,6 @@ https://help.flypy.com/#/gn orm
瞎扯 xxie 瞎扯 xxie
新鲜出炉 xxil 新鲜出炉 xxil
相形见绌 xxji 相形见绌 xxji
小心谨慎 xxju
稀稀拉拉 xxll 稀稀拉拉 xxll
寻寻觅觅 xxmm 寻寻觅觅 xxmm
心心念念 xxnn 心心念念 xxnn
@@ -4088,7 +4080,6 @@ AA制 aav
默契 moq 默契 moq
默认 mor 默认 mor
模特 mot 模特 mot
模型 mox
灭顶 mpd 灭顶 mpd
灭绝 mpj 灭绝 mpj
孟婆汤 mpt 孟婆汤 mpt
@@ -6144,7 +6135,6 @@ AA制 aav
新版 xbb 新版 xbb
信不过 xbg 信不过 xbg
想不开 xbk 想不开 xbk
心目 xbm
新闻 xbw 新闻 xbw
下次吧 xcb 下次吧 xcb
下次见 xcj 下次见 xcj
@@ -8001,7 +7991,6 @@ m³ otl 100
指挥 vhf 指挥 vhf
回忆 hyx 回忆 hyx
距离 jlw 距离 jlw
食物 uwn
指示 vue 指示 vue
哲理 vlw 哲理 vlw
音形 yxk 音形 yxk
@@ -16,6 +16,7 @@
# 用户词库,下行开始添加,编码格式见上,部署后生效 # 用户词库,下行开始添加,编码格式见上,部署后生效
# 全码词 # 全码词
杯子 bwzi
即使 jiui 即使 jiui
回忆 hvyi 回忆 hvyi
华为 hxww 华为 hxww