mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-12-29 01:59:22 +01:00
fcitx: Move to ./home
This commit is contained in:
parent
3e6f8e6563
commit
2dd6a9f5c3
@ -1,6 +1,7 @@
|
||||
{
|
||||
home-manager.sharedModules = [
|
||||
./dunst.nix
|
||||
./fcitx.nix
|
||||
./feh.nix
|
||||
./git.nix
|
||||
./gpg.nix
|
||||
|
185
home/fcitx.nix
Normal file
185
home/fcitx.nix
Normal file
@ -0,0 +1,185 @@
|
||||
{
|
||||
xdg.configFile = {
|
||||
"mozc/ibus_config.textproto" = {
|
||||
force = true;
|
||||
text = /* config */ ''
|
||||
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]
|
||||
# Enumerate when press trigger key repeatedly
|
||||
EnumerateWithTriggerKeys=True
|
||||
# Temporally switch between first and current Input Method
|
||||
AltTriggerKeys=
|
||||
# Enumerate Input Method Forward
|
||||
EnumerateForwardKeys=
|
||||
# Enumerate Input Method Backward
|
||||
EnumerateBackwardKeys=
|
||||
# Skip first input method while enumerating
|
||||
EnumerateSkipFirst=False
|
||||
# Enumerate Input Method Group Forward
|
||||
EnumerateGroupForwardKeys=
|
||||
# Enumerate Input Method Group Backward
|
||||
EnumerateGroupBackwardKeys=
|
||||
# Activate Input Method
|
||||
ActivateKeys=
|
||||
# Deactivate Input Method
|
||||
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]
|
||||
# Active By Default
|
||||
ActiveByDefault=False
|
||||
# Share Input State
|
||||
ShareInputState=No
|
||||
# Show preedit in application
|
||||
PreeditEnabledByDefault=True
|
||||
# Show Input Method Information when switch input method
|
||||
ShowInputMethodInformation=True
|
||||
# Show Input Method Information when changing focus
|
||||
showInputMethodInformationWhenFocusIn=False
|
||||
# Show compact input method information
|
||||
CompactInputMethodInformation=True
|
||||
# Show first input method information
|
||||
ShowFirstInputMethodInformation=True
|
||||
# Default page size
|
||||
DefaultPageSize=5
|
||||
# Override Xkb Option
|
||||
OverrideXkbOption=False
|
||||
# Custom Xkb Option
|
||||
CustomXkbOption=
|
||||
# Force Enabled Addons
|
||||
EnabledAddons=
|
||||
# Force Disabled Addons
|
||||
DisabledAddons=
|
||||
# Preload input method to be used by default
|
||||
PreloadInputMethod=True
|
||||
'';
|
||||
};
|
||||
|
||||
"fcitx5/profile" = {
|
||||
force = true;
|
||||
text = /* ini */ ''
|
||||
[Groups/0]
|
||||
# Group Name
|
||||
Name="Group 1"
|
||||
# Layout
|
||||
Default Layout=us
|
||||
# Default Input Method
|
||||
DefaultIM=mozc
|
||||
|
||||
[Groups/0/Items/0]
|
||||
# Name
|
||||
Name=keyboard-us
|
||||
# Layout
|
||||
Layout=
|
||||
|
||||
[Groups/0/Items/1]
|
||||
# Name
|
||||
Name=mozc
|
||||
# Layout
|
||||
Layout=
|
||||
|
||||
[GroupOrder]
|
||||
0="Group 1"
|
||||
'';
|
||||
};
|
||||
|
||||
"fcitx5/conf/classicui.conf" = {
|
||||
force = true;
|
||||
text = /* ini */ ''
|
||||
# Vertical Candidate List
|
||||
Vertical Candidate List=False
|
||||
# Use Per Screen DPI
|
||||
PerScreenDPI=True
|
||||
# Use mouse wheel to go to prev or next page
|
||||
WheelForPaging=True
|
||||
# Font
|
||||
Font="Noto Sans CJK JP 11"
|
||||
# Menu Font
|
||||
MenuFont="Noto Sans CJK JP 11"
|
||||
# Tray Font
|
||||
TrayFont="Noto Sans CJK JP Medium 11"
|
||||
# Tray Label Outline Color
|
||||
TrayOutlineColor=#49483e
|
||||
# Tray Label Text Color
|
||||
TrayTextColor=#f8f8f2
|
||||
# Prefer Text Icon
|
||||
PreferTextIcon=True
|
||||
# Show Layout Name In Icon
|
||||
ShowLayoutNameInIcon=True
|
||||
# Use input method language to display text
|
||||
UseInputMethodLangaugeToDisplayText=True
|
||||
# Theme
|
||||
Theme=default
|
||||
'';
|
||||
};
|
||||
|
||||
"fcitx5/conf/clipboard.conf" = {
|
||||
force = true;
|
||||
text = /* ini */ ''
|
||||
# Trigger Key
|
||||
TriggerKey=
|
||||
# Paste Primary
|
||||
PastePrimaryKey=
|
||||
# Number of entries
|
||||
Number of entries=5
|
||||
'';
|
||||
};
|
||||
|
||||
"fcitx5/conf/mozc.conf" = {
|
||||
force = true;
|
||||
text = /* ini */ ''
|
||||
# Initial Mode
|
||||
InitialMode=Hiragana
|
||||
# Vertical candidate list
|
||||
Vertical=True
|
||||
# Expand Usage (Requires vertical candidate list)
|
||||
ExpandMode="On Focus"
|
||||
# Fix embedded preedit cursor at the beginning of the preedit
|
||||
PreeditCursorPositionAtBeginning=False
|
||||
# Hotkey to expand usage
|
||||
ExpandKey=Control+Alt+H
|
||||
'';
|
||||
};
|
||||
|
||||
"fcitx5/conf/notifications.conf" = {
|
||||
force = true;
|
||||
text = "HiddenNotifications=";
|
||||
};
|
||||
|
||||
"fcitx5/conf/unicode.conf" = {
|
||||
force = true;
|
||||
text = "TriggerKey=";
|
||||
};
|
||||
};
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./dual-function-keys.nix
|
||||
./fcitx.nix
|
||||
./fish.nix
|
||||
./fonts.nix
|
||||
./hyprland.nix
|
||||
|
@ -1,192 +0,0 @@
|
||||
{ pkgs, ... }: {
|
||||
i18n.inputMethod.enabled = "fcitx5";
|
||||
i18n.inputMethod.fcitx5.addons = [ pkgs.fcitx5-mozc ];
|
||||
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
xdg.configFile = {
|
||||
"mozc/ibus_config.textproto" = {
|
||||
force = true;
|
||||
text = /* config */ ''
|
||||
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]
|
||||
# Enumerate when press trigger key repeatedly
|
||||
EnumerateWithTriggerKeys=True
|
||||
# Temporally switch between first and current Input Method
|
||||
AltTriggerKeys=
|
||||
# Enumerate Input Method Forward
|
||||
EnumerateForwardKeys=
|
||||
# Enumerate Input Method Backward
|
||||
EnumerateBackwardKeys=
|
||||
# Skip first input method while enumerating
|
||||
EnumerateSkipFirst=False
|
||||
# Enumerate Input Method Group Forward
|
||||
EnumerateGroupForwardKeys=
|
||||
# Enumerate Input Method Group Backward
|
||||
EnumerateGroupBackwardKeys=
|
||||
# Activate Input Method
|
||||
ActivateKeys=
|
||||
# Deactivate Input Method
|
||||
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]
|
||||
# Active By Default
|
||||
ActiveByDefault=False
|
||||
# Share Input State
|
||||
ShareInputState=No
|
||||
# Show preedit in application
|
||||
PreeditEnabledByDefault=True
|
||||
# Show Input Method Information when switch input method
|
||||
ShowInputMethodInformation=True
|
||||
# Show Input Method Information when changing focus
|
||||
showInputMethodInformationWhenFocusIn=False
|
||||
# Show compact input method information
|
||||
CompactInputMethodInformation=True
|
||||
# Show first input method information
|
||||
ShowFirstInputMethodInformation=True
|
||||
# Default page size
|
||||
DefaultPageSize=5
|
||||
# Override Xkb Option
|
||||
OverrideXkbOption=False
|
||||
# Custom Xkb Option
|
||||
CustomXkbOption=
|
||||
# Force Enabled Addons
|
||||
EnabledAddons=
|
||||
# Force Disabled Addons
|
||||
DisabledAddons=
|
||||
# Preload input method to be used by default
|
||||
PreloadInputMethod=True
|
||||
'';
|
||||
};
|
||||
|
||||
"fcitx5/profile" = {
|
||||
force = true;
|
||||
text = /* ini */ ''
|
||||
[Groups/0]
|
||||
# Group Name
|
||||
Name="Group 1"
|
||||
# Layout
|
||||
Default Layout=us
|
||||
# Default Input Method
|
||||
DefaultIM=mozc
|
||||
|
||||
[Groups/0/Items/0]
|
||||
# Name
|
||||
Name=keyboard-us
|
||||
# Layout
|
||||
Layout=
|
||||
|
||||
[Groups/0/Items/1]
|
||||
# Name
|
||||
Name=mozc
|
||||
# Layout
|
||||
Layout=
|
||||
|
||||
[GroupOrder]
|
||||
0="Group 1"
|
||||
'';
|
||||
};
|
||||
|
||||
"fcitx5/conf/classicui.conf" = {
|
||||
force = true;
|
||||
text = /* ini */ ''
|
||||
# Vertical Candidate List
|
||||
Vertical Candidate List=False
|
||||
# Use Per Screen DPI
|
||||
PerScreenDPI=True
|
||||
# Use mouse wheel to go to prev or next page
|
||||
WheelForPaging=True
|
||||
# Font
|
||||
Font="Noto Sans CJK JP 11"
|
||||
# Menu Font
|
||||
MenuFont="Noto Sans CJK JP 11"
|
||||
# Tray Font
|
||||
TrayFont="Noto Sans CJK JP Medium 11"
|
||||
# Tray Label Outline Color
|
||||
TrayOutlineColor=#49483e
|
||||
# Tray Label Text Color
|
||||
TrayTextColor=#f8f8f2
|
||||
# Prefer Text Icon
|
||||
PreferTextIcon=True
|
||||
# Show Layout Name In Icon
|
||||
ShowLayoutNameInIcon=True
|
||||
# Use input method language to display text
|
||||
UseInputMethodLangaugeToDisplayText=True
|
||||
# Theme
|
||||
Theme=default
|
||||
'';
|
||||
};
|
||||
|
||||
"fcitx5/conf/clipboard.conf" = {
|
||||
force = true;
|
||||
text = /* ini */ ''
|
||||
# Trigger Key
|
||||
TriggerKey=
|
||||
# Paste Primary
|
||||
PastePrimaryKey=
|
||||
# Number of entries
|
||||
Number of entries=5
|
||||
'';
|
||||
};
|
||||
|
||||
"fcitx5/conf/mozc.conf" = {
|
||||
force = true;
|
||||
text = /* ini */ ''
|
||||
# Initial Mode
|
||||
InitialMode=Hiragana
|
||||
# Vertical candidate list
|
||||
Vertical=True
|
||||
# Expand Usage (Requires vertical candidate list)
|
||||
ExpandMode="On Focus"
|
||||
# Fix embedded preedit cursor at the beginning of the preedit
|
||||
PreeditCursorPositionAtBeginning=False
|
||||
# Hotkey to expand usage
|
||||
ExpandKey=Control+Alt+H
|
||||
'';
|
||||
};
|
||||
|
||||
"fcitx5/conf/notifications.conf" = {
|
||||
force = true;
|
||||
text = "HiddenNotifications=";
|
||||
};
|
||||
|
||||
"fcitx5/conf/unicode.conf" = {
|
||||
force = true;
|
||||
text = "TriggerKey=";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
@ -26,6 +26,9 @@ let VARIABLES = import ./variables.nix; in {
|
||||
i18n.defaultLocale = VARIABLES.defaultLocale;
|
||||
i18n.supportedLocales = VARIABLES.supportedLocales;
|
||||
|
||||
i18n.inputMethod.enabled = "fcitx5";
|
||||
i18n.inputMethod.fcitx5.addons = [ pkgs.fcitx5-mozc ];
|
||||
|
||||
# nix
|
||||
nix.package = pkgs.nixFlakes;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
||||
|
Loading…
Reference in New Issue
Block a user