nix-config/home/fcitx.nix

228 lines
4.3 KiB
Nix
Raw Normal View History

2023-06-25 18:44:28 +02:00
{ config, ... }:
let
inherit (config.lib.stylix.colors) 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 = {
"fcitx5/themes/${themeName}/theme.conf".text = /* ini */ ''
2023-08-14 16:54:07 +02:00
[Metadata]
Name=${themeName}
2023-08-14 16:54:07 +02:00
Version=0.1
ScaleWithDPI=True
[InputPanel]
Font=${font}
2023-08-14 16:54:07 +02:00
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-06-17 02:09:34 +02:00
xdg.configFile = {
"mozc/ibus_config.textproto" = {
force = true;
text = /* textproto */ ''
2023-06-17 02:09:34 +02:00
engines {
name : "mozc-jp"
longname : "Mozc"
layout : "default"
layout_variant : ""
layout_option : ""
rank : 80
}
active_on_launch: True
'';
};
"fcitx5/config" = {
force = true;
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
'';
};
"fcitx5/profile" = {
force = true;
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"
'';
};
"fcitx5/conf/classicui.conf" = {
2023-06-17 02:09:34 +02:00
force = true;
text = /* ini */ ''
Vertical Candidate List=False
PerScreenDPI=True
WheelForPaging=True
Font="${font}"
MenuFont="${font}"
TrayFont="${font}"
2023-06-25 18:44:28 +02:00
TrayOutlineColor=#${base02}
TrayTextColor=#${base05}
PreferTextIcon=False
2023-06-17 02:09:34 +02:00
ShowLayoutNameInIcon=True
UseInputMethodLangaugeToDisplayText=True
Theme=${themeName}
2023-06-17 02:09:34 +02:00
'';
};
"fcitx5/conf/clipboard.conf" = {
force = true;
text = /* ini */ ''
TriggerKey=
PastePrimaryKey=
Number of entries=5
'';
};
"fcitx5/conf/mozc.conf" = {
force = true;
text = /* ini */ ''
InitialMode=Hiragana
Vertical=True
ExpandMode="On Focus"
PreeditCursorPositionAtBeginning=False
ExpandKey=Control+Alt+H
'';
};
"fcitx5/conf/notifications.conf" = {
force = true;
text = "HiddenNotifications=";
};
"fcitx5/conf/unicode.conf" = {
force = true;
text = "TriggerKey=";
};
};
}