I am trying out minimalist window managers such as, but not limited to, Xmonad, ScrotWM, ratpoison, etc. Since I occasionally need to enter Traditional Chinese characters, how do I install an input manager that lets me switch between input methods easily, such as through a hotkey combo? Any instructions would be appreciated.
-
1I doubt this is really window manager specific; the window manager mostly just manages windows. If you're using the WM to catch the hotkey and run the program that part is WM-specific, but you're really just looking for a program that lets you switch input methods so you can tell your WM to run it when you press a certain hotkey– Michael MrozekDec 7, 2010 at 5:39
2 Answers
As Michael suggests, the window manager is not responsible for managing the input method. First you will need to choose an input method, of which IBus
, SCIM
and uim
appear to be the most popular.
Next, you need to make sure it is started when X
is launched. You've mentioned you are using a lightweight WM, therefore you'll likely want to add it to an X init file, such as
~/.xinitrc
:
export GTK_IM_MODULE=scim
export XMODIFIERS=@im=SCIM
export QT_IM_MODULE=scim
scim -d
Depending on the input method you choose, the method to switch languages will differ. Typically, you'll need to export LANG
, such as
export LANG=ja_JA.UTF-8
... but sometimes right clicking on an input field and choosing "Input Methods" may suffice.
I use Ratpoison WM. To type Chinese, I simply added IBUS to the ~/.ratpoisonrc
file, which then starts IBUS when you start Ratpoison. The line looks like this:
exec ibus-daemon --xim
If you aren't using Ratpoison, arrange to launch ibus-daemon --xim
when your X session start by whatever means your window manager or session manager provides.
Then, to start typing in Chinese, type both Control+SpaceBar as normal.
-
Isn't Control+SpaceBar reserved by ratpoison to visit the next window by default? i'm asking, because I use ratpoison as well, and I can't seem to find how to activate ibus (inputing japanese). Am I supposed to switch to a japanese keyboard layout first? Aug 15, 2018 at 2:45