Skip to main content

Module config

Module config 

Source
Expand description

User configuration, persisted as TOML at the platform-standard config path.

Per-device state (button bindings, …) lives under the Config::devices map, keyed by a stable physical-device identifier such as "receiver:abc123:slot:2". Schema migrations branch on Config::schema_version.

Structs§

AppSettings
App-wide preferences not tied to any particular device.
Config
Top-level config document.
DeviceConfig
Settings scoped to a single physical device.
DeviceIdentity
Last-known identity of a device, captured while it was online so the UI can render its card and the correct config panels before any live HID++ probe completes — or while the device is asleep and can’t be probed at all.
Lighting
Per-device RGB lighting: a single static color, brightness, and on/off. Deliberately basic — per-key effects are a later addition.
SmartShift
Per-device SmartShift wheel configuration, persisted so the agent can re-apply it when the device reconnects: the values are written to device RAM and do not survive a power cycle (#189), despite earlier assumptions that the device kept them in NVM.

Enums§

Appearance
Light/dark appearance preference. System follows the OS appearance (the historical behaviour); Light / Dark force a mode regardless of the OS. Platform-free so the core crate stays GUI-agnostic — the GUI maps this onto gpui-component’s ThemeMode.
ConfigError
Failure loading or persisting config.toml. The file-scoped variants carry the offending path so callers can surface an actionable message.
GestureOwner
Which control owns a device’s single gesture role.
ScrollResolution
Vertical wheel reporting resolution for HID++ 0x2121 HiResWheel.
WheelMode
Scroll-wheel mode for SmartShift: free-spin or ratchet (clicky).

Constants§

DEFAULT_THUMBWHEEL_SENSITIVITY
Out-of-the-box AppSettings::thumbwheel_sensitivity. At this value the wheel’s horizontal scroll runs at 1× and the wheel is left to scroll natively (no HID++ diversion) unless a binding diverges from its default.
MAX_THUMBWHEEL_SENSITIVITY
Highest selectable AppSettings::thumbwheel_sensitivity.
MIN_THUMBWHEEL_SENSITIVITY
Lowest selectable AppSettings::thumbwheel_sensitivity.
SCHEMA_VERSION
The schema version the current build produces. Bumped on breaking layout changes; readers branch on the parsed value before consuming the rest of the file.
SMARTSHIFT_AUTO_DISENGAGE_DEFAULT
SmartShift auto-disengage out-of-box default (16 ≈ 4 turn/s, per the x2110 / x2111 spec). The sensitivity slider’s default and the heal target for a corrupt persisted threshold.
SMARTSHIFT_MIN_AUTO_DISENGAGE
Smallest auto-disengage threshold OpenLogi will store or apply (8 ≈ 2 turn/s). Below this the ratchet releases into free-spin at everyday scroll speeds, leaving the wheel “stuck” spinning (#317); 0 is also the firmware “do not change” sentinel that must never be stored as a real value. A persisted threshold below this floor is a corrupt artifact and is healed to SMARTSHIFT_AUTO_DISENGAGE_DEFAULT on load.