mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-22 16:34:15 +01:00
komorebi-core gets `command`: the workspace navigation commands as functions generic over a CommandHost (the few window-manager operations they build on: the monitors and the focused one, the monitor under the pointer, focus_monitor, focus_workspace, move_container_to_workspace): cycle_focus_workspace, cycle_focus_empty_workspace, close_workspace, focus_last_workspace and move_container_to_last_workspace. The text is KDE's (which is macOS's); the one platform difference, that Windows lets the pointer pick the monitor first for cycle_focus_empty_workspace, close_workspace and focus_last_workspace where KDE and macOS do not, is the associated const CommandHost::POINTER_PICKS_THE_MONITOR_FOR_ALL (false by default). Nothing uses them yet. tests/commands.rs implements the host with a recording stub and mirrors the e2e checks of commands.py (cycle-workspace, cycle-empty-workspace, close-workspace, focus-last-workspace, move-to-last-workspace and send-to-last-workspace): wrap-around, the pointer's monitor, which workspaces close, going back and forth, follow and send, and the Windows switch. Verified: cargo test -p komorebi-core --features schemars (native): 30 unit + 9 command tests passed, 0 failed (and the other test files of the crate). Not run: the daemons (nothing calls the functions yet).