Jump to content

uim/Configuration

From Wikibooks, open books for an open world
< Uim

Uim may be configured in two ways, either in a configuration file or through a graphical interface.

The main configuration options are which input methods are used and the keyboard shortcuts to activate them.

Graphical interface

[edit | edit source]

There are two identical graphical interfaces: One for GTK+ and the other for Qt, called uim-pref-gtk and uim-pref-qt, respectively. Below is a list of configuration settings as they are laid out in the interface, along with the configuration settings as they appear in the configuration file which is in ~/.uim.d/customs.

Global settings

[edit | edit source]
The global settings view.

Input method deployment

[edit | edit source]
  • Specify default IM (custom-activate-default-im-name? <boolean>, custom-preserved-default-im-name <string>))
  • Default input method (default-im-name is set to "#f" if the above is "#f" but otherwise to <string>)
  • Enabled input methods (enabled-im-list <list>)

Input method switching

[edit | edit source]
  • Enable IM switching by hotkey (enable-im-switch? <boolean>)
  • IM switching key (switch-im-key <string>, switch-im-key? (make-key-predicate '("<Control>Shift_key" "<Shift>Control_key"))) )
  • Skip direct method for IM switching by hotkey (switch-im-skip-direct-im? <boolean>)

Input method toggle

[edit | edit source]
  • Enable IM toggle by hotkey (enable-im-toggle? <toggle>)
  • Input method toggle key (toggle-im-key <string>, toggle-im-key? (make-key-predicate '("<Meta> "))) )
  • Alternative input method (toggle-im-alt-im <string>)

Visual preference

[edit | edit source]
  • Preedit color (uim-color {uim-color-uim|uim-color-atok})
  • Candidate window position (candidate-window-position {caret,left,right})
  • Show input method near the cursor (bridge-show-input-state? <boolean>)
  • Time length for showing input mode near the cursor (bridge-show-input-state-time-length <integer>)

Advanced settings

[edit | edit source]
  • Enable lazy input method loading for faster startup (enable-lazy-loading? <boolean>)

Toolbar settings

[edit | edit source]
The toolbar settings view.
[edit | edit source]
  • Enable menu-based input method switcher (toolbar-show-action-based-switcher-button?)
  • Effective coverage (imsw-coverage {system-global,app-global,focused-context})

Buttons

[edit | edit source]
  • Full featured input method switcher (toolbar-show-switcher-button? <boolean>)
  • Preference tool (toolbar-show-pref-button? <boolean>)
  • Japanese dictionary tool (toolbar-show-dict-button? <boolean>)
  • Input pad (toolbar-show-input-pad-button? <boolean>)
  • Handwriting input pad (toolbar-show-handwriting-input-pad-button? <boolean>)
  • Help (toolbar-show-help-button?)
TODO: The .uim.d/customs/custom-toolbar.scm defines a further fifteen settings variables, which seem to be defined in other configuration files as well ... Why?

(define anthy-widgets '(widget_anthy_input_mode widget_anthy_kana_input_method)) (define default-widget_anthy_input_mode 'action_anthy_direct) (define anthy-input-mode-actions '(action_anthy_direct action_anthy_hiragana action_anthy_katakana action_anthy_halfkana action_anthy_halfwidth_alnum action_anthy_fullwidth_alnum)) (define default-widget_anthy_kana_input_method 'action_anthy_roma) (define anthy-kana-input-method-actions '(action_anthy_roma action_anthy_kana action_anthy_azik)) (define anthy-utf8-widgets '(widget_anthy_utf8_input_mode widget_anthy_utf8_kana_input_method)) (define default-widget_anthy_utf8_input_mode 'action_anthy_utf8_direct) (define anthy-utf8-input-mode-actions '(action_anthy_utf8_direct action_anthy_utf8_hiragana action_anthy_utf8_katakana action_anthy_utf8_halfkana action_anthy_utf8_halfwidth_alnum action_anthy_utf8_fullwidth_alnum)) (define default-widget_anthy_utf8_kana_input_method 'action_anthy_utf8_roma) (define anthy-utf8-kana-input-method-actions '(action_anthy_utf8_roma action_anthy_utf8_kana action_anthy_utf8_azik)) (define skk-widgets '(widget_skk_input_mode widget_skk_kana_input_method)) (define default-widget_skk_input_mode 'action_skk_latin) (define skk-input-mode-actions '(action_skk_latin action_skk_hiragana action_skk_katakana action_skk_hankana action_skk_wide_latin)) (define default-widget_skk_kana_input_method 'action_skk_roma) (define skk-kana-input-method-actions '(action_skk_roma action_skk_azik))

EB library settings

[edit | edit source]
The EB library settings view.

Candidate window

[edit | edit source]
  • Use EB library to search annotations (eb-enable-for-annotation? <boolean>)
  • The dictionary that defines the EB dictionary file (eb-dic-path e.g. "/usr/share/dict")
The XIM settings view.

Pre-edit settings of XIM

[edit | edit source]
  • Use anti-aliased fonts for Over-the-Spot/Root-Window pre-edit. (uim-xim-use-xft-font? <boolean>)
  • Font name for pre-edit area (uim-xim-xft-font-name e.g. "VL Gothic")

Notify settings

[edit | edit source]
The notify settings view.

Notify agent name

[edit | edit source]
  • notify-agent

Configuration file

[edit | edit source]

You can also configure uim by editting a configureation file ~/.uim (see also LIBUIM_USER_SCM_FILE).

The configuration in ~/.uim overrides the configuration by the graphical interface uim-pref. This means that, if the two configurations conflict, the configuration in ~/.uim is always used.

You can use uim-sh to check if your Scheme code is valid:

$ uim-sh ~/.uim

If you want to write Japanese characters in the file, make sure that file encoding is EUC-JP.

You may want to append these lines to ~/.uim.

;; vim:ft=scheme:fenc=euc-jp

if you are using Vim and

;; Local Variables:
;; mode: scheme
;; coding: euc-jp
;; End:

if you are using Emacs. These lines tell your editor to open ~/.uim with the Scheme mode and set the file encoding to EUC-JP.

Environment variables

[edit | edit source]

Some values are for uim developers.

In the description below, sys-pkglibdir is "/usr/local/libexec" if you installed uim into "/usr/local". Other possible values of sys-pkglibdir are "/usr/libexec and "/usr/lib/uim". You can use uim-sh to get the value of sys-pkglibdir:

$ uim-sh
uim> (sys-pkglibdir)
"/usr/local/libexec"
uim> (exit)
$

LIBUIM_ENABLE_EMERGENCY_KEY

[edit | edit source]

Enables the emergency key. After you set this variable and start the bridge, you can disable all key processing in uim by pressing Shift+Backspace.

LIBUIM_PLUGIN_LIB_DIR

[edit | edit source]

Specifies the directory where plugin files are put. The default are sys-pkglibdir/plugin, ~/.uim.d/plugin and LD_LIBRARY_PATH.

LIBUIM_SCM_FILES

[edit | edit source]

Specifies the directory where Scheme source files are put. The default are sys-pkgdatadir and ~/.uim.d/plugin.

LIBUIM_USER_SCM_FILE

[edit | edit source]

Specifies the current user's configuration file written in Scheme. The default value is ~/.uim.

You can use this variable to test your configuration file and/or to apply your configuration to limited applications.

Consider that you create a file named latin.scm, put the file in your home directory (~) and write the following code in the file:

(define default-im-name 'latin)

Then run Firefox as follows:

$ LIBUIM_USER_SCM_FILE=~/latin.scm firefox

You can see that Firefox is invoked with the IM engine latin.

LIBUIM_VANILLA

[edit | edit source]

Disables some features in uim. The behavior of uim depends on the specified values:

Value Behavior
2 Ignores the configuration files (e.g. default.scm, ~/.uim and ~/.uim.d)

and disables lazy loading.

Otherwise Ignores the configuration files (e.g. default.scm, ~/.uim and

~/.uim.d), disables lazy loading and disable the modules except for direct.

LIBUIM_VERBOSE

[edit | edit source]

Specifies the verbose level of messages. You need to build with "--enable-debug" to use this variable.

Value Behavior
3 Also outputs the status of file loading.
4 Also outputs the status of the garbage collection usage.
5 Also outputs the code evaluation process.

UIM_IM_ENGINE

[edit | edit source]

Specifies IM engine name.

References

[edit | edit source]