Sample Header Ad - 728x90

How can I use ~/.XCompose with IBus and KDE plasma (on NixOS)

4 votes
0 answers
762 views
I want to use IBus with libpinyin on my NixOS install with KDE plasma. IBus is installed and works fine, with the following config in /etc/nixos/configuration.nix # use IBus for input i18n.inputMethod = { enabled = "ibus"; ibus.engines = with pkgs.ibus-engines; [libpinyin]; }; I also want to be able to compose some specific characters when I am using libpinyin in 'English' mode or when I am using the English input engine. Following various guides I tried the following configuration: ~/.xsessionrc: xmodmap -e "keysym ISO_Level3_Shift = Multi_key" ~/.XCompose: include "%L" # Compose keys for pinyin with tone marks : "ā" : "ē" : "ī" : "ō" : "ū" : "á" : "é" : "í" : "ó" : "ú" : "ǎ" : "ě" : "ǐ" : "ǒ" : "ǔ" : "à" : "è" : "ì" : "ò" : "ù" With this configuration, no compose characters work. If I run bash ~/.xsessionrc then I can see that xev reports the correct compose characters like so; If I type , then various events appear in the log, one of which includes this line: XmbLookupString gives 3 bytes: (61 cc 81) "á" So the xsessionrc file isn't running at the right time (on login I suppose), but furthermore, no other applications actually allow me to use the compose combinations. Both kwrite and chromium ignore the XCompose config, even after using the suggested config below in my ~/.profile; export GTK_IM_MODULE=ibus export XMODIFIERS=@im=ibus export QT_IM_MODULE=ibus (This config is getting set, as env shows these variables as being set.) To be clear it is only xev that shows that the config _might_ be somewhat correct. No real application that actually needs input will let me compose these characters. How can I get the compose behaviour I want?
Asked by Lex (758 rep)
Oct 5, 2018, 10:54 AM
Last activity: Feb 28, 2023, 11:09 PM