home/fcitx5: install material icons theme

This commit is contained in:
Oystein Kristoffer Tveit 2024-06-25 21:26:20 +02:00
parent e372398ca0
commit 1ae9c8c75e
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
1 changed files with 97 additions and 79 deletions

View File

@ -15,99 +15,117 @@ in
}; };
xdg.configFile = let xdg.configFile = let
format = pkgs.formats.ini { }; format = pkgs.formats.iniWithGlobalSection { };
in { in {
"fcitx5/profile" = { "fcitx5/profile" = {
force = true; force = true;
source = format.generate "fcitx5-profile" { source = format.generate "fcitx5-profile" {
"Groups/0" = { sections = {
Name = "Default"; "Groups/0" = {
"Default Layout" = "us"; Name = "Default";
DefaultIM = "mozc"; "Default Layout" = "us";
}; DefaultIM = "mozc";
"Groups/0/Items/0" = { };
Name = "keyboard-us"; "Groups/0/Items/0" = {
Layout = ""; Name = "keyboard-us";
}; Layout = "";
"Groups/0/Items/1" = { };
Name = "keyboard-no"; "Groups/0/Items/1" = {
Layout = ""; Name = "keyboard-no";
}; Layout = "";
"Groups/0/Items/2" = { };
Name = "mozc"; "Groups/0/Items/2" = {
Layout = ""; Name = "mozc";
}; Layout = "";
GroupOrder = { };
"0" = "Default"; GroupOrder = {
"0" = "Default";
};
}; };
}; };
}; };
"fcitx5/config".source = format.generate "fcitx5-config" { "fcitx5/config".source = format.generate "fcitx5-config" {
Hotkey = { sections = {
# Enumerate when press trigger key repeatedly Hotkey = {
EnumerateWithTriggerKeys = "True"; # Enumerate when press trigger key repeatedly
# Temporally switch between first and current Input Method EnumerateWithTriggerKeys = "True";
AltTriggerKeys = ""; # Temporally switch between first and current Input Method
# Enumerate Input Method Forward AltTriggerKeys = "";
EnumerateForwardKeys = ""; # Enumerate Input Method Forward
# Enumerate Input Method Backward EnumerateForwardKeys = "";
EnumerateBackwardKeys = ""; # Enumerate Input Method Backward
# Skip first input method while enumerating EnumerateBackwardKeys = "";
EnumerateSkipFirst = "False"; # Skip first input method while enumerating
}; EnumerateSkipFirst = "False";
};
"Hotkey/TriggerKeys" = { "Hotkey/TriggerKeys" = {
"0" = "Control+space"; "0" = "Control+space";
"1" = "Zenkaku_Hankaku"; "1" = "Zenkaku_Hankaku";
"2" = "Hangul"; "2" = "Hangul";
}; };
"Hotkey/EnumerateGroupForwardKeys"."0" = "Super+space"; "Hotkey/EnumerateGroupForwardKeys"."0" = "Super+space";
"Hotkey/EnumerateGroupBackwardKeys"."0" = "Shift+Super+space"; "Hotkey/EnumerateGroupBackwardKeys"."0" = "Shift+Super+space";
"Hotkey/ActivateKeys"."0" = "Hangul_Hanja"; "Hotkey/ActivateKeys"."0" = "Hangul_Hanja";
"Hotkey/DeactivateKeys"."0" = "Hangul_Romaja"; "Hotkey/DeactivateKeys"."0" = "Hangul_Romaja";
"Hotkey/PrevPage"."0" = "Up"; "Hotkey/PrevPage"."0" = "Up";
"Hotkey/NextPage"."0" = "Down"; "Hotkey/NextPage"."0" = "Down";
"Hotkey/PrevCandidate"."0" = "Shift+Tab"; "Hotkey/PrevCandidate"."0" = "Shift+Tab";
"Hotkey/NextCandidate"."0" = "Tab"; "Hotkey/NextCandidate"."0" = "Tab";
"Hotkey/TogglePreedit"."0" = "Control+Alt+P"; "Hotkey/TogglePreedit"."0" = "Control+Alt+P";
Behaviour = { Behaviour = {
# Active By Default # Active By Default
ActiveByDefault = "False"; ActiveByDefault = "False";
# Share Input State # Share Input State
ShareInputState = "All"; ShareInputState = "All";
# Show preedit in application # Show preedit in application
PreeditEnabledByDefault = "True"; PreeditEnabledByDefault = "True";
# Show Input Method Information when switch input method # Show Input Method Information when switch input method
ShowInputMethodInformation = "True"; ShowInputMethodInformation = "True";
# Show Input Method Information when changing focus # Show Input Method Information when changing focus
showInputMethodInformationWhenFocusIn = "False"; showInputMethodInformationWhenFocusIn = "False";
# Show compact input method information # Show compact input method information
CompactInputMethodInformation = "True"; CompactInputMethodInformation = "True";
# Show first input method information # Show first input method information
ShowFirstInputMethodInformation = "True"; ShowFirstInputMethodInformation = "True";
# Default page size # Default page size
DefaultPageSize = 5; DefaultPageSize = 5;
# Override Xkb Option # Override Xkb Option
OverrideXkbOption = "False"; OverrideXkbOption = "False";
# Custom Xkb Option # Custom Xkb Option
CustomXkbOption = ""; CustomXkbOption = "";
# Force Enabled Addons # Force Enabled Addons
EnabledAddons = ""; EnabledAddons = "";
# Force Disabled Addons # Force Disabled Addons
DisabledAddons = ""; DisabledAddons = "";
# Preload input method to be used by default # Preload input method to be used by default
PreloadInputMethod = "True"; PreloadInputMethod = "True";
# Allow input method in the password field # Allow input method in the password field
AllowInputMethodForPassword = "False"; AllowInputMethodForPassword = "False";
# Show preedit text when typing password # Show preedit text when typing password
ShowPreeditForPassword = "False"; ShowPreeditForPassword = "False";
# Interval of saving user data in minutes # Interval of saving user data in minutes
AutoSavePeriod = 30; AutoSavePeriod = 30;
};
}; };
}; };
"fcitx5/conf/classicui.conf".source = format.generate "fcitx5-classicui.conf" {
globalSection = {
Theme = "Material-Color";
PerScreenDPI = "True";
# Font = "";
"Vertical Candidate List" = "True";
};
};
};
xdg.dataFile."fcitx5/themes/Material-Color" = {
recursive = true;
source = "${pkgs.fcitx5-material-color}/share/fcitx5/themes/Material-Color-orange";
}; };
systemd.user.services.fcitx5-daemon = { systemd.user.services.fcitx5-daemon = {