Skip to content

HowToCreateATableForIBusTable

abiiget7 edited this page May 13, 2025 · 5 revisions

How to Create a table for ibus-table

Phase-Deploy, Featured

Steps

  1. Assume the DATADIR is /usr/share.
  2. Copy ${DATADIR}/ibus-table/tables/template.txt for the template to begin with. Assume it is your-im-table.txt.
  3. Make an icon for your im, assume it is your-im-table.svg.
  4. Edit the your-im-table.txt to suit your need.
  5. Fill the actual table content between BEGIN_TABlE and END_TABlE.
    • The 1st field is Input Key: the key sequence to produce the word/phrase
    • The 2nd field is Phrase: Word/phrase to be produced.
    • The 3rd field is Frequency: The usage frequency of that phrase. Phrases with more frequency will be in front of candidate list.
  6. Install ibus-table if you have not.
  7. Run
    ibus-table-createdb -n ${DATADIR}/ibus-table/tables/your-im-table.db -s your-im.table.txt
    cp your-im-table.svg ${DATADIR}/ibus-table/icons/
    ```</pre>
    
  8. Restart ibus-daemon by
    ibus-daemon -drx
    ```</pre>
    
  9. Open ibus-setup, add your newly created input method then enjoy!

For input method developers

It is recommended to split database building and index creating, as it makes distro packagers' life easier.

Use -o option of ibus-table-create to build database without creating index; use -i option of ibus-table-create to create index without building database.

For packagers

Install the database file which is built by ibus-table-create -o, and create index with ibus-table-create -i in your post-install script script.

Clone this wiki locally