0

I have been working on getting a new Debian (Stretch) install working satisfactorily on my new computer (Lenovo X270), including setting up xmonad/xmobar. Since I am studying Japanese, I wanted to set up an IME, which I managed to do using fcitx/fcitx-mozc. However, I wanted to include a plugin in my xmobar setup that indicates whether the current input method (according to fcitx) is japanese or not. The Kbd plugin doesn't seem to do this, since fcitx doesn't directly interface with XKB (as far as I can tell), so it shows "us" all the time. I also haven't been able to find out any way of querying the current fcitx IM from a terminal. Is there any way to do this (as if this is possible, I might be able to hack together an xmobar indicator), or is it far more trouble than it is worth?

[For the record, I tried setting up ibus, but I had trouble with it, so I switched over to fcitx.]

If necessary, I am more than happy to provide more details about my setup.

1

Hint: you can query DBus, e.g. by qdbus console tool, so:

$ qdbus "org.fcitx.Fcitx" "/inputmethod" "GetCurrentIM"

Another approach with xkb-switch: xkb-switch -p

  • This is really helpful. My only followup is, is there a clean way of integrating this into an xmobar config so that it doesn't constantly update when the state remains the same, but also doesn't lag behind when the method is switched? – archaephyrryx Aug 25 '17 at 5:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.