The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Package:IBus/Chinese/rime"
(A guide to installing, configuring and using ibus-rime under funtoo) |
m (Punctuation) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
|Homepage=https://rime.im https://github.com/rime/ibus-rime | |Homepage=https://rime.im https://github.com/rime/ibus-rime | ||
}} | }} | ||
[https://rime.im/ Rime<sup>Chinese</sup>] is an IM but can be considered a full blown IME if it had its own backend like ibus and fcitx. This allows rime to be highly extensible and provide features such as: | [https://rime.im/ Rime<sup>Chinese</sup>] is an IM but can be considered a full-blown IME if it had its own backend like ibus and fcitx. This allows rime to be highly extensible and provide features such as: | ||
# Hot switching of languages | # Hot switching of languages | ||
# Hot switching of scripts | # Hot switching of scripts | ||
Line 11: | Line 11: | ||
# Plugin hot reload | # Plugin hot reload | ||
Rime is made specifically for speakers of Chinese languages, and as such it provides a wide array of built-in and | Rime is made specifically for speakers of Chinese languages, and as such it provides a wide array of built-in and add-on Chinese languages, with full UI and documentation translations to multiple dialects and many popular input integrations that might not be available in regular ibus and fcitx or would require additional plugins called recipes. Rime is also highly extensible, but doesn't sacrifice usability. Installing and keeping recipes up to date is simple thanks to its micro-package manager, plum, that allows the user to install any custom input methods(recipes) in a standardized way. | ||
All of this and more will be explained in this page. | All of this and more will be explained in this page. | ||
Line 19: | Line 19: | ||
# ##i##emerge ibus-rime | # ##i##emerge ibus-rime | ||
}} | }} | ||
After installation you can find the '''rime''' in the ibus-setup GUI, under Input Method, the button Add on the side panel, Chinese. | Now run | ||
{{console|body= | |||
# ##i##dispatch-conf | |||
}} | |||
to update your {{c|/etc/environment}} file to include adding an environment variable for {{c|plum}}<sup>explained below</sup> | |||
After installation, you can find the '''rime''' in the ibus-setup GUI, under Input Method, the button Add on the side panel, Chinese. | |||
== Using rime == | == Using rime == | ||
Line 25: | Line 31: | ||
As expected, switching to rime in ibus and clicking on an input box, you should get the rime GUI to appear. The first button(left to right), when clicked switches between Chinese characters and English, the second and third one, deploy and update the rime database respectively. | As expected, switching to rime in ibus and clicking on an input box, you should get the rime GUI to appear. The first button(left to right), when clicked switches between Chinese characters and English, the second and third one, deploy and update the rime database respectively. | ||
By default when you start typing in pinyin in Chinese mode, you will get a list of recommendations, the more you use rime, the better rime gets at recommending phrases tailored to your way of typing. However, the default configuration has some flaws: | By default, when you start typing in pinyin in Chinese mode, you will get a list of recommendations, the more you use rime, the better rime gets at recommending phrases tailored to your way of typing. However, the default configuration has some flaws: | ||
# By default it uses Traditional characters | # By default, it uses Traditional characters | ||
# Defaults to luna pinyin | # Defaults to luna pinyin | ||
# Defaults to list mode | # Defaults to list mode | ||
To fix the Traditional characters open the settings panel using {{c|F4}} or {{c|CTRL+`}} when rime is active on a page. You should get a list of settings. The first | To fix the Traditional characters, open the settings panel using {{c|F4}} or {{c|CTRL+`}} when rime is active on a page. You should get a list of settings. The first setting is always the input method you're currently using, the menu where you change your input method, and the rest are other input methods you have enabled. | ||
Clicking on the second settings opens the following sub-menu: | Clicking on the second settings opens the following sub-menu: | ||
Line 39: | Line 45: | ||
=== Bundled input methods and installing additional ones === | === Bundled input methods and installing additional ones === | ||
Currently in Funtoo we install the initial input method list from rime. You can locate it [https://github.com/rime/plum/blob/master/preset-packages.conf here]. Here is a list with translations for non-Chinese speakers and explanation: | Currently, in Funtoo we install the initial input method list from rime. You can locate it [https://github.com/rime/plum/blob/master/preset-packages.conf here]. Here is a list with translations for non-Chinese speakers and explanation: | ||
# [https://github.com/rime/rime-bopomofo bopomofo 注音] - [https://en.wikipedia.org/wiki/Bopomofo BoPoMoFo input] | # [https://github.com/rime/rime-bopomofo bopomofo 注音] - [https://en.wikipedia.org/wiki/Bopomofo BoPoMoFo input] | ||
# [https://github.com/rime/rime-cangjie cangjie 倉頡五代] - [https://en.wikipedia.org/wiki/Cangjie_input_method#/ Cangjie input] | # [https://github.com/rime/rime-cangjie cangjie 倉頡五代] - [https://en.wikipedia.org/wiki/Cangjie_input_method#/ Cangjie input] | ||
# [https://github.com/rime/rime-essay essay] - The default rime vocabulary and language model | # [https://github.com/rime/rime-essay essay] - The default rime vocabulary and language model | ||
# [https://github.com/rime/rime-luna-pinyin luna-pinyin] | # [https://github.com/rime/rime-luna-pinyin luna-pinyin 朙月拼音] - Standard Mandarin Pinyin | ||
# [https://github.com/rime/rime-prelude prelude] - The default basic rime input method configuration for common rime components | # [https://github.com/rime/rime-prelude prelude] - The default basic rime input method configuration for common rime components | ||
# [https://github.com/rime/rime-stroke stroke] | # [https://github.com/rime/rime-stroke stroke 五筆畫] - 5 Stroke input, h,s,p,n,z represent horizontal, vertical, swipe, downwards-right and fold stroke | ||
# [https://github.com/rime/rime-terra-pinyin terra-pinyin] | # [https://github.com/rime/rime-terra-pinyin terra-pinyin 地球拼音] - Mandarin pinyin with tones | ||
Along with this, we also bundle [https://github.com/rime/plum plum], which is a package manager for rime. It is installed automatically when you emerge '''ibus-rime'''. Before we get to using the package manager, make sure that your regular user is under the '''rime''' group, as not being in it will result in a permissions' error. | |||
To add yourself to the rime group: | To add yourself to the rime group: | ||
Line 59: | Line 65: | ||
$ ##i##rime-install | $ ##i##rime-install | ||
}} | }} | ||
{{Important|If you get errors when running '''rime-install''' saying that there is no git repository found, head to '''/var/lib/plum''' and delete the '''"package"''' directory, then rerun '''rime-install'''}} | |||
Plum has 3 package databases, {{c|preset}}, {{c|extra}} and {{c|all}}. We already install the {{c|preset}} list by default. | Plum has 3 package databases, {{c|preset}}, {{c|extra}} and {{c|all}}. We already install the {{c|preset}} list by default. | ||
Line 69: | Line 77: | ||
$ ##i##rime-install :all | $ ##i##rime-install :all | ||
}} | }} | ||
additionally if you don't want to install all packages from a list, or want to inspect the members of that list you can use '''interactive''' mode using the {{c|--select}} option | additionally, if you don't want to install all packages from a list, or want to inspect the members of that list you can use '''interactive''' mode using the {{c|--select}} option | ||
{{console|body= | {{console|body= | ||
$ ##i##rime-install --select :all | $ ##i##rime-install --select :all | ||
Line 86: | Line 94: | ||
$ ##i##rime-install https://github.com/lotem/rime-forge/raw/master/lotem-packages.conf | $ ##i##rime-install https://github.com/lotem/rime-forge/raw/master/lotem-packages.conf | ||
}} | }} | ||
or if hosted on | or if hosted on GitHub, use the shortened version | ||
{{console|body= | {{console|body= | ||
$ ##i##rime-install lotem/rime-forge/lotem-packages.conf | $ ##i##rime-install lotem/rime-forge/lotem-packages.conf | ||
Line 94: | Line 102: | ||
$ ##i##rime-install lotem/rime-forge@master/lotem-packages.conf | $ ##i##rime-install lotem/rime-forge@master/lotem-packages.conf | ||
}} | }} | ||
If you want to look at what community recipes are available for rime, check out this [https://github.com/ayaka14732/awesome-rime GitHub repository] | |||
=== Configuration === | === Configuration === | ||
Rime has config files in the YAML format that you can edit to change the behaviour of rime. First make sure you have run | Rime has config files in the YAML format that you can edit to change the behaviour of rime. First, make sure you have run | ||
{{console|body= | {{console|body= | ||
$ ##i##rime-install | $ ##i##rime-install | ||
Line 101: | Line 111: | ||
at least once | at least once | ||
Then navigate to '''~/.config/ibus/rime''' and create a file called '''default.custom.yaml'''. For example here is how to set a schema to {{c|terra pinyin}} | Then navigate to '''~/.config/ibus/rime''' and create a file called '''default.custom.yaml'''. For example, here is how to set a schema to {{c|terra pinyin}} | ||
{{file|name=~/.config/ibus/rime/default.custom.yaml|lang=yaml|body= | {{file|name=~/.config/ibus/rime/default.custom.yaml|lang=yaml|body= | ||
patch: | patch: | ||
Line 114: | Line 124: | ||
}} | }} | ||
By default rime displays only 5 options in the list. You can change the list size by setting {{c|"menu/page_size"}} manually like this: | By default, rime displays only 5 options in the list. You can change the list size by setting {{c|"menu/page_size"}} manually like this: | ||
{{file|name=~/.config/ibus/rime/default.custom.yaml|lang=yaml|body= | {{file|name=~/.config/ibus/rime/default.custom.yaml|lang=yaml|body= | ||
patch: | patch: |
Latest revision as of 22:03, January 20, 2024
IBus/Chinese/rime
We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.
RimeChinese is an IM but can be considered a full-blown IME if it had its own backend like ibus and fcitx. This allows rime to be highly extensible and provide features such as:
- Hot switching of languages
- Hot switching of scripts
- Integrated settings menu
- Plugin hot reload
Rime is made specifically for speakers of Chinese languages, and as such it provides a wide array of built-in and add-on Chinese languages, with full UI and documentation translations to multiple dialects and many popular input integrations that might not be available in regular ibus and fcitx or would require additional plugins called recipes. Rime is also highly extensible, but doesn't sacrifice usability. Installing and keeping recipes up to date is simple thanks to its micro-package manager, plum, that allows the user to install any custom input methods(recipes) in a standardized way.
All of this and more will be explained in this page.
Installation
To install rime for ibus run:
root # emerge ibus-rime
Now run
root # dispatch-conf
to update your /etc/environment
file to include adding an environment variable for plum
explained below
After installation, you can find the rime in the ibus-setup GUI, under Input Method, the button Add on the side panel, Chinese.
Using rime
The first time you open rime
As expected, switching to rime in ibus and clicking on an input box, you should get the rime GUI to appear. The first button(left to right), when clicked switches between Chinese characters and English, the second and third one, deploy and update the rime database respectively.
By default, when you start typing in pinyin in Chinese mode, you will get a list of recommendations, the more you use rime, the better rime gets at recommending phrases tailored to your way of typing. However, the default configuration has some flaws:
- By default, it uses Traditional characters
- Defaults to luna pinyin
- Defaults to list mode
To fix the Traditional characters, open the settings panel using F4
or CTRL+`
when rime is active on a page. You should get a list of settings. The first setting is always the input method you're currently using, the menu where you change your input method, and the rest are other input methods you have enabled.
Clicking on the second settings opens the following sub-menu:
- 中文 -> 西文 - Changes between the current Chinese and the current western language(By default set to Chinese)
- 全角 -> 半角 - Changes the characters when inputting the current western language(by default set to full width latin)
- 漢字 -> 汉字 - Changes between Traditional and Simplified characters(by default set to traditional)
- 。, -> ., - Changes punctuation width between full and half width(By default set to full width)
Bundled input methods and installing additional ones
Currently, in Funtoo we install the initial input method list from rime. You can locate it here. Here is a list with translations for non-Chinese speakers and explanation:
- bopomofo 注音 - BoPoMoFo input
- cangjie 倉頡五代 - Cangjie input
- essay - The default rime vocabulary and language model
- luna-pinyin 朙月拼音 - Standard Mandarin Pinyin
- prelude - The default basic rime input method configuration for common rime components
- stroke 五筆畫 - 5 Stroke input, h,s,p,n,z represent horizontal, vertical, swipe, downwards-right and fold stroke
- terra-pinyin 地球拼音 - Mandarin pinyin with tones
Along with this, we also bundle plum, which is a package manager for rime. It is installed automatically when you emerge ibus-rime. Before we get to using the package manager, make sure that your regular user is under the rime group, as not being in it will result in a permissions' error.
To add yourself to the rime group:
root # gpasswd -a <username> rime
To update your package repository:
user $ rime-install
If you get errors when running rime-install saying that there is no git repository found, head to /var/lib/plum and delete the "package" directory, then rerun rime-install
Plum has 3 package databases, preset
, extra
and all
. We already install the preset
list by default.
To install the extra
list:
user $ rime-install :extra
and for the full list:
user $ rime-install :all
additionally, if you don't want to install all packages from a list, or want to inspect the members of that list you can use interactive mode using the --select
option
user $ rime-install --select :all
Community packages
Community packages can be installed from GitHub by providing the following argument:
user $ rime-install <user/repo>
Adding an @
character at the end also specifies a branch/tag
user $ rime-install lotem/rime-zhung@master
To install from someone's packages.conf
you can use a direct link:
user $ rime-install https://github.com/lotem/rime-forge/raw/master/lotem-packages.conf
or if hosted on GitHub, use the shortened version
user $ rime-install lotem/rime-forge/lotem-packages.conf
additionally, branch and tag rules are respected
user $ rime-install lotem/rime-forge@master/lotem-packages.conf
If you want to look at what community recipes are available for rime, check out this GitHub repository
Configuration
Rime has config files in the YAML format that you can edit to change the behaviour of rime. First, make sure you have run
user $ rime-install
at least once
Then navigate to ~/.config/ibus/rime and create a file called default.custom.yaml. For example, here is how to set a schema to terra pinyin
~/.config/ibus/rime/default.custom.yaml
(yaml source code) patch:
schema_list:
- schema: terra_pinyin
This file overrides the default configuration, so only adding terra pinyin
will make it the only enabled schema. If you don't want to override the default settings and change the defaults instead, modify ~/.config/ibus/rime/build/ibus_rime.yaml
after you have run rime for the first time.
Next, to make configuration take effect, click on the Deploy/Redeploy button in ibus or restart ibus using
user $ ibus restart
By default, rime displays only 5 options in the list. You can change the list size by setting "menu/page_size"
manually like this:
~/.config/ibus/rime/default.custom.yaml
(yaml source code) patch:
"menu/page_size": 9
If using a vertical list is not comfortable for you, you can always change to horizontal by toggling the horizontal
boolean to true:
~/.config/ibus/rime/default.custom.yaml
(yaml source code) style:
horizontal: true