For people coming across this gist after 2023, DO NOT use this as gtk2 renderer was removed from mozc.
mozc uses ibus's candidate window in wayland by default these days (or else, you can force it by
MOZC_IBUS_CANDIDATE_WINDOW=ibus). I moved on to fcitx back 2 years ago because it just feels better on
plasma shell.
A gist to patch the default ibus-mozc AUR package to build with GTK 2 instead of QT. Using QT_QPA_PLATFORM=wayland makes mozc suggestions window be placed in some random place and using xwayland for mozc doesn't feel right with the dull light theme and faint letters.
I learnt by surfing through GitHub issue tracker of google/mozc that you can build for GTK2 and thus, made this patch. As for why not an actual AUR package, mozc apparantly is going to drop support for GTK 2 and would use QT only in the near future. So, for the small time that it's going to support GTK2, it doesn't make sense to create a package.
If you use the Arch Build System (no AUR helpers),
Use this diff by using git apply PKGBUILD.diff in the cloned git folder of ibus-mozc package from AUR and then use makepkg -si.
If you use paru, you would need to clear cache for ibus-mozc (probably located in ~/.cache/paru/clone/ibus-mozc) and then se paru --fm=vim ibus-mozc and enter :shell in vim and then run the following commands,
cd ibus-mozc
git apply path_to_diff
exitThen exit vim with :q (Now you know how to exit vim 🙃)
paru rebases the build() and package() but throws a rebase/merge conflict (if you commit the changes) for prepare() and depends=. So, it is better to just clear cache than deal with it.
Note: Using vim here because
- using a direct shell as file manager in paru didn't work well
- using a GUI file manager like nautilus is not intuitive (needs you to kill nautilus using
nautilus -qand stuff)- I don't use TUI file managers