### Install Rime plugins Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Installs specified Rime plugins using the provided script. Replace 'rime/librime-sample' with the desired plugin repository slug. ```sh bash librime/install-plugins.sh rime/librime-sample # ... ``` -------------------------------- ### Install cmake using Homebrew Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Installs the cmake build system using the Homebrew package manager. Ensure Homebrew is installed first. ```sh brew install cmake ``` -------------------------------- ### Install Squirrel using action script Source: https://github.com/rime/squirrel/blob/master/INSTALL.md A shortcut to download and install the latest librime release, skipping manual Boost and librime builds. This script automates the process. ```sh bash ./action-install.sh ``` -------------------------------- ### Build Squirrel from Source Source: https://context7.com/rime/squirrel/llms.txt Clone the repository and use `make` to build a Universal binary. Options include using pre-built librime binaries or building librime from source. The `install` target deploys to `/Library/Input Methods/`, and `package` creates a `.pkg` installer. ```sh # Clone with all submodules git clone --recursive https://github.com/rime/squirrel.git cd squirrel # Option A: Use pre-built librime binaries (fastest) bash ./action-install.sh # Option B: Build librime from source (Universal) export BUILD_UNIVERSAL=1 bash librime/install-boost.sh export BOOST_ROOT="$(pwd)/librime/deps/boost-1.84.0" # Build Squirrel.app as a Universal binary make ARCHS='arm64 x86_64' BUILD_UNIVERSAL=1 # Install directly to /Library/Input Methods/ make install # Or create a distributable .pkg installer make package ARCHS='arm64 x86_64' DEV_ID="Your Apple Developer Name" # Clean build artifacts only (keep deps) make clean # Clean all dependencies (librime, plum, Sparkle) make clean-deps ``` -------------------------------- ### Install Boost using MacPorts Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Installs Boost C++ libraries using MacPorts. The '-no_static' flag is used. ```sh port install boost -no_static ``` -------------------------------- ### Install Boost C++ libraries from source Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Downloads and builds Boost C++ libraries from source. Set BUILD_UNIVERSAL=1 for universal macOS binaries. Ensure BOOST_ROOT is set to the installation directory. ```sh export BUILD_UNIVERSAL=1 bash librime/install-boost.sh export BOOST_ROOT="$(pwd)/librime/deps/boost-1.84.0" ``` -------------------------------- ### Install Boost using Homebrew Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Installs the current version of Boost C++ libraries using Homebrew. Note that this may result in a non-portable Squirrel.app due to linking to local libraries. ```sh brew install boost ``` -------------------------------- ### Install cmake using MacPorts Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Installs the cmake build system using the MacPorts package manager. Ensure MacPorts is installed first. ```sh port install cmake ``` -------------------------------- ### Directly Install Squirrel.app Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Installs Squirrel.app directly onto your Mac. This method is not highly recommended and may require 'sudo'. A logout might be necessary for the App to function correctly. ```sh # Squirrel as a Universal app make install ``` -------------------------------- ### Squirrel Command-Line Interface Source: https://context7.com/rime/squirrel/llms.txt Manage Squirrel's deployment, user data, and input sources via CLI arguments. Use `--reload` for schema recompilation, `--sync` for dictionary snapshots, `--build` for schema compilation, `--quit` to stop processes, `--install` to register input sources, `--enable-input-source` and `--disable-input-source` to manage input modes, and `--select-input-source` to activate a specific mode. ```sh # Trigger a full re-deploy (recompile all schemas) /Library/Input\ Methods/Squirrel.app/Contents/MacOS/Squirrel --reload # Sync user data (user dictionary snapshots) /Library/Input\ Methods/Squirrel.app/Contents/MacOS/Squirrel --sync # Build all schemas in the current directory /Library/Input\ Methods/Squirrel.app/Contents/MacOS/Squirrel --build # Quit all running Squirrel processes /Library/Input\ Methods/Squirrel.app/Contents/MacOS/Squirrel --quit # Register input sources (run once after install) /Library/Input\ Methods/Squirrel.app/Contents/MacOS/Squirrel --install # Enable specific input modes (Hans = Simplified, Hant = Traditional) /Library/Input\ Methods/Squirrel.app/Contents/MacOS/Squirrel \ --enable-input-source \ im.rime.inputmethod.Squirrel.Hans \ im.rime.inputmethod.Squirrel.Hant # Disable all Squirrel input sources /Library/Input\ Methods/Squirrel.app/Contents/MacOS/Squirrel --disable-input-source # Select (activate) the Simplified Chinese input source /Library/Input\ Methods/Squirrel.app/Contents/MacOS/Squirrel \ --select-input-source im.rime.inputmethod.Squirrel.Hans # Show full help /Library/Input\ Methods/Squirrel.app/Contents/MacOS/Squirrel --help ``` -------------------------------- ### Register Input Sources with SquirrelInstaller Source: https://context7.com/rime/squirrel/llms.txt Register, enable, disable, and select Squirrel's input modes using the Text Input Services API. This is needed for fresh installs and mode switching. ```swift import Foundation let installer = SquirrelInstaller() // Register Squirrel with the system (needed only after fresh install) installer.register() // Check which modes are currently enabled let enabled: [SquirrelInstaller.InputMode] = installer.enabledModes() // → [.hans] or [.hans, .hant] // Enable both Simplified and Traditional input modes installer.enable(modes: [.hans, .hant]) // Enable only the default (Simplified Chinese / Hans) mode installer.enable() // Switch the active input source to Traditional Chinese installer.select(mode: .hant) // Disable all Squirrel input sources installer.disable() // Input mode identifiers: // .hans → "im.rime.inputmethod.Squirrel.Hans" (Simplified Chinese) // .hant → "im.rime.inputmethod.Squirrel.Hant" (Traditional Chinese) ``` -------------------------------- ### Global Style Configuration in squirrel.yaml Source: https://context7.com/rime/squirrel/llms.txt Define global style settings for Squirrel by patching the squirrel.custom.yaml file. This example shows common settings like keyboard layout, chord duration, notification preferences, and various style attributes including color schemes, candidate layout, and fonts. ```yaml # ~/Library/Rime/squirrel.custom.yaml ← use this file to override defaults patch: # Keyboard layout when Squirrel activates: last | default | USExtended keyboard_layout: last # Chord typing release window in seconds chord_duration: 0.1 # Show schema/option change notifications: always | never | appropriate show_notifications_when: appropriate style: # Activate a preset color scheme (or "native" to follow macOS appearance) color_scheme: aqua # Optional dark-mode override color_scheme_dark: solarized_dark # Candidate layout: stacked (vertical list) or linear (horizontal row) candidate_list_layout: stacked # Text direction: horizontal | vertical text_orientation: horizontal # Show pinyin inline inside the text field inline_preedit: true # Embed the top candidate as text in the input field inline_candidate: false # Stick panel to screen edge to reduce jumping memorize_size: true # Translucent (frosted glass) panel background translucency: false # Show paging arrows show_paging: true # Geometry corner_radius: 10 hilited_corner_radius: 5 border_height: 4 border_width: 4 line_spacing: 5 spacing: 8 shadow_size: 3 # Candidate label/text/comment format # Tokens: [label] [candidate] [comment] candidate_format: '[label]. [candidate] [comment]' # Fonts (comma-separated, with optional weight suffix e.g. "PingFangSC-Regular") font_face: 'PingFangSC-Regular,HanaMinB' font_point: 16 label_font_face: 'STHeitiSC-Light' label_font_point: 12 comment_font_face: 'Avenir' comment_font_point: 14 ``` -------------------------------- ### Clean Squirrel dependencies Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Removes dependencies like librime, plugins, plum, and sparkle. Use this to start with a clean dependency state. ```sh make clean-deps ``` -------------------------------- ### Clean Squirrel build artifacts Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Removes build artifacts generated by the 'make' command for Squirrel. This does not affect installed dependencies. ```sh make clean ``` -------------------------------- ### Build Universal Squirrel.app Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Builds Squirrel.app as a Universal binary for multiple architectures (arm64, x86_64). Environment variables can be appended directly to the make command. ```sh make ARCHS='arm64 x86_64' BUILD_UNIVERSAL=1 ``` -------------------------------- ### Build Squirrel.app Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Compiles the Squirrel.app using the make utility. Ensure all dependencies and environment variables are set correctly beforehand. ```sh make ``` -------------------------------- ### SquirrelInstaller API Source: https://context7.com/rime/squirrel/llms.txt SquirrelInstaller provides methods for registering, enabling, disabling, and selecting Squirrel's input modes within the system's Text Input Services. ```APIDOC ## SquirrelInstaller ### Description `SquirrelInstaller` wraps the Text Input Services API (`TISInputSource`) to register, enable, disable, and select Squirrel's input modes. ### Registering Squirrel ```swift let installer = SquirrelInstaller() installer.register() ``` ### Checking Enabled Modes ```swift let enabled: [SquirrelInstaller.InputMode] = installer.enabledModes() // → [.hans] or [.hans, .hant] ``` ### Enabling Input Modes ```swift // Enable both Simplified and Traditional input modes installer.enable(modes: [.hans, .hant]) // Enable only the default (Simplified Chinese / Hans) mode installer.enable() ``` ### Selecting an Input Mode ```swift installer.select(mode: .hant) ``` ### Disabling All Input Sources ```swift installer.disable() ``` ### Input Mode Identifiers ``` // .hans → "im.rime.inputmethod.Squirrel.Hans" (Simplified Chinese) // .hant → "im.rime.inputmethod.Squirrel.Hant" (Traditional Chinese) ``` ``` -------------------------------- ### Set build environment variables Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Defines environment variables for building Squirrel. BOOST_ROOT is required. DEV_ID is optional for codesigning. BUILD_UNIVERSAL=1 builds universal binaries. PLUM_TAG and ARCHS are optional build configurations. ```sh export BOOST_ROOT="path_to_boost" # required export DEV_ID="Your Apple ID name" # include this to codesign, optional export BUILD_UNIVERSAL=1 # set to build universal binary export PLUM_TAG=":preset” # or ":extra", optional, build with a set of plum formulae export ARCHS='arm64 x86_64' # optional, if not defined, only active arch is used export MACOSX_DEPLOYMENT_TARGET='13.0' # optional, lower version than 13.0 is not tested and may not work properly ``` -------------------------------- ### Load and Inspect SquirrelTheme in Swift Source: https://context7.com/rime/squirrel/llms.txt Load a `SquirrelTheme` from configuration and inspect its properties in Swift. This demonstrates how to access layout flags, geometry, colors, and attributed strings for rendering. ```swift import AppKit // Instantiate and populate a theme from config let config = SquirrelConfig() _ = config.openBaseConfig() let theme = SquirrelTheme() theme.load(config: config, dark: false) // light appearance // theme.load(config: config, dark: true) // dark appearance // Layout flags print(theme.linear) // false → stacked layout print(theme.vertical) // false → horizontal text print(theme.inlinePreedit) // true print(theme.inlineCandidate) // false print(theme.showPaging) // false // Geometry print(theme.cornerRadius) // 7.0 print(theme.borderWidth) // -2.0 print(theme.linespace) // 5.0 print(theme.shadowSize) // 0.0 // Colors (NSColor) print(theme.backgroundColor) // .windowBackgroundColor for "native" // Pre-built NSAttributedString attribute dictionaries for rendering let _ = theme.attrs // normal candidate let _ = theme.highlightedAttrs // highlighted candidate let _ = theme.labelAttrs // label / index number let _ = theme.labelHighlightedAttrs // highlighted label let _ = theme.commentAttrs // comment / annotation let _ = theme.preeditAttrs // preedit text let _ = theme.preeditHighlightedAttrs // highlighted preedit segment // Candidate format string (e.g. "[label]. [candidate] [comment]") print(theme.candidateFormat) // Status message display type: .mix | .long | .short print(theme.statusMessageType) config.close() ``` -------------------------------- ### SquirrelApplicationDelegate API Source: https://context7.com/rime/squirrel/llms.txt SquirrelApplicationDelegate handles the lifecycle of the librime engine, including settings management, auto-updates, and system notifications. ```APIDOC ## SquirrelApplicationDelegate ### Description `SquirrelApplicationDelegate` manages the librime engine lifecycle, settings loading, Sparkle auto-updates, and system notifications. ### Accessing the Delegate ```swift let delegate: SquirrelApplicationDelegate = NSApp.squirrelAppDelegate ``` ### Deploying Librime Engine ```swift delegate.deploy() ``` ### Syncing User Data ```swift delegate.syncUserData() ``` ### Reloading Settings ```swift // Reload all settings delegate.loadSettings() // Load settings for a specific schema delegate.loadSettings(for: "luna_pinyin") ``` ### Opening Folders ```swift // Open Rime configuration folder delegate.openRimeFolder() // Open log directory delegate.openLogFolder() ``` ### Checking for Updates ```swift delegate.checkForUpdates() ``` ### Showing System Notifications ```swift SquirrelApplicationDelegate.showMessage(msgText: "Deploy succeeded") ``` ### Notification Identifiers ```swift _ = SquirrelApplicationDelegate.notificationIdentifier // "SquirrelNotification" _ = SquirrelApplicationDelegate.updateNotificationIdentifier // "SquirrelUpdateNotification" ``` ### User Data Directories ```swift _ = SquirrelApp.userDir // ~/Library/Rime/ _ = SquirrelApp.logDir // $TMPDIR/rime.squirrel/ _ = SquirrelApp.appDir // /Library/Input Methods/Squirrel.app ``` ``` -------------------------------- ### Configure Light/Dark Color Scheme Pair Source: https://context7.com/rime/squirrel/llms.txt Use this configuration to set a pair of color schemes that automatically switch between light and dark modes based on the system appearance. Specify the desired light scheme and its corresponding dark scheme. ```yaml style: color_scheme: solarized_light color_scheme_dark: solarized_dark ``` -------------------------------- ### Update SquirrelPanel Candidate Window Source: https://context7.com/rime/squirrel/llms.txt Update the panel with new IME state, including preedit text, candidate list, and status messages. The panel is created once at launch and reused. ```swift import AppKit // Created once by SquirrelApplicationDelegate at launch let panel = SquirrelPanel(position: .zero) // Update the panel with new IME state (called from SquirrelInputController) panel.update( preedit: "nǐ hǎo", selRange: NSRange(location: 0, length: 5), caretPos: 5, candidates: ["你好", "你号", "拟好"], comments: ["", "", ""], labels: ["1", "2", "3"], highlighted: 0, page: 0, lastPage: true, update: true ) // Show a transient status message (e.g. schema name, option toggle) panel.updateStatus(long: "朙月拼音", short: "拼") // Hide the panel (e.g. when focus leaves the text field) panel.hide() // Query layout orientation for librime option sync let isLinear: Bool = panel.linear let isVertical: Bool = panel.vertical ``` -------------------------------- ### Update Git submodules Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Ensures all Git submodules, including dependencies, are initialized and updated. Run this if you did not clone the repository with '--recursive'. ```sh git submodule update --init --recursive ``` -------------------------------- ### Configure Per-App Options for Rime Squirrel Source: https://context7.com/rime/squirrel/llms.txt Set application-specific options in `squirrel.custom.yaml` to override global settings for individual applications. This allows for tailored input behavior based on the active app. ```yaml # ~/Library/Rime/squirrel.custom.yaml patch: app_options: # Start in ASCII (Latin) mode in terminals com.apple.Terminal: ascii_mode: true no_inline: true # disable inline preedit (panel only) com.googlecode.iterm2: ascii_mode: true no_inline: true # Vim-aware: auto-switch to ASCII when leaving insert mode org.vim.MacVim: ascii_mode: true no_inline: true vim_mode: true # Esc / Ctrl+C / Ctrl+[ triggers ascii_mode # Force inline mode (works around rendering bugs in some apps) com.google.Chrome: inline: true com.microsoft.edgemac: inline: true # Start in Chinese mode in a custom app com.example.MyApp: ascii_mode: false ``` -------------------------------- ### Package Squirrel.app Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Creates a package for Squirrel.app. Define DEV_ID for automatic code signing and notarization. Ensure your Apple Developer ID credentials are set up. ```sh make package ARCHS='arm64' ``` -------------------------------- ### Checkout Squirrel source code Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Clones the Squirrel repository and its submodules. The --recursive flag ensures submodules are initialized. ```sh git clone --recursive https://github.com/rime/squirrel.git cd squirrel ``` -------------------------------- ### SquirrelInputController API Source: https://context7.com/rime/squirrel/llms.txt SquirrelInputController bridges macOS keyboard events to librime's processing API, handling candidate selection, pagination, and caret movement. ```APIDOC ## SquirrelInputController ### Description `SquirrelInputController` subclasses `IMKInputController` and bridges macOS keyboard events to librime's `process_key` API. ### Selecting a Candidate ```swift let success: Bool = inputController.selectCandidate(0) // select first candidate ``` ### Paging Through Candidates ```swift let pagedUp: Bool = inputController.page(up: true) let pagedDown: Bool = inputController.page(up: false) ``` ### Moving the Preedit Caret ```swift let movedBack: Bool = inputController.moveCaret(forward: false) // move right let movedForward: Bool = inputController.moveCaret(forward: true) // move left ``` ### Committing Composition ```swift inputController.commitComposition(nil) ``` ``` -------------------------------- ### Handle Key Events with SquirrelInputController Source: https://context7.com/rime/squirrel/llms.txt Bridge macOS keyboard events to librime's process_key API. This controller handles candidate selection, pagination, and caret movement. ```swift // Key interaction methods called by SquirrelPanel's mouse handler: // Select the candidate at a given zero-based index on the current page let success: Bool = inputController.selectCandidate(0) // select first candidate // Page through candidates let pagedUp: Bool = inputController.page(up: true) let pagedDown: Bool = inputController.page(up: false) // Move the preedit caret one position let movedBack: Bool = inputController.moveCaret(forward: false) // move right let movedForward: Bool = inputController.moveCaret(forward: true) // move left // commitComposition is called when Squirrel loses focus, // committing any buffered raw input to the active text field. // (Called automatically by IMKit; also safe to call manually) inputController.commitComposition(nil) ``` -------------------------------- ### Reading Squirrel YAML Configuration in Swift Source: https://context7.com/rime/squirrel/llms.txt Use SquirrelConfig to open and read values from the base squirrel.yaml file. Supports reading strings, doubles, booleans, and NSColors, as well as checking for section existence and reading app-specific options. Ensure to close the config when done. ```swift import AppKit let config = SquirrelConfig() // Open the base squirrel.yaml (~/Library/Rime/squirrel.yaml) guard config.openBaseConfig() else { print("Failed to open squirrel config") exit(1) } // Read typed values — returns nil if key is absent let layout: String? = config.getString("keyboard_layout") // e.g. "last" let chordDuration: CGFloat? = config.getDouble("chord_duration") // e.g. 0.1 let showNotifs: String? = config.getString("show_notifications_when") // "appropriate" let inlinePreedit: Bool? = config.getBool("style/inline_preedit") // true let cornerRadius: CGFloat? = config.getDouble("style/corner_radius") // 7.0 let colorScheme: String? = config.getString("style/color_scheme") // "native" // Read a color (0xAABBGGRR format, sRGB or Display P3) let backColor: NSColor? = config.getColor( "preset_color_schemes/aqua/back_color", inSpace: .sRGB ) // Check if a YAML section exists let hasStyle = config.has(section: "style") // true // Read per-app options let terminalOptions: [String: Bool] = config.getAppOptions("com.apple.Terminal") // e.g. ["ascii_mode": true, "no_inline": true] // Open a schema-specific config (falls back to baseConfig for missing keys) let schema = SquirrelConfig() if schema.open(schemaID: "luna_pinyin", baseConfig: config) { let schemeFont = schema.getString("style/font_face") schema.close() } config.close() ``` -------------------------------- ### Manage Squirrel Application Lifecycle Source: https://context7.com/rime/squirrel/llms.txt Manage librime engine lifecycle, settings, auto-updates, and system notifications. Access the shared delegate from anywhere in the app. ```swift import AppKit // Access the shared delegate from anywhere in the app let delegate: SquirrelApplicationDelegate = NSApp.squirrelAppDelegate // Re-deploy: shut down librime, restart with full schema rebuild, then reload squirrel.yaml settings delegate.deploy() // Sync user dictionary data (writes snapshots to ~/Library/Rime/sync/) delegate.syncUserData() // Reload settings from squirrel.yaml without a full librime restart delegate.loadSettings() // Load per-schema style overrides (called automatically on schema switch) delegate.loadSettings(for: "luna_pinyin") // Open ~/Library/Rime/ in Finder delegate.openRimeFolder() // Open $TMPDIR/rime.squirrel/ (log directory) in Finder delegate.openLogFolder() // Trigger a Sparkle update check delegate.checkForUpdates() // Show a system notification (UNUserNotificationCenter) SquirrelApplicationDelegate.showMessage(msgText: "Deploy succeeded") // Available notification identifiers _ = SquirrelApplicationDelegate.notificationIdentifier // "SquirrelNotification" _ = SquirrelApplicationDelegate.updateNotificationIdentifier // "SquirrelUpdateNotification" // Key paths for user data _ = SquirrelApp.userDir // ~/Library/Rime/ _ = SquirrelApp.logDir // $TMPDIR/rime.squirrel/ _ = SquirrelApp.appDir // /Library/Input Methods/Squirrel.app ``` -------------------------------- ### Store Notarytool Credentials Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Stores your Apple Developer ID credentials for notarization. Replace 'your name/org' with your actual developer name. ```sh xcrun notarytool store-credentials 'your name/org' ``` -------------------------------- ### SquirrelPanel API Source: https://context7.com/rime/squirrel/llms.txt The SquirrelPanel class manages the visual display of candidate lists and status messages. It is instantiated once and reused throughout the application's lifetime. ```APIDOC ## SquirrelPanel ### Description `SquirrelPanel` is the floating `NSPanel` subclass that renders the candidate list. It is created once at launch and reused for all input sessions. ### Initialization ```swift let panel = SquirrelPanel(position: .zero) ``` ### Updating Panel Content ```swift panel.update( preedit: "nǐ hǎo", selRange: NSRange(location: 0, length: 5), caretPos: 5, candidates: ["你好", "你号", "拟好"], comments: ["", "", ""], labels: ["1", "2", "3"], highlighted: 0, page: 0, lastPage: true, update: true ) ``` ### Updating Status Message ```swift panel.updateStatus(long: "朙月拼音", short: "拼") ``` ### Hiding the Panel ```swift panel.hide() ``` ### Querying Layout Orientation ```swift let isLinear: Bool = panel.linear let isVertical: Bool = panel.vertical ``` ``` -------------------------------- ### Define Custom Color Scheme for Rime Squirrel Source: https://context7.com/rime/squirrel/llms.txt Define a custom color scheme in `squirrel.custom.yaml` to control the appearance of the Rime input panel. This includes colors for background, text, highlights, and layout options. ```yaml patch: preset_color_schemes: my_theme: name: My Custom Theme author: Your Name color_space: display_p3 # display_p3 | srgb (default) back_color: 0xEEFFFFFF # panel background (AA=EE → ~93% opaque) border_color: 0xCCCCCC # panel border (needs positive border_height/width) preedit_back_color: 0xEEEEEE # preedit area background text_color: 0x808080 # preedit text (non-highlighted) hilited_text_color: 0x000000 # preedit text (highlighted segment) hilited_back_color: 0xDDDDDD # preedit highlight background candidate_text_color: 0x333333 # non-highlighted candidate text label_color: 0x888888 # non-highlighted label (index number) comment_text_color: 0x999999 # comment / annotation text hilited_candidate_back_color: 0xFF6A00 # highlighted candidate background hilited_candidate_text_color: 0xFFFFFF # highlighted candidate text hilited_candidate_label_color: 0xFFFFFF # highlighted label text hilited_comment_text_color: 0xFFDDCC # highlighted comment text # Per-scheme layout overrides (optional) candidate_list_layout: linear inline_preedit: true corner_radius: 8 font_face: 'PingFangSC' font_point: 15 style: color_scheme: my_theme color_scheme_dark: luna # use built-in "luna" scheme in dark mode ``` -------------------------------- ### Clean Squirrel packages Source: https://github.com/rime/squirrel/blob/master/INSTALL.md Removes any generated Squirrel packages. Use this if you need to repackage the application. ```sh make clean-package ``` -------------------------------- ### Trigger Squirrel Actions via Distributed Notifications Source: https://context7.com/rime/squirrel/llms.txt Send distributed notifications to trigger Squirrel actions like re-deploying schemas or syncing user data from other processes. The equivalent shell command uses `osascript` to interact with System Events. ```swift import Foundation // Trigger a full re-deploy from another process or script DistributedNotificationCenter.default().postNotificationName( .init("SquirrelReloadNotification"), object: nil ) // Trigger user data sync from another process DistributedNotificationCenter.default().postNotificationName( .init("SquirrelSyncNotification"), object: nil ) ``` ```sh # Reload (re-deploy) Squirrel via notification osascript -e 'tell application "System Events" to do shell script \ "/Library/Input\ Methods/Squirrel.app/Contents/MacOS/Squirrel --reload"' ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.