nix-config/home/fcitx.nix

240 lines
4.7 KiB
Nix
Raw Normal View History

2023-06-25 18:44:28 +02:00
{ config, ... }:
let
inherit (config.lib.stylix.colors.withHashtag) base01 base02 base05;
font = "Noto Sans CJK JP 16";
themeName = "base16";
in
2023-06-17 02:09:34 +02:00
{
2023-08-14 16:54:07 +02:00
xdg.dataFile = {
2024-08-03 20:22:47 +02:00
"fcitx5/themes/${themeName}/theme.conf".text = # ini
''
[Metadata]
Name=${themeName}
Version=0.1
ScaleWithDPI=True
[InputPanel]
Font=${font}
NormalColor=${base05}
HighlightCandidateColor=${base05}
HighlightColor=${base05}
HighlightBackgroundColor=${base01}
Spacing=6
[InputPanel/TextMargin]
Left=5
Right=5
Top=5
Bottom=5
[InputPanel/ContentMargin]
Left=2
Right=2
Top=2
Bottom=2
[InputPanel/Background/Margin]
Left=2
Right=2
Top=2
Bottom=2
[InputPanel/Background]
Color=${base01}
[InputPanel/Highlight]
Color=${base02}
[InputPanel/Highlight/Margin]
Left=5
Right=7
Top=5
Bottom=5
[Menu]
NormalColor=${base01}
[Menu/Background]
Color=${base01}
[Menu/Highlight]
Color=${base02}
[Menu/Separator]
Color=${base02}
[Menu/Background/Margin]
Left=2
Right=2
Top=2
Bottom=2
[Menu/ContentMargin]
Left=2
Right=2
Top=2
Bottom=2
[Menu/Highlight/Margin]
Left=5
Right=5
Top=5
Bottom=5
[Menu/TextMargin]
Left=5
Right=5
Top=5
Bottom=5
'';
2023-08-14 16:54:07 +02:00
};
2023-06-17 02:09:34 +02:00
xdg.configFile = {
"mozc/ibus_config.textproto" = {
force = true;
2024-08-03 20:22:47 +02:00
text = # textproto
''
engines {
name : "mozc-jp"
longname : "Mozc"
layout : "default"
layout_variant : ""
layout_option : ""
rank : 80
}
active_on_launch: True
'';
2023-06-17 02:09:34 +02:00
};
"fcitx5/config" = {
force = true;
2024-08-03 20:22:47 +02:00
text = # ini
''
[Hotkey]
EnumerateWithTriggerKeys=True
AltTriggerKeys=
EnumerateForwardKeys=
EnumerateBackwardKeys=
EnumerateSkipFirst=False
EnumerateGroupForwardKeys=
EnumerateGroupBackwardKeys=
ActivateKeys=
DeactivateKeys=
[Hotkey/TriggerKeys]
0=Super+space
[Hotkey/PrevPage]
0=Up
[Hotkey/NextPage]
0=Down
[Hotkey/PrevCandidate]
0=Shift+Tab
[Hotkey/NextCandidate]
0=Tab
[Hotkey/TogglePreedit]
0=Control+Alt+P
[Behavior]
ActiveByDefault=False
ShareInputState=No
PreeditEnabledByDefault=True
ShowInputMethodInformation=True
showInputMethodInformationWhenFocusIn=False
CompactInputMethodInformation=True
ShowFirstInputMethodInformation=True
DefaultPageSize=5
OverrideXkbOption=False
CustomXkbOption=
EnabledAddons=
DisabledAddons=
PreloadInputMethod=True
'';
2023-06-17 02:09:34 +02:00
};
"fcitx5/profile" = {
force = true;
2024-08-03 20:22:47 +02:00
text = # ini
''
[Groups/0]
Name="Group 1"
Default Layout=us
DefaultIM=mozc
[Groups/0/Items/0]
Name=keyboard-us
Layout=
[Groups/0/Items/1]
Name=mozc
Layout=
[GroupOrder]
0="Group 1"
'';
2023-06-17 02:09:34 +02:00
};
"fcitx5/conf/classicui.conf" = {
2023-06-17 02:09:34 +02:00
force = true;
2024-08-03 20:22:47 +02:00
text = # ini
''
Vertical Candidate List=False
PerScreenDPI=True
WheelForPaging=True
Font="${font}"
MenuFont="${font}"
TrayFont="${font}"
TrayOutlineColor=${base02}
TrayTextColor=${base05}
PreferTextIcon=False
ShowLayoutNameInIcon=True
UseInputMethodLangaugeToDisplayText=True
Theme=${themeName}
'';
2023-06-17 02:09:34 +02:00
};
"fcitx5/conf/clipboard.conf" = {
force = true;
2024-08-03 20:22:47 +02:00
text = # ini
''
TriggerKey=
PastePrimaryKey=
Number of entries=5
'';
2023-06-17 02:09:34 +02:00
};
"fcitx5/conf/mozc.conf" = {
force = true;
2024-08-03 20:22:47 +02:00
text = # ini
''
InitialMode=Hiragana
Vertical=True
ExpandMode="On Focus"
PreeditCursorPositionAtBeginning=False
ExpandKey=Control+Alt+H
'';
2023-06-17 02:09:34 +02:00
};
"fcitx5/conf/notifications.conf" = {
force = true;
text = "HiddenNotifications=";
};
"fcitx5/conf/unicode.conf" = {
force = true;
text = "TriggerKey=";
};
"fcitx5/conf/quickphrase.conf" = {
force = true;
text = "TriggerKey=";
};
2023-06-17 02:09:34 +02:00
};
}