⇦ Back to Post Listing
Feels like a bit of a rabbit hole, and there seems to be a lot of tidbits scattered about.
This solution worked for me and might not work with your particular setup. I'm using Hyprland on NixOS, with kitty as my terminal and firefox as my browser. These two pieces of software (along with Obsidian) are the vast majority of my text input.
Here is what I added to my configuration.nix
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [fcitx5-configtool fcitx5-mozc];
ibus.engines = with pkgs.ibus-engines; [mozc];
};
##snip
environment.systemPackages = (with pkgs; [
mozc
])
##snip
There was a warning that enabled = "fcitx5"
would change in the future, so sometime in the future it might look like
enable = true;
type = "fcitx5";
And the changes to my hyprland.nix, as I configure hyprland with Nix
input = {
"kb_layout"="us,jp";
"kb_options"="grp:win_space_toggle";
};
I originally wanted to use cap_lock
as my toggle, however the Japanese keyboard layout actually moves the caps loc button to the LCTRL of a qwerty, and it never was able to toggle back.
Win + Space works fine enough for me though.
Now, how do we get all our kana and kanji to pop up? By adding the keyboard mozc to your list of keyboards, not the "official" Japanese keyboard, as shown in the screenshot ![[fxitx5.png]]
A toggle popped up in Waybar magically. I click it to switch between modes. It works well enough as is, even though it's missing an icon, so I haven't explored that further, but hopefully it's enough to get future me, or someone else a good way of the way good.