Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

osfans/nimf

 
 

Repository files navigation

Nimf is an input method framework which has a module-based client-server
architecture in which an application acts as a client and communicates
synchronously with the Nimf server via a unix socket.

Nimf provides:
 * Input Method Server:
    * nimf-daemon including IMdkit(XIM)
 * Language Engines:
    * Chinese (in alpha stage, based on sunpinyin, libchewing, librime)
    * Japanese (in alpha stage, based on anthy)
    * Korean (based on libhangul)
 * Client Modules:
    * GTK+2, GTK+3, Qt4, Qt5
 * Indicator:
    * nimf-indicator for Unity, GNOME Panel, KDE
 * Settings tool to configure the Nimf:
    * nimf-settings
 * Development files

Project Homepage: https://github.com/cogniti/nimf


License
-------

  Nimf is free software: you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  Nimf is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with this program;  If not, see <http://www.gnu.org/licenses/>.


Install
-------

  * Compile

    ./autogen.sh
    make
    sudo make install
    sudo ldconfig
    sudo make update-gtk-im-cache
    sudo make update-gtk-icon-cache
    nimf-daemon
    nimf-indicator
    export GTK_IM_MODULE="nimf"
    export QT4_IM_MODULE="nimf"
    export QT_IM_MODULE="nimf"
    export XMODIFIERS="@im=nimf"
    gedit # or kate

  * To use symbols in libhangul engine

    wget https://raw.githubusercontent.com/choehwanjin/libhangul/master/data/hanja/mssymbol.txt
    sudo mv mssymbol.txt /usr/share/libhangul/hanja/


Configure
---------

  * For GNOME Shell, use 3rd party gnome-shell-extension-appindicator

    https://extensions.gnome.org/extension/615/appindicator-support/
    https://github.com/rgcjonas/gnome-shell-extension-appindicator

  * Configure Hangul/Hanja key if you use a keyboard
    without hardware Hangul/Hanja key

    Use xkb-data >= 2.14, then
    Select "Right Alt as Hangul, right Ctrl as Hanja" or
           "Right Ctrl as Hangul, right Alt as Hanja" from gnome-tweak-tool.


Troubleshoot
------------

* Failed to load shared library
  Check /etc/ld.so.conf and /etc/ld.so.conf.d/ for /usr/local/lib path


Architecture
------------

      +- im modules --+       +-- each process ---+   +- a process --+
      | gtk im module |       |  nimf-indicator   |   |   X server   |
      | qt  im module |       +-------------------+   +--------------+
      +---------------+                |                    ^ |
              | calls                  | calls              | |
     +-----------------+      +--------------------+        | |
     | nimf IM library |      | nimf agent library |        | | communicates
     +-----------------+      +--------------------+        | |
             ^ |                      ^ |                   | |
             | |   communicates       | |                   | |
             | |   via Unix Socket    | |                   | |
             | v                      | v                   | v
          +---------------------- a process ----------------------+
          |               nimf-daemon (including XIM)             |
          +-------------------------------------------------------+
                          | calls                  | create instance
                          | an instance            | (not module yet)
                +---------------+            +------------------+
                | engine module |   calls    | candidate module |
                |   interface   | ---------> |    interface     |
                +---------------+            +------------------+
                  | (alphabetically listed)    |
                  +- nimf-anthy                +- nimf-candidate (gtk3)
                  +- nimf-chewing
                  +- nimf-libhangul
                  +- nimf-rime
                  +- nimf-sunpinyin


Debugging
---------
    nimf-daemon --debug
    tail -f /var/log/daemon.log

    export GTK_IM_MODULE="nimf"
    export QT4_IM_MODULE="nimf"
    export QT_IM_MODULE="nimf"
    export XMODIFIERS="@im=nimf"
    export G_MESSAGES_DEBUG=nimf
    gedit # or kate for Qt


References
----------

  * API

  http://www.x.org/releases/X11R7.6/doc/libX11/specs/XIM/xim.html
  http://www.w3.org/TR/ime-api/
  https://developer.chrome.com/extensions/input_ime
  https://docs.enlightenment.org/stable/efl/group__Ecore__IMF__Lib__Group.html
  http://doc.qt.io/qt-4.8/qinputcontext.html
  http://doc.qt.io/qt-5/qinputmethod.html
  https://git.gnome.org/browse/gtk+

  * Language Engines (alphabetically listed)

  http://anonscm.debian.org/cgit/collab-maint/anthy.git
  https://github.com/chewing/libchewing
  https://github.com/choehwanjin/libhangul
  https://github.com/rime/librime
  https://github.com/sunpinyin/sunpinyin

  * Implementations

  https://github.com/choehwanjin/nabi
  https://github.com/choehwanjin/imhangul
  https://github.com/choehwanjin/ibus-hangul
  https://github.com/ibus/ibus
  https://github.com/fcitx/fcitx
  https://github.com/fcitx/fcitx-qt5
  https://github.com/uim/uim

About

Nimf is an input method framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 93.4%
  • C++ 3.1%
  • Makefile 2.2%
  • M4 1.2%
  • Shell 0.1%