-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathibus.diff
81 lines (77 loc) · 2.08 KB
/
ibus.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
diff --git a/nixpkgs/home.nix b/nixpkgs/home.nix
index 8cd5a1cb4a8f..7120b5b877af 100644
--- a/nixpkgs/home.nix
+++ b/nixpkgs/home.nix
@@ -15,15 +15,6 @@ in
] else [ ]
);
-
- # 为了保证任何时候都安装 im-select ,否则无法
- i18n.inputMethod = {
- enabled = "fcitx5";
- fcitx5.addons = with pkgs; [
- fcitx5-rime
- ];
- };
-
# nixpkgs.overlays = [ neovim.overlay ];
programs.home-manager.enable = true;
}
diff --git a/nixpkgs/home/app/gnome.nix b/nixpkgs/home/app/gnome.nix
index 48fc862dcbab..08d320b33283 100644
--- a/nixpkgs/home/app/gnome.nix
+++ b/nixpkgs/home/app/gnome.nix
@@ -12,6 +12,8 @@
bing-wallpaper-changer
gtile
hide-top-bar
+ customize-ibus
+
# lightdark-theme-switcher
]);
@@ -32,6 +34,7 @@
"theme-switcher@fthx"
];
## dock icons
@@ -151,5 +154,24 @@
enable-hot-corners = true;
show-battery-percentage = true;
};
+
+ # input method
+ "org/gnome/desktop/input-sources" = {
+ sources = with lib.hm.gvariant; mkArray
+ "(${lib.concatStrings [type.string type.string]})" [
+ (mkTuple ["xkb" "us"])
+ (mkTuple ["ibus" "rime"])
+ ];
+ };
+ "org/gnome/shell/extensions/customize-ibus" = {
+ candidate-orientation = lib.hm.gvariant.mkUint32 1;
+ custom-font="Iosevka Nerd Font 10";
+ enable-orientation=true;
+ input-indicator-only-on-toggle=false;
+ input-indicator-only-use-ascii=false;
+ use-custom-font=true;
+ use-indicator-show-delay=true;
+ };
+
};
}
diff --git a/nixpkgs/sys/gui.nix b/nixpkgs/sys/gui.nix
index e9f3ed2587a2..e6a8f3560c92 100644
--- a/nixpkgs/sys/gui.nix
+++ b/nixpkgs/sys/gui.nix
@@ -65,5 +65,10 @@
# 解决 kitty 和 wezterm 无法使用 fcitx5 输入法的问题
# https://github.com/kovidgoyal/kitty/issues/403
environment.variables.GLFW_IM_MODULE = "ibus";
+ i18n.inputMethod.enabled = "ibus";
+ i18n.inputMethod.ibus.engines = with pkgs.ibus-engines; [
+ rime
+ ];
+
}