mirror of
https://github.com/js0ny/dotfiles.git
synced 2026-02-04 11:30:33 +00:00
darwin: squirrel
This commit is contained in:
parent
257062f3d9
commit
83baada045
7 changed files with 344 additions and 303 deletions
|
|
@ -1,284 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
# Use: https://github.com/TemariVirus/fcitx-ini2nix
|
||||
i18n.inputMethod =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then {enable = false;}
|
||||
else {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
fcitx5 = {
|
||||
waylandFrontend = true;
|
||||
addons = with pkgs; [
|
||||
fcitx5-rime
|
||||
kdePackages.fcitx5-configtool
|
||||
kdePackages.fcitx5-qt
|
||||
fcitx5-gtk
|
||||
qt6Packages.fcitx5-chinese-addons
|
||||
];
|
||||
settings = {
|
||||
"inputMethod" = {
|
||||
"Groups/0" = {
|
||||
# Group Name
|
||||
"Name" = ''Default'';
|
||||
# Layout
|
||||
"Default Layout" = ''us'';
|
||||
# Default Input Method
|
||||
"DefaultIM" = ''keyboard-us'';
|
||||
};
|
||||
"Groups/0/Items/0" = {
|
||||
# Name
|
||||
"Name" = ''rime'';
|
||||
# Layout
|
||||
"Layout" = '''';
|
||||
};
|
||||
"Groups/0/Items/1" = {
|
||||
# Name
|
||||
"Name" = ''keyboard-us'';
|
||||
# Layout
|
||||
"Layout" = '''';
|
||||
};
|
||||
"GroupOrder" = {
|
||||
"0" = ''Default'';
|
||||
};
|
||||
};
|
||||
"globalOptions" = {
|
||||
"Hotkey" = {
|
||||
# Enumerate when holding modifier of Toggle key
|
||||
"EnumerateWithTriggerKeys" = ''True'';
|
||||
# Temporarily Toggle Input Method
|
||||
"AltTriggerKeys" = '''';
|
||||
# Skip first input method while enumerating
|
||||
"EnumerateSkipFirst" = ''False'';
|
||||
# Enumerate Input Method Group Forward
|
||||
"EnumerateGroupForwardKeys" = '''';
|
||||
# Enumerate Input Method Group Backward
|
||||
"EnumerateGroupBackwardKeys" = '''';
|
||||
# Time limit in milliseconds for triggering modifier key shortcuts
|
||||
"ModifierOnlyKeyTimeout" = ''250'';
|
||||
};
|
||||
"Hotkey/TriggerKeys" = {
|
||||
"0" = ''Zenkaku_Hankaku'';
|
||||
"1" = ''Hangul'';
|
||||
};
|
||||
"Hotkey/ActivateKeys" = {
|
||||
"0" = ''Hangul_Hanja'';
|
||||
};
|
||||
"Hotkey/DeactivateKeys" = {
|
||||
"0" = ''Hangul_Romaja'';
|
||||
};
|
||||
"Hotkey/EnumerateForwardKeys" = {
|
||||
"0" = ''Super+space'';
|
||||
};
|
||||
"Hotkey/EnumerateBackwardKeys" = {
|
||||
"0" = ''Shift+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'';
|
||||
# Reset state on Focus In
|
||||
"resetStateWhenFocusIn" = ''No'';
|
||||
# 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'';
|
||||
# Allow input method in the password field
|
||||
"AllowInputMethodForPassword" = ''False'';
|
||||
# Show preedit text when typing password
|
||||
"ShowPreeditForPassword" = ''False'';
|
||||
# Interval of saving user data in minutes
|
||||
"AutoSavePeriod" = ''30'';
|
||||
};
|
||||
};
|
||||
"addons" = {
|
||||
"clipboard" = {
|
||||
"globalSection" = {
|
||||
# Trigger Key
|
||||
"TriggerKey" = '''';
|
||||
# Paste Primary
|
||||
"PastePrimaryKey" = '''';
|
||||
# Number of entries
|
||||
"Number of entries" = ''5'';
|
||||
# Do not show password from password managers
|
||||
"IgnorePasswordFromPasswordManager" = ''False'';
|
||||
# Display passwords as plain text
|
||||
"ShowPassword" = ''False'';
|
||||
# Seconds before clearing password
|
||||
"ClearPasswordAfter" = ''30'';
|
||||
};
|
||||
};
|
||||
"kimpanel" = {
|
||||
"globalSection" = {
|
||||
# Prefer Text Icon
|
||||
"PreferTextIcon" = ''False'';
|
||||
};
|
||||
};
|
||||
"cloudpinyin" = {
|
||||
"globalSection" = {
|
||||
# Toggle Key
|
||||
"Toggle Key" = '''';
|
||||
# Minimum Pinyin Length
|
||||
"MinimumPinyinLength" = ''4'';
|
||||
# Backend
|
||||
"Backend" = ''GoogleCN'';
|
||||
# Proxy
|
||||
"Proxy" = '''';
|
||||
};
|
||||
};
|
||||
"wayland" = {
|
||||
"globalSection" = {
|
||||
# Allow Overriding System XKB Settings (Only support KDE5+ and GNOME)
|
||||
"Allow Overriding System XKB Settings" = ''True'';
|
||||
};
|
||||
};
|
||||
"waylandim" = {
|
||||
"globalSection" = {
|
||||
# Detect current running application (Need restart)
|
||||
"DetectApplication" = ''True'';
|
||||
# Forward key event instead of commiting text if it is not handled
|
||||
"PreferKeyEvent" = ''True'';
|
||||
# Keep virtual keyboard object for V2 Protocol (Need restart)
|
||||
"PersistentVirtualKeyboard" = ''False'';
|
||||
};
|
||||
};
|
||||
"rime" = {
|
||||
"globalSection" = {
|
||||
# Preedit Mode
|
||||
"PreeditMode" = ''"Do not show"'';
|
||||
# Shared Input State
|
||||
"InputState" = ''All'';
|
||||
# Fix embedded preedit cursor at the beginning of the preedit
|
||||
"PreeditCursorPositionAtBeginning" = ''True'';
|
||||
# Action when switching input method
|
||||
"SwitchInputMethodBehavior" = ''"Commit commit preview"'';
|
||||
# Deploy
|
||||
"Deploy" = '''';
|
||||
# Synchronize
|
||||
"Synchronize" = '''';
|
||||
};
|
||||
};
|
||||
"classicui" = {
|
||||
"globalSection" = {
|
||||
# Vertical Candidate List
|
||||
"Vertical Candidate List" = ''True'';
|
||||
# Use mouse wheel to go to prev or next page
|
||||
"WheelForPaging" = ''True'';
|
||||
# NOTE: manged by stylix
|
||||
# Font
|
||||
# "Font" = ''"LXGW WenKai Medium 14"'';
|
||||
# # Menu Font
|
||||
# "MenuFont" = ''"LXGW WenKai 14"'';
|
||||
# # Tray Font
|
||||
# "TrayFont" = ''"Sans Bold 10"'';
|
||||
# # Tray Label Outline Color
|
||||
# "TrayOutlineColor" = ''''; #000000
|
||||
# # Tray Label Text Color
|
||||
# "TrayTextColor" = ''''; #ffffff
|
||||
# Theme
|
||||
# "Theme" = ''plasma'';
|
||||
# # Dark Theme
|
||||
# "DarkTheme" = ''plasma'';
|
||||
# # Follow system light/dark color scheme
|
||||
# "UseDarkTheme" = ''True'';
|
||||
# # Follow system accent color if it is supported by theme and desktop
|
||||
# "UseAccentColor" = ''True'';
|
||||
# Prefer Text Icon
|
||||
"PreferTextIcon" = ''False'';
|
||||
# Show Layout Name In Icon
|
||||
"ShowLayoutNameInIcon" = ''True'';
|
||||
# Use input method language to display text
|
||||
"UseInputMethodLanguageToDisplayText" = ''True'';
|
||||
# Use Per Screen DPI on X11
|
||||
"PerScreenDPI" = ''False'';
|
||||
# Force font DPI on Wayland
|
||||
"ForceWaylandDPI" = ''0'';
|
||||
# Enable fractional scale under Wayland
|
||||
"EnableFractionalScale" = ''True'';
|
||||
};
|
||||
};
|
||||
"quickphrase" = {
|
||||
"globalSection" = {
|
||||
# Trigger Key
|
||||
"TriggerKey" = '''';
|
||||
# Choose key modifier
|
||||
"Choose Modifier" = ''None'';
|
||||
# Enable Spell check
|
||||
"Spell" = ''True'';
|
||||
# Fallback Spell check language
|
||||
"FallbackSpellLanguage" = ''en'';
|
||||
};
|
||||
};
|
||||
"punctuation" = {
|
||||
"globalSection" = {
|
||||
# Toggle key
|
||||
"Hotkey" = '''';
|
||||
# Half width punctuation after latin letter or number
|
||||
"HalfWidthPuncAfterLetterOrNumber" = ''True'';
|
||||
# Type paired punctuations together (e.g. Quote)
|
||||
"TypePairedPunctuationsTogether" = ''False'';
|
||||
# Enabled
|
||||
"Enabled" = ''True'';
|
||||
};
|
||||
};
|
||||
"chttrans" = {
|
||||
"globalSection" = {
|
||||
# Translate engine
|
||||
"Engine" = ''OpenCC'';
|
||||
# Enabled Input Methods
|
||||
"EnabledIM" = '''';
|
||||
# OpenCC profile for Simplified to Traditional
|
||||
"OpenCCS2TProfile" = ''default'';
|
||||
# OpenCC profile for Traditional to Simplified
|
||||
"OpenCCT2SProfile" = ''default'';
|
||||
};
|
||||
"sections" = {
|
||||
"Hotkey" = {
|
||||
"0" = ''Control+Shift+F'';
|
||||
};
|
||||
};
|
||||
};
|
||||
"notifications" = {
|
||||
"globalSection" = {
|
||||
# Hidden Notifications
|
||||
"HiddenNotifications" = '''';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
22
nixcfgs/users/js0ny/programs/rime/default.nix
Normal file
22
nixcfgs/users/js0ny/programs/rime/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./dicts.nix
|
||||
./squirrel.nix
|
||||
./fcitx.nix
|
||||
];
|
||||
home.activation.deployRime =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then
|
||||
lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
/Library/Input\ Methods/Squirrel.app/Contents/MacOS/Squirrel --reload
|
||||
''
|
||||
else
|
||||
# TODO: Buggy
|
||||
lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
# ${pkgs.kdePackages.qttools}/bin/qdbus org.fcitx.Fcitx5 /controller org.fcitx.Fcitx.Controller1.SetConfig "fcitx://config/addon/rime/deploy" ""
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
{pkgs, ...}: let
|
||||
version = "v13.3.12";
|
||||
rimeWanxiang = pkgs.fetchzip {
|
||||
url = "https://github.com/amzxyz/rime_wanxiang/releases/download/${version}/rime-wanxiang-zrm-fuzhu.zip";
|
||||
|
|
@ -87,7 +83,6 @@
|
|||
then "Library/Rime"
|
||||
else ".local/share/fcitx5/rime";
|
||||
in {
|
||||
imports = [./fcitx.nix];
|
||||
home.file.${rimePath} = {
|
||||
source = rimeConfigFiltered;
|
||||
recursive = true;
|
||||
|
|
@ -172,15 +167,4 @@ in {
|
|||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.activation.deployRime =
|
||||
if pkgs.stdenv.isDarwin
|
||||
then
|
||||
lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
/Library/Input\ Methods/Squirrel.app/Contents/MacOS/Squirrel --reload
|
||||
''
|
||||
else
|
||||
lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
# ${pkgs.kdePackages.qttools}/bin/qdbus org.fcitx.Fcitx5 /controller org.fcitx.Fcitx.Controller1.SetConfig "fcitx://config/addon/rime/deploy" ""
|
||||
'';
|
||||
}
|
||||
286
nixcfgs/users/js0ny/programs/rime/fcitx.nix
Normal file
286
nixcfgs/users/js0ny/programs/rime/fcitx.nix
Normal file
|
|
@ -0,0 +1,286 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
lib.mkIf pkgs.stdenv.isLinux {
|
||||
# Use: https://github.com/TemariVirus/fcitx-ini2nix
|
||||
i18n.inputMethod = {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
fcitx5 = {
|
||||
waylandFrontend = true;
|
||||
addons = with pkgs; [
|
||||
fcitx5-rime
|
||||
kdePackages.fcitx5-configtool
|
||||
kdePackages.fcitx5-qt
|
||||
fcitx5-gtk
|
||||
qt6Packages.fcitx5-chinese-addons
|
||||
];
|
||||
settings = {
|
||||
"inputMethod" = {
|
||||
"Groups/0" = {
|
||||
# Group Name
|
||||
"Name" = ''Default'';
|
||||
# Layout
|
||||
"Default Layout" = ''us'';
|
||||
# Default Input Method
|
||||
"DefaultIM" = ''keyboard-us'';
|
||||
};
|
||||
"Groups/0/Items/0" = {
|
||||
# Name
|
||||
"Name" = ''rime'';
|
||||
# Layout
|
||||
"Layout" = '''';
|
||||
};
|
||||
"Groups/0/Items/1" = {
|
||||
# Name
|
||||
"Name" = ''keyboard-us'';
|
||||
# Layout
|
||||
"Layout" = '''';
|
||||
};
|
||||
"GroupOrder" = {
|
||||
"0" = ''Default'';
|
||||
};
|
||||
};
|
||||
"globalOptions" = {
|
||||
"Hotkey" = {
|
||||
# Enumerate when holding modifier of Toggle key
|
||||
"EnumerateWithTriggerKeys" = ''True'';
|
||||
# Temporarily Toggle Input Method
|
||||
"AltTriggerKeys" = '''';
|
||||
# Skip first input method while enumerating
|
||||
"EnumerateSkipFirst" = ''False'';
|
||||
# Enumerate Input Method Group Forward
|
||||
"EnumerateGroupForwardKeys" = '''';
|
||||
# Enumerate Input Method Group Backward
|
||||
"EnumerateGroupBackwardKeys" = '''';
|
||||
# Time limit in milliseconds for triggering modifier key shortcuts
|
||||
"ModifierOnlyKeyTimeout" = ''250'';
|
||||
};
|
||||
"Hotkey/TriggerKeys" = {
|
||||
"0" = ''Zenkaku_Hankaku'';
|
||||
"1" = ''Hangul'';
|
||||
};
|
||||
"Hotkey/ActivateKeys" = {
|
||||
"0" = ''Hangul_Hanja'';
|
||||
};
|
||||
"Hotkey/DeactivateKeys" = {
|
||||
"0" = ''Hangul_Romaja'';
|
||||
};
|
||||
"Hotkey/EnumerateForwardKeys" = {
|
||||
"0" = ''Super+space'';
|
||||
};
|
||||
"Hotkey/EnumerateBackwardKeys" = {
|
||||
"0" = ''Shift+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'';
|
||||
# Reset state on Focus In
|
||||
"resetStateWhenFocusIn" = ''No'';
|
||||
# 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'';
|
||||
# Allow input method in the password field
|
||||
"AllowInputMethodForPassword" = ''False'';
|
||||
# Show preedit text when typing password
|
||||
"ShowPreeditForPassword" = ''False'';
|
||||
# Interval of saving user data in minutes
|
||||
"AutoSavePeriod" = ''30'';
|
||||
};
|
||||
};
|
||||
"addons" = {
|
||||
"clipboard" = {
|
||||
"globalSection" = {
|
||||
# Trigger Key
|
||||
"TriggerKey" = '''';
|
||||
# Paste Primary
|
||||
"PastePrimaryKey" = '''';
|
||||
# Number of entries
|
||||
"Number of entries" = ''5'';
|
||||
# Do not show password from password managers
|
||||
"IgnorePasswordFromPasswordManager" = ''False'';
|
||||
# Display passwords as plain text
|
||||
"ShowPassword" = ''False'';
|
||||
# Seconds before clearing password
|
||||
"ClearPasswordAfter" = ''30'';
|
||||
};
|
||||
};
|
||||
"kimpanel" = {
|
||||
"globalSection" = {
|
||||
# Prefer Text Icon
|
||||
"PreferTextIcon" = ''False'';
|
||||
};
|
||||
};
|
||||
"cloudpinyin" = {
|
||||
"globalSection" = {
|
||||
# Toggle Key
|
||||
"Toggle Key" = '''';
|
||||
# Minimum Pinyin Length
|
||||
"MinimumPinyinLength" = ''4'';
|
||||
# Backend
|
||||
"Backend" = ''GoogleCN'';
|
||||
# Proxy
|
||||
"Proxy" = '''';
|
||||
};
|
||||
};
|
||||
"wayland" = {
|
||||
"globalSection" = {
|
||||
# Allow Overriding System XKB Settings (Only support KDE5+ and GNOME)
|
||||
"Allow Overriding System XKB Settings" = ''True'';
|
||||
};
|
||||
};
|
||||
"waylandim" = {
|
||||
"globalSection" = {
|
||||
# Detect current running application (Need restart)
|
||||
"DetectApplication" = ''True'';
|
||||
# Forward key event instead of commiting text if it is not handled
|
||||
"PreferKeyEvent" = ''True'';
|
||||
# Keep virtual keyboard object for V2 Protocol (Need restart)
|
||||
"PersistentVirtualKeyboard" = ''False'';
|
||||
};
|
||||
};
|
||||
"rime" = {
|
||||
"globalSection" = {
|
||||
# Preedit Mode
|
||||
"PreeditMode" = ''"Do not show"'';
|
||||
# Shared Input State
|
||||
"InputState" = ''All'';
|
||||
# Fix embedded preedit cursor at the beginning of the preedit
|
||||
"PreeditCursorPositionAtBeginning" = ''True'';
|
||||
# Action when switching input method
|
||||
"SwitchInputMethodBehavior" = ''"Commit commit preview"'';
|
||||
# Deploy
|
||||
"Deploy" = '''';
|
||||
# Synchronize
|
||||
"Synchronize" = '''';
|
||||
};
|
||||
};
|
||||
"classicui" = {
|
||||
"globalSection" = {
|
||||
# Vertical Candidate List
|
||||
"Vertical Candidate List" = ''True'';
|
||||
# Use mouse wheel to go to prev or next page
|
||||
"WheelForPaging" = ''True'';
|
||||
# NOTE: manged by stylix
|
||||
# Font
|
||||
# "Font" = ''"LXGW WenKai Medium 14"'';
|
||||
# # Menu Font
|
||||
# "MenuFont" = ''"LXGW WenKai 14"'';
|
||||
# # Tray Font
|
||||
# "TrayFont" = ''"Sans Bold 10"'';
|
||||
# # Tray Label Outline Color
|
||||
# "TrayOutlineColor" = ''''; #000000
|
||||
# # Tray Label Text Color
|
||||
# "TrayTextColor" = ''''; #ffffff
|
||||
# Theme
|
||||
# "Theme" = ''plasma'';
|
||||
# # Dark Theme
|
||||
# "DarkTheme" = ''plasma'';
|
||||
# # Follow system light/dark color scheme
|
||||
# "UseDarkTheme" = ''True'';
|
||||
# # Follow system accent color if it is supported by theme and desktop
|
||||
# "UseAccentColor" = ''True'';
|
||||
# Prefer Text Icon
|
||||
"PreferTextIcon" = ''False'';
|
||||
# Show Layout Name In Icon
|
||||
"ShowLayoutNameInIcon" = ''True'';
|
||||
# Use input method language to display text
|
||||
"UseInputMethodLanguageToDisplayText" = ''True'';
|
||||
# Use Per Screen DPI on X11
|
||||
"PerScreenDPI" = ''False'';
|
||||
# Force font DPI on Wayland
|
||||
"ForceWaylandDPI" = ''0'';
|
||||
# Enable fractional scale under Wayland
|
||||
"EnableFractionalScale" = ''True'';
|
||||
};
|
||||
};
|
||||
"quickphrase" = {
|
||||
"globalSection" = {
|
||||
# Trigger Key
|
||||
"TriggerKey" = '''';
|
||||
# Choose key modifier
|
||||
"Choose Modifier" = ''None'';
|
||||
# Enable Spell check
|
||||
"Spell" = ''True'';
|
||||
# Fallback Spell check language
|
||||
"FallbackSpellLanguage" = ''en'';
|
||||
};
|
||||
};
|
||||
"punctuation" = {
|
||||
"globalSection" = {
|
||||
# Toggle key
|
||||
"Hotkey" = '''';
|
||||
# Half width punctuation after latin letter or number
|
||||
"HalfWidthPuncAfterLetterOrNumber" = ''True'';
|
||||
# Type paired punctuations together (e.g. Quote)
|
||||
"TypePairedPunctuationsTogether" = ''False'';
|
||||
# Enabled
|
||||
"Enabled" = ''True'';
|
||||
};
|
||||
};
|
||||
"chttrans" = {
|
||||
"globalSection" = {
|
||||
# Translate engine
|
||||
"Engine" = ''OpenCC'';
|
||||
# Enabled Input Methods
|
||||
"EnabledIM" = '''';
|
||||
# OpenCC profile for Simplified to Traditional
|
||||
"OpenCCS2TProfile" = ''default'';
|
||||
# OpenCC profile for Traditional to Simplified
|
||||
"OpenCCT2SProfile" = ''default'';
|
||||
};
|
||||
"sections" = {
|
||||
"Hotkey" = {
|
||||
"0" = ''Control+Shift+F'';
|
||||
};
|
||||
};
|
||||
};
|
||||
"notifications" = {
|
||||
"globalSection" = {
|
||||
# Hidden Notifications
|
||||
"HiddenNotifications" = '''';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
22
nixcfgs/users/js0ny/programs/rime/squirrel.nix
Normal file
22
nixcfgs/users/js0ny/programs/rime/squirrel.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.mkIf pkgs.stdenv.isDarwin {
|
||||
targets.darwin.defaults = {
|
||||
"com.apple.inputsources.plist" = {
|
||||
"AppleEnabledThirdPartyInputSources" = [
|
||||
{
|
||||
"Bundle ID" = "im.rime.inputmethod.Squirrel";
|
||||
"Input Mode" = "im.rime.inputmethod.Squirrel.Hans";
|
||||
"InputSourceKind" = "Input Mode";
|
||||
}
|
||||
{
|
||||
"Bundle ID" = "im.rime.inputmethod.Squirrel";
|
||||
"InputSourceKind" = "Keyboard Input Method";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
./programs/firefox
|
||||
./programs/emacs.nix
|
||||
./programs/zed-editor.nix
|
||||
./programs/rime.nix
|
||||
./programs/rime
|
||||
./programs/sdcv.nix
|
||||
./programs/fzf.nix
|
||||
./programs/sops.nix
|
||||
|
|
@ -47,5 +47,16 @@
|
|||
../../modules/home/dev/nix.nix
|
||||
];
|
||||
|
||||
targets.darwin.defaults = {
|
||||
".GlobalPreferences" = {
|
||||
# Accent Colour: Pink
|
||||
"AppleAccentColor" = 6;
|
||||
# Folder Colour
|
||||
"AppleIconAppearanceTintColor" = "Yellow";
|
||||
# Icon & Widget Style
|
||||
"AppleInterfaceStyle" = "Dark";
|
||||
};
|
||||
};
|
||||
|
||||
home.stateVersion = "25.05";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ in {
|
|||
# ./programs/xilinx.nix
|
||||
./programs/mime.nix
|
||||
./programs/zed-editor.nix
|
||||
./programs/rime.nix
|
||||
./programs/rime
|
||||
./programs/sdcv.nix
|
||||
./programs/fzf.nix
|
||||
./programs/libreoffice.nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue