recently i’ve been studying toki pona and found myself wanting an easy way to use sitelen pona on my computer. i figured there would be a way to create an IME similar to those used for the japanese language, and while there is no official unicode support for sitelen pona, each character does have a ucsur codepoint. i came across this page after a cursory google, so here are my results after adapting the procedure detailed there.
creation
already having the requisite packages installed, i started by making a copy of the template file:
cp /usr/share/ibus-table/tables/template.txt toki-pona.txt
vim toki-pona.txt
since this is a .config file in all but name, once in vim i ran the command :set syntax=config to make it easier to look at.
in another terminal window, i ran uuidgen and pasted the output in line 18, then updated the serial number on line 24 to the current date. for the icon, i’m using the svg logo from the toki pona website, and the symbol is the combined glyph . the table name is “SitelenPona”, and for the languages field i’m trying “tok”. valid input characters are the string aeijklmnopstuw()+-[].:,<^>!, max key length is 15 (for “kijetesantakalu”—although this could be made shorter for an IME that targets only nimi ku suli). i switched a couple booleans (see end of page for a list of differences), and commented out the rules and goucima lines because i don’t know what they do (but i feel like they could be relevant for custom user-inputted name sequences).
and now for the fun(?) part: entering every sitelen lasina string and its sitelen pona equivalent into the table. nothing much to report about this; just some manual data entry.
after all that, i ran these commands to install it and restart ibus, then logged out + back in for good measure:
sudo ibus-table-createdb -n /usr/share/ibus-table/tables/toki-pona.db -s toki-pona.txt
sudo cp toki_pona.svg /usr/share/ibus-table/icons/
ibus-daemon -drx
and here is the result!
UCSUR code points supported by this IME
it supports all characters up to tier 2 of Common Sitelen Pona, plus and (and for fun).
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| U+F190x | | | | | | | | | | | | | | | | |
| U+F191x | | | | | | | | | | | | | | | | |
| U+F192x | | | | | | | | | | | | | | | | |
| U+F193x | | | | | | | | | | | | | | | | |
| U+F194x | | | | | | | | | | | | | | | | |
| U+F195x | | | | | | | | | | | | | | | | |
| U+F196x | | | | | | | | | | | | | | | | |
| U+F197x | | | | | | | | | | | | | | | | |
| U+F198x | | | | | | | | | | | | | | |||
| U+F199x | | | | | | | | | | |||||||
| U+F19Ax | | | | |||||||||||||
| U+F19Bx | | |
special inputs (e.g. punctuation):
- start and end of cartouches:
(and) - stacking joiner:
+ - nesting joiner:
- - start and end of long glyph:
[and]- long pi: after , use
[to start and]to end a long pi sequence
- long pi: after , use
- left and right corner brackets:
teandto - middle dot:
. - colon:
:
differences between the template and my config
diff template.txt toki-pona.txt --suppress-common-lines excluding table:
< UUID = c9851827-0abe-12ed-8db5-010b9d51ffed
---
> UUID = 4c3f5fa5-c51f-4c20-81ec-52d05f3ed8bc
24c24
< SERIAL_NUMBER = 20090218
---
> SERIAL_NUMBER = 20260826
28c28
< ICON = ibus-table.svg
---
> ICON = toki_pona.svg
31c31
< SYMBOL = 码
---
> SYMBOL =
34c34
< NAME = Table
---
> NAME = SitelenPona
37,39c37,39
< NAME.zh_CN = 形码
< NAME.zh_HK = 形碼
< NAME.zh_TW = 形碼
---
> ### NAME.zh_CN = 形码
> ### NAME.zh_HK = 形碼
> ### NAME.zh_TW = 形碼
42c42
< DESCRIPTION = This is a template engine table for IBus Table.
---
> DESCRIPTION = Sitelen Pona input engine table.
48c48
< LANGUAGES = zh_CN,zh_SG,zh_TW,zh_HK
---
> LANGUAGES = tok
51c51
< AUTHOR = Yu Yuwei <acevery@gmail.com>
---
> AUTHOR = jan Kaju <kaiju.blue>
55c55
< STATUS_PROMPT = CN
---
> STATUS_PROMPT =
58c58
< VALID_INPUT_CHARS = abcdefghijklmnopqrstuvwxyz
---
> VALID_INPUT_CHARS = aeijklmnopstuw()+-[].:,<^>!
64c64
< MAX_KEY_LENGTH = 4
---
> MAX_KEY_LENGTH = 15
67c67
< AUTO_COMMIT = FALSE
---
> AUTO_COMMIT = TRUE
85c85
< PINYIN_MODE = TRUE
---
> PINYIN_MODE = FALSE
105c105
< RULES = ce2:p11+p12+p21+p22;ce3:p11+p21+p22+p31;ca4:p11+p21+p31+p41
---
> ### RULES = ce2:p11+p12+p21+p22;ce3:p11+p21+p22+p31;ca4:p11+p21+p31+p41
133,135c133,290
< input_keys aim_chars freq
< input_keys aim_chars freq
< input_keys aim_chars freq
---
# table definitions here
147,150c302,305
< BEGIN_GOUCI
< character_1 goucima_1
< character_1 goucima_2
< END_GOUCI
---
> ### BEGIN_GOUCI
> ### character_1 goucima_1
> ### character_1 goucima_2
> ### END_GOUCI
notes
- would like to play with
user_can_define_phrase—might be good for entering name sequences - unsure how to input full-width spaces. the keybind toggle for it in ibus doesn’t seem to work for me
- get the .txt and install.sh here