summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-11-25 17:16:54 +0100
committerAlex Auvolat <alex@adnab.me>2023-11-25 17:16:54 +0100
commit1ffdbf90fb18b2268b6cd2bbd0ff13b87ce78381 (patch)
tree32219aea9790ed900a676789d88443c906a58a5f
parent4221ef11fe8b0993f420954a76e2c37db2b1df56 (diff)
downloaduser-config-1ffdbf90fb18b2268b6cd2bbd0ff13b87ce78381.tar.gz
user-config-1ffdbf90fb18b2268b6cd2bbd0ff13b87ce78381.zip
configure japanese input method using fcitx5
-rw-r--r--fcitx5/profile38
-rw-r--r--nixos/common.nix27
-rw-r--r--nixpkgs/common.nix1
-rw-r--r--nixpkgs/icewm.nix5
4 files changed, 68 insertions, 3 deletions
diff --git a/fcitx5/profile b/fcitx5/profile
new file mode 100644
index 0000000..5d6901e
--- /dev/null
+++ b/fcitx5/profile
@@ -0,0 +1,38 @@
+[Groups/0]
+# Group Name
+Name="Group 2"
+# Layout
+Default Layout=us
+# Default Input Method
+DefaultIM=keyboard-us
+
+[Groups/0/Items/0]
+# Name
+Name=keyboard-us
+# Layout
+Layout=
+
+[Groups/1]
+# Group Name
+Name="Group 1"
+# Layout
+Default Layout=fr-custom-lx
+# Default Input Method
+DefaultIM=mozc
+
+[Groups/1/Items/0]
+# Name
+Name=keyboard-fr-custom-lx
+# Layout
+Layout=
+
+[Groups/1/Items/1]
+# Name
+Name=mozc
+# Layout
+Layout=
+
+[GroupOrder]
+0="Group 1"
+1="Group 2"
+
diff --git a/nixos/common.nix b/nixos/common.nix
index 120c816..e319296 100644
--- a/nixos/common.nix
+++ b/nixos/common.nix
@@ -167,14 +167,35 @@ in
})
];
+ # ---- config for japanese (thx functor.tokyo)
+
fonts.fonts = with pkgs; [
profont
symbola
- ipafont
- hanazono
- takao
font-awesome
+
+ ipafont
+ kochi-substitute
];
+ fonts.fontconfig.defaultFonts = {
+ monospace = [
+ "DejaVu Sans Mono"
+ "IPAGothic"
+ ];
+ sansSerif = [
+ "DejaVu Sans"
+ "IPAPGothic"
+ ];
+ serif = [
+ "DejaVu Serif"
+ "IPAPMincho"
+ ];
+ };
+
+ i18n.inputMethod.enabled = "fcitx5";
+ i18n.inputMethod.fcitx5.addons = [ pkgs.fcitx5-mozc ];
+
+ # ----
environment.systemPackages = with pkgs; [
home-manager
diff --git a/nixpkgs/common.nix b/nixpkgs/common.nix
index 07f6a07..21b941d 100644
--- a/nixpkgs/common.nix
+++ b/nixpkgs/common.nix
@@ -47,6 +47,7 @@
".vim/coc-settings.json".source = ../vim/coc-settings.json;
".config/tmux/tmux.conf".source = ../tmux/tmux.conf;
".config/qutebrowser/config.py".source = ../qutebrowser/config.py;
+ ".config/fcitx5/profile".source = ../fcitx5/profile;
};
services.syncthing.enable = true;
diff --git a/nixpkgs/icewm.nix b/nixpkgs/icewm.nix
index 6897ca0..2a33c0d 100644
--- a/nixpkgs/icewm.nix
+++ b/nixpkgs/icewm.nix
@@ -6,6 +6,11 @@
home.file = {
".config/sx/sxrc".executable = true;
".config/sx/sxrc".text = ''
+ export XMODIFIERS="@im=fcitx"
+ export XMODIFIER="@im=fcitx"
+ export GTK_IM_MODULE="fcitx"
+ export QT_IM_MODULE="fcitx"
+ fcitx5 &
${pkgs.xorg.xsetroot}/bin/xsetroot -solid "#008080"
${pkgs.xorg.xkbcomp}/bin/xkbcomp ${../xkb/symbols/custom-fr} $DISPLAY
xset s off