mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-12-02 13:14:11 +01:00
The macOS bar's battery click spawned cmd.exe /C start ms-settings:batterysaver and the update click spawned explorer.exe, neither of which exists on macOS (the move kept them on purpose, handcheck D.B). Both now go through `open`, as the CPU, memory and network clicks already did. The decision which program and arguments a click runs is a pure function, system_tool_command(&SystemTool) -> (program, args), so the argv is unit tested: task manager is `open -a 'Activity Monitor'`, the battery is `open x-apple.systempreferences:com.apple.Battery-Settings.extension` (the pane id of System Settings in macOS 13 and later, the scheme the network pane already used; unconfirmed on a real Mac, hand-check row added), a URL is opened as is, a storage label opens its path. The module is macOS only (cfg(target_os = "macos") at the crate root), so none of this is built elsewhere. BEHAVIOUR (macOS): clicks on the battery and update widgets now open something. Gate: macOS hand-check rows M1-M3 in docs/dev/macos-handcheck.md and the unit tests on the Mac (cargo test -p komorebi-bar). Verified: type-check only on Linux (see the fast-check result in the progress log); tests not run here.