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.