Commit Graph
23 Commits
Author SHA1 Message Date
LGUG2Z b85827e6ca refactor(mac): use the shared subscriber push
Same as the KDE revision: notify_subscribers keeps the macOS override events (Monitor, AddSubscriberSocket, AddSubscriberSocketWithOptions, Theme, ReloadStaticConfiguration, WindowManager Show) and the registry statics and hands the push to komorebi_transport::notify_sockets. 40 lines removed from lib.rs. Behaviour-preserving; logs use the target komorebi::transport (D29).

Verified: macOS fake-CC cargo check --locked --target aarch64-apple-darwin --workspace --all-targets: 0 errors, no new warnings. Unit tests cannot run on Linux.
2026-10-31 01:37:54 -07:00
LGUG2Z 866b284060 refactor(mac): use the shared command listener
Same change as the KDE revision: listen_for_commands and read_commands_uds call komorebi_transport::listen_for_commands and read_commands with NoPolicy (macOS sets no read timeouts), and WindowManager implements CommandTarget (clone of command_listener under the lock, try_lock_for on parking_lot, is_paused, process_command). #[tracing::instrument] stays on listen_for_commands. read_commands_uds keeps its name and signature for the unit test. Behaviour-preserving, not a literal text move; logs now use the target komorebi::transport (D29). 75 lines of loop code removed from process_command.rs.

Verified: macOS fake-CC cargo check --locked --target aarch64-apple-darwin --workspace --all-targets: 0 errors. macOS unit tests cannot run on Linux.
2026-10-31 01:37:54 -07:00
LGUG2Z 587defe3c9 refactor(mac): use the shared pause filter
read_commands_uds now asks komorebi_transport::allowed_while_paused instead of listing TogglePause, State, GlobalState and Stop in a match. Same behaviour: while paused those four are handled, any other message is dropped with the same trace log, and the connection ends after either. komorebi-transport is added as a path dependency of the macOS workspace.

Verified: macOS fake-CC cargo check --locked --target aarch64-apple-darwin --workspace --all-targets in komorebi-for-mac: 0 errors (warnings only, pre-existing). Unit tests cannot run on Linux.
2026-10-31 01:37:53 -07:00
LGUG2Z 374ad1bad5 chore(repo): combine step 2 with the integration line
Merge revision: wip-main (history merges, fixes, step 0 path dependencies, step 1 komorebi-collections, KDE A3 fixes, flake phase 2) and wip-step2 (the komorebi-protocol crate, goldens and the unified SocketMessage used by all three trees). Conflicts in the root Cargo.toml members line, the trees' Cargo.toml dependency tables and the Cargo.lock files are resolved in this revision by keeping both sides' additions.
2026-10-31 01:37:53 -07:00
LGUG2Z a4996ac633 refactor(protocol): use SocketMessage from komorebi-protocol in the macOS daemon
Delete macOS's SocketMessage, as_bytes and FromStr and its now unused imports, and re-export the crate's SocketMessage from core. process_command stays an exhaustive match: the 41 variants macOS does not handle (33 Windows only, 6 Windows and KDE, 2 KDE only) get one explicit or-pattern arm that writes the 'not supported on this platform' reply and returns before anything else happens. Behaviour change: those variants used to fail to parse on macOS and now parse and are answered that way.

Verified: fast-check macOS (fake CC) cargo check --workspace --all-targets: PASS (0 errors, only the existing komorebi-bar warnings). macOS tests not run (cannot).
2026-10-31 01:37:53 -07:00
LGUG2Z 68601ced53 build(nix): give the KDE and macOS builds the shared crates directory
The nested flakes cut the repository down to their own tree and the root crates they depend on by path (rootCrates). Step 1 added crates/komorebi-collections, which both trees now depend on, so crates/ must be in that list or the root flake cannot build kfde (and kfm cannot evaluate its sources). Listing the directory rather than each crate means later shared crates (protocol, config, ...) are picked up without another flake change. Verified: see the following progress entry.
2026-10-31 01:37:53 -07:00
LGUG2Z 8c22a18dce chore(repo): combine the flake phase 2 work with the integration line
Merge revision: wip-main (history merges, fixes, step 0 path dependencies, step 1 komorebi-collections, KDE A3 fixes) and wip-flake (the root flake builds the KDE package with the whole repository as source, the macOS package evaluates the same way, the root flake no longer requires dirtyRev). The root flake.lock pins the content of the nested flakes, so it is relocked in the next revision.
2026-10-31 01:37:53 -07:00
LGUG2Z 334e56b687 refactor(mac): take ring and lockable_sequence from the komorebi-collections crate
Deletes the macOS copies, adds the komorebi-collections path dependency via the workspace table, re-exports ring and lockable_sequence from lib.rs, #[macro_use] extern crate for impl_ring_elements!, and forwards the schemars feature. Cargo.lock updated.

Verified: fast-check macOS fake-CC cargo check --workspace --all-targets: PASS. Not run: tests.
2026-10-31 01:37:53 -07:00
LGUG2Z 4fc3f8e139 build(nix): let the macOS flake take the repository as its source
Same change as for the KDE flake: lib.mkOutputs takes inputs, self, the repository source and the tree's directory; the crane source is the macOS tree plus komorebi-layouts, -scrolling, -themes and the root Cargo.toml; cargoLock, cargoToml and postUnpack point into the tree. The nested flake's own outputs call it with ./. and keep evaluating, but cannot build the Rust workspace on their own.

Verified: nix eval --raw of packages.aarch64-darwin.komorebic.drvPath on the nested flake prints a .drv (evaluated only; nothing darwin was built).
2026-10-31 01:37:53 -07:00
LGUG2Z 5c129ab59d refactor(mac): carry DebugWindow as i64
DebugWindow(i64) as in the unified SocketMessage (D15); the comparison with the accessibility window id widens the u32 side, so behaviour for valid ids is unchanged (a negative or oversized id now parses and matches no window).

Verified: fast-check macOS (fake CC) cargo check --workspace --all-targets: PASS.
2026-10-31 01:37:53 -07:00
LGUG2Z e9e62319e8 refactor(ring): make the macOS ring.rs identical to the documented one
macOS ring.rs becomes the KDE copy (doc comments, unit tests, std path in the macro; pastey was already used). After this the three ring.rs and lockable_sequence.rs files are byte-identical (cmp).

Verified: fast-check macOS fake-CC cargo check --workspace --all-targets: PASS. Not run: tests (macOS cannot run).
2026-10-31 01:37:53 -07:00
LGUG2Z 1f2f477d2f refactor(lockable): document LockableSequence in the macOS tree as the other trees do
macOS lockable_sequence.rs becomes the KDE copy; the only difference is the module doc header.

Verified: fast-check macOS fake-CC cargo check --workspace --all-targets: PASS. Not run: tests (macOS cannot run).
2026-10-31 01:37:53 -07:00
LGUG2Z ec0c58bc78 refactor(mac): depend on the layouts and themes crates of this repository by path
Step 0 for macOS: replaces the git revision dependencies on komorebi-layouts and komorebi-themes with path dependencies on the root crates, keeping the darwin and schemars features. Verified: macOS type-check with the fake C compiler (check only, nothing linked or run).
2026-10-31 01:37:53 -07:00
LGUG2Z e4e196fd76 fix(mac): tolerate a missing self.dirtyRev when the flake is a path input
Same dirtyRev fallback as the KDE flake, for the macOS flake. Verified by evaluation only (darwin outputs cannot be built on Linux).
2026-10-31 01:37:53 -07:00
LGUG2Z fc02fb9c96 fix(mac): resolve check_schema_docs.py root from the script location
The script assumed it ran from the repository root, which is now komorebi-for-mac/ inside a larger repo. It now finds the root from its own path. Verified by running it from two working directories.
2026-10-31 01:37:53 -07:00
LGUG2Z 6ae2db8389 refactor(protocol): use the seven common payload enums from komorebi-protocol in macOS
Delete the seven enums from komorebi-for-mac core/mod.rs (text identical to the crate's) and re-export them from core.

Verified: fast-check macOS (fake CC) cargo check --workspace --all-targets: PASS (type-check only).
2026-10-31 01:37:53 -07:00
LGUG2Z 3efd1420de refactor(mac): converge the payload enums of core/mod.rs to the shared text
The seven payload enums take the shared text (same as the Windows and KDE revisions): WindowKind gets the Windows variant docs, SubscribeOptions and StateQuery get the KDE docs, ApplicationIdentifier::Class gets the cfg_attr doc (macOS keeps 'Role or subrole'). The spelling of Move, MonocleFocus and OperationBehaviour was already the Windows one on macOS.

komorebi-for-mac/schema.json needs no change: none of the changed docs is embedded in it (grep: WindowKind, SubscribeOptions, StateQuery are not in the schema; the four embedded descriptions are unchanged).

Verified: fast-check macOS (fake CC) cargo check --workspace --all-targets: PASS. macOS tests not run (cannot).
2026-10-31 01:37:53 -07:00
LGUG2Z 0137acf26d refactor(protocol): use AnimationStyle and AnimationPrefix from komorebi-protocol in macOS
macOS's core/animation.rs and animation/prefix.rs become the one-line re-exports of the crate's types (same files as the Windows tree), so all existing paths keep working.

Verified: fast-check macOS (fake CC) cargo check --workspace --all-targets: PASS (type-check only).
2026-10-31 01:37:53 -07:00
LGUG2Z 975f007af2 refactor(mac): converge animation/prefix.rs to the shared AnimationPrefix
macOS's AnimationPrefix gains Transparency (it had movement and workspace), so all three trees share the union {movement, transparency, workspace} (D15/D16); the macOS daemon ignores Transparency as before in practice. prefix.rs is now the Windows text plus module docs (this adds new_animation_key to macOS).

Intentional schema change: komorebi-for-mac/schema.json gets the same shape change as the KDE one (per-prefix animation settings become additionalProperties of the value type). Because a macOS komorebic cannot run here, the three PerAnimationPrefixConfig definitions were copied from the schema that the KDE komorebic generated from identical code (jq, the file round-trips byte-identically through jq --indent 2); not regenerated on macOS. The animation CLI docs list the three values.

Verified: fast-check macOS (fake CC) cargo check --workspace --all-targets: PASS. macOS tests and schema generation not run (cannot).
2026-10-31 01:37:53 -07:00
LGUG2Z eb903bccc5 refactor(mac): converge core/animation.rs and animation/prefix.rs to the shared version
core/animation.rs takes the shared copy (module docs, three serde unit tests) and its one doc comment now reads 'Bezier' like the Windows copy; that text is the description of the CubicBezier branch in schema.json, so schema.json changes in that one line (description only; the Windows schema keeps its text). prefix.rs gets the module docs; the macOS-only AnimationPrefix (no Transparency) is converged in the next revision.

Verified: fast-check macOS (fake CC) cargo check --workspace --all-targets: PASS. jj diff of schema.json: the single description line. macOS tests not run (cannot).
2026-10-31 01:37:53 -07:00
LGUG2Z a617723fea refactor(protocol): use pathext from komorebi-protocol in macOS
Delete komorebi-for-mac/komorebi/src/core/pathext.rs (identical to the crate's copy) and re-export komorebi_protocol::pathext from core. komorebi-protocol becomes a workspace dependency of komorebi-for-mac; its Cargo.lock gains the package.

Verified: fast-check macOS (fake CC) cargo check --locked --workspace --all-targets: PASS (type-check only, no macOS tests can run).
2026-10-31 01:37:53 -07:00
LGUG2Z d4fc5ba635 refactor(mac): converge core/pathext.rs to the shared version
The macOS copy gains the module docs, the ~ special case is enabled on every unix (it was target_os = "macos" only, which is a subset) and the test is split by platform. ResolvedPathBuf's schema description is selected by cfg(target_os = "windows"), so macOS keeps its text and schema.json is unchanged.

Verified: fast-check macOS (fake CC) cargo check --workspace --all-targets: PASS, 0 errors. macOS unit tests cannot run on Linux (not verified).
2026-10-31 01:37:53 -07:00
LGUG2Z 524074edfd chore(repo): move into komorebi-for-mac/ 2026-10-30 19:28:07 -07:00