mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
fcitx5: add upstream options (#6892)
This commit is contained in:
parent
59de2dfb0a
commit
6d1f834ca6
8 changed files with 281 additions and 75 deletions
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
input-method-fcitx5-configuration = ./fcitx5-configuration.nix;
|
||||
input-method-fcitx5-old-enable = ./fcitx5-configuration.nix;
|
||||
input-method-fcitx5-configuration = ./fcitx5/configuration.nix;
|
||||
input-method-fcitx5-old-enable = ./fcitx5/old-enable.nix;
|
||||
input-method-kime-configuration = ./kime-configuration.nix;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
realPkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
lib.mkIf config.test.enableBig {
|
||||
i18n.inputMethod = {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
fcitx5 = {
|
||||
waylandFrontend = true;
|
||||
themes.example = {
|
||||
theme = ''
|
||||
[Metadata]
|
||||
Name=example
|
||||
Version=0.1
|
||||
Author=home-manager
|
||||
Description=Theme for testing
|
||||
ScaleWithDPI=True
|
||||
'';
|
||||
};
|
||||
classicUiConfig = "Theme=example";
|
||||
};
|
||||
};
|
||||
|
||||
_module.args.pkgs = lib.mkForce realPkgs;
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/systemd/user/fcitx5-daemon.service
|
||||
assertFileExists home-files/.local/share/fcitx5/themes/example/theme.conf
|
||||
assertFileExists home-files/.local/share/fcitx5/conf/classicui.conf
|
||||
assertFileNotRegex home-path/etc/profile.d/hm-session-vars.sh 'GTK_IM_MODULE'
|
||||
assertFileNotRegex home-path/etc/profile.d/hm-session-vars.sh 'QT_IM_MODULE'
|
||||
'';
|
||||
}
|
||||
2
tests/modules/i18n/input-method/fcitx5/classicui.conf
Normal file
2
tests/modules/i18n/input-method/fcitx5/classicui.conf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Theme=example
|
||||
|
||||
20
tests/modules/i18n/input-method/fcitx5/config
Normal file
20
tests/modules/i18n/input-method/fcitx5/config
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
[Behavior]
|
||||
ActiveByDefault=false
|
||||
AllowInputMethodForPassword=false
|
||||
AutoSavePeriod=30
|
||||
CompactInputMethodInformation=true
|
||||
DefaultPageSize=5
|
||||
OverrideXkbOption=false
|
||||
PreeditEnabledByDefault=true
|
||||
PreloadInputMethod=true
|
||||
ShareInputState=No
|
||||
ShowFirstInputMethodInformation=true
|
||||
ShowInputMethodInformation=true
|
||||
ShowPreeditForPassword=false
|
||||
resetStateWhenFocusIn=No
|
||||
showInputMethodInformationWhenFocusIn=false
|
||||
|
||||
[Hotkey]
|
||||
EnumerateSkipFirst=false
|
||||
EnumerateWithTriggerKeys=true
|
||||
ModifierOnlyKeyTimeout=250
|
||||
83
tests/modules/i18n/input-method/fcitx5/configuration.nix
Normal file
83
tests/modules/i18n/input-method/fcitx5/configuration.nix
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
realPkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
lib.mkIf config.test.enableBig {
|
||||
i18n.inputMethod = {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
fcitx5 = {
|
||||
waylandFrontend = true;
|
||||
settings = {
|
||||
globalOptions = {
|
||||
Behavior = {
|
||||
ActiveByDefault = false;
|
||||
resetStateWhenFocusIn = "No";
|
||||
ShareInputState = "No";
|
||||
PreeditEnabledByDefault = true;
|
||||
ShowInputMethodInformation = true;
|
||||
showInputMethodInformationWhenFocusIn = false;
|
||||
CompactInputMethodInformation = true;
|
||||
ShowFirstInputMethodInformation = true;
|
||||
DefaultPageSize = 5;
|
||||
OverrideXkbOption = false;
|
||||
PreloadInputMethod = true;
|
||||
AllowInputMethodForPassword = false;
|
||||
ShowPreeditForPassword = false;
|
||||
AutoSavePeriod = 30;
|
||||
};
|
||||
Hotkey = {
|
||||
EnumerateWithTriggerKeys = true;
|
||||
EnumerateSkipFirst = false;
|
||||
ModifierOnlyKeyTimeout = 250;
|
||||
};
|
||||
};
|
||||
inputMethod = {
|
||||
GroupOrder."0" = "Default";
|
||||
"Groups/0" = {
|
||||
Name = "Default";
|
||||
"Default Layout" = "us";
|
||||
DefaultIM = "pinyin";
|
||||
};
|
||||
"Groups/0/Items/0" = {
|
||||
Name = "keyboard-us";
|
||||
Layout = null;
|
||||
};
|
||||
"Groups/0/Items/1" = {
|
||||
Name = "pinyin";
|
||||
Layout = null;
|
||||
};
|
||||
};
|
||||
addons.classicui.globalSection.Theme = "example";
|
||||
};
|
||||
themes.example = {
|
||||
theme = ''
|
||||
[Metadata]
|
||||
Name=example
|
||||
Version=0.1
|
||||
Author=home-manager
|
||||
Description=Theme for testing
|
||||
ScaleWithDPI=True
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_module.args.pkgs = lib.mkForce realPkgs;
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/systemd/user/fcitx5-daemon.service
|
||||
assertFileExists home-files/.config/fcitx5/config
|
||||
assertFileContent home-files/.config/fcitx5/config ${./config}
|
||||
assertFileExists home-files/.config/fcitx5/profile
|
||||
assertFileContent home-files/.config/fcitx5/profile ${./profile}
|
||||
assertFileExists home-files/.config/fcitx5/conf/classicui.conf
|
||||
assertFileContent home-files/.config/fcitx5/conf/classicui.conf ${./classicui.conf}
|
||||
assertFileExists home-files/.local/share/fcitx5/themes/example/theme.conf
|
||||
assertFileNotRegex home-path/etc/profile.d/hm-session-vars.sh 'GTK_IM_MODULE'
|
||||
assertFileNotRegex home-path/etc/profile.d/hm-session-vars.sh 'QT_IM_MODULE'
|
||||
'';
|
||||
}
|
||||
15
tests/modules/i18n/input-method/fcitx5/profile
Normal file
15
tests/modules/i18n/input-method/fcitx5/profile
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[GroupOrder]
|
||||
0=Default
|
||||
|
||||
[Groups/0]
|
||||
Default Layout=us
|
||||
DefaultIM=pinyin
|
||||
Name=Default
|
||||
|
||||
[Groups/0/Items/0]
|
||||
Layout=null
|
||||
Name=keyboard-us
|
||||
|
||||
[Groups/0/Items/1]
|
||||
Layout=null
|
||||
Name=pinyin
|
||||
Loading…
Add table
Add a link
Reference in a new issue