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.
window.rs and static_config.rs locked the float, manage and other rule lists in conflicting orders, which deadlocked KDE tests and could in the daemon. Both now take the locks in one order. Found by test hangs during the merge work. The Windows and macOS trees have the same pattern by reading and were not changed. Verified: the KDE test suite no longer hangs; the VM tier was not re-run.
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).
ApplyState(State) becomes ApplyState(StateBlob) (D15): the handler reads the blob into State with serde_json::from_value and applies it as before. Wire bytes for a valid state are unchanged. Behaviour difference: a state that does not parse used to make the whole message fail to parse at the socket; now it is an error returned by the handler (logged). Nothing in this repository sends ApplyState.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean.
Moves the identical ring.rs and lockable_sequence.rs out of komorebi/src into the crate (rename). Necessary edits: lib.rs with pub use Lockable and a hidden pastey re-export; #[macro_export] on impl_ring_elements! using $crate::pastey::paste!; the doc test now says komorebi_collections::ring::Ring. The Windows tree gets the path dependency, re-exports (pub use komorebi_collections::{ring, lockable_sequence, Lockable}, #[macro_use] extern crate), forwards its schemars feature, and drops pastey again. Windows is bundled here because it is the tree the files move out of.
Verified: fast-check native, Windows clippy --all-targets -D warnings, KDE and macOS checks: PASS.
A path-input flake has no dirtyRev attribute, so evaluation failed. Falls back to "unknown" via self.dirtyRev or. An earlier same-derivation comparison was a false positive because both sides printed the same error; this fix came from retracting it. Verified: the KDE package evaluates and builds from the root flake.
The KDE flake's outputs become a function (lib.mkOutputs) of inputs, self, the repository source and the tree's directory in it. The flake's own outputs still call it with ./. and no directory, so everything evaluates standalone, but the Rust workspace can no longer be built from the nested flake alone: since step 0 it depends on ../komorebi-layouts, -scrolling and -themes, which a nested path input cannot see.
The crane source is now the repository cut down to the KDE tree, those three root crates and the root Cargo.toml (their inherited workspace dependencies come from it). cargoLock and cargoToml point into the tree and postUnpack enters it.
Verified: nix eval of packages.x86_64-linux.komorebic.drvPath on the nested flake prints a .drv; the real build is verified through the root flake (see the revision that wires it). Reindentation by nixfmt makes the diff large; the logic change is the mkOutputs wrapper, the src filter and three commonArgs attributes.
A transparent wrapper of serde_json::Value with a hand written schema (an object, named State), so that SocketMessage can carry ApplyState without the crate knowing the daemon's State type (D15/D16). On the wire it is exactly the state JSON.
Verified: native cargo test -p komorebi-protocol: 5 unit + 3 golden + 1 doctest passed, 0 failed.
New crates/komorebi-collections (edition 2024; deps pastey, serde, optional schemars feature, dev serde_json_lenient) added to the root workspace members, with an empty lib.rs. Cargo.lock for this revision alone is not refreshed (it is in the next revision).
Verified: cargo test -p komorebi-collections --offline built (0 tests yet).
Tests in komorebi/tests/schemas.rs shared one socket path and raced when run in parallel. Each test now gets its own. Verified: cargo test --workspace in the KDE tree.
Empty merge revision joining the step 0 line (path dependencies on the root layouts, scrolling and themes crates) with the KDE A3 line (path-coupling fixes). No file changes of its own, so each parent's content is kept as written. Verified: all three trees type-check on the combined line.
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.
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).
compare-gen.py defaulted to sibling checkouts of the old repos. It now defaults to the Windows tree and macOS tree that sit beside komorebi-for-kde/ in this repository. Verified: runs and finds both trees.
Step 0. KDE depended on komorebi-layouts and komorebi-themes through git revisions (6d862a11 / e8216924) that exist in no komorebi history. It now uses the path crates in the repository root so one copy is built. Cargo.lock is updated. Verified: cargo check --workspace --locked in the KDE tree.
DebugWindow(i64) as in the unified SocketMessage (D15). An id outside u32 range, which KDE used to refuse at parse time, now parses and is answered like an id of no window (no reply). Existing ids behave as before.
Verified: cargo check --workspace --all-targets in komorebi-for-kde: 0 errors; cargo test -p komorebi --test rule_commands: 6 passed, 0 failed (it sends DebugWindow).
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).
vm-mac pointed the flake at a repo root that is no longer the KDE directory. It now uses a git+file URL with ?dir=komorebi-for-kde. Verified by evaluation only; the VM was not run for this change.
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).
The unified SocketMessage has DebugWindow(i64) (D15): i64 accepts every value any tree accepts (Windows isize, KDE and macOS u32) and writes the same digits. The Windows handler and komorebi-gui convert with as (isize and i64 are the same width on the supported 64-bit targets), so Windows behaviour is unchanged.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean.
Windows ring.rs is replaced by the KDE copy (doc comments, tests, pastey::paste!, std::collections::VecDeque path). pastey 0.2 added to the root workspace deps and komorebi/Cargo.toml (paste stays: windows_api.rs and komorebic use it). The VecDeque imports in container.rs and workspace.rs only served the old macro text and are removed.
Verified: fast-check Windows clippy --all-targets -D warnings: PASS (tests compiled, not run: Windows-only).
git rev-parse --show-toplevel now returns the monorepo root, so scripts/run-kde looked in the wrong place. It now derives the KDE directory from the script path. Verified: the script locates the tree from another working directory.
Delete KDE's copy (same text after the converge revision) and re-export the crate's.
Verified: cargo check --workspace --all-targets in komorebi-for-kde: 0 errors, no warnings; komorebic static-config-schema is byte-identical to the checked-in schema.json (the KWin sentence now comes from cfg_attr in the crate).
Windows lockable_sequence.rs becomes the KDE version (module docs, Lockable defined inline); the trait is removed from lib.rs and re-exported there as pub use lockable_sequence::Lockable, so crate::Lockable paths keep working. Prepares one shared file across the three trees.
Verified: fast-check Windows clippy --all-targets -D warnings: PASS.
Merges the macOS old repo's history, with its original commit hashes, under komorebi-for-mac/. The subtree is byte-identical to the old tip 9a58e511 (306/306 renames in the move commit). Verified: tree equality, git blame, git log --follow, cargo metadata, and that no macOS workflow sits outside komorebi-for-mac/.
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.
StackbarMode, StackbarLabel, BorderStyle, BorderImplementation, HidingBehaviour and FocusFollowsMouseImplementation move verbatim from core/mod.rs to the end of crates/komorebi-protocol/src/types.rs, because the unified SocketMessage (stage 2e) carries them; they keep their platform-only status in the support table. The crate allows the deprecated HidingBehaviour::Hide that the derives touch. core re-exports all six.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean; native cargo test -p komorebi-protocol passes.
Merges the KDE old repo's history, with its original commit hashes, under komorebi-for-kde/. The subtree is byte-identical to the old tip 7d19fd40 (654/654 renames in the move commit). Verified: tree equality, git blame, git log --follow, cargo metadata, and that no KDE workflow sits outside komorebi-for-kde/.
Phase 1 of A3b. The root flake imports the nested flakes' lib.mkOutputs with the whole repository as source and re-exports packages, checks (without vm-*), nixosModules, overlays and darwinModules with kfde-/kfm- prefixes. Windows outputs are untouched. Verified: the KDE package builds; the macOS package evaluates (not built).
The KWin sentence of the description moves into cfg_attr(target_os = "linux", doc = ...) lines so the same text can be shared with Windows. Description unchanged.
Verified: komorebic static-config-schema in komorebi-for-kde is byte-identical to the checked-in schema.json; cargo check passed during the run.
Excludes /komorebi-for-kde and /komorebi-for-mac from the Windows crane source filter so their edits do not invalidate Windows builds and their Cargo.lock files are not swept in. Verified: the Windows clippy check still passes.
Windows takes the text that KDE and the crate will share: the Windows description is unchanged, KDE's extra sentence about KWin is added only under cfg_attr(target_os = "linux"), so each platform's schema.json keeps its bytes. No code change.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean.
komorebi/src/pan.rs and komorebic/src/pan.rs include_str! the .txt files in komorebic/fixtures/, which the crane source filter dropped, so the nix build failed. Adds the fixtures to the filter. Verified: nix komorebi-workspace-clippy passes.
KDE's SubscribeOptions carried a doctest that used SocketMessage; it was dropped from the shared text so the three trees could converge before the move. The crate now has a doctest that checks the wire form of the options ({"filter_state_changes":true}) and the default. The SocketMessage example returns when SocketMessage moves (2e).
Verified: native cargo test -p komorebi-protocol: 4 + 3 passed, doctest 1 passed, 0 failed.
e2e/guest/testwin/src/main.rs had an unsafe block inside an unsafe block, which clippy -D warnings rejects (unused_unsafe). Removes the inner one without changing behaviour. Verified: Windows clippy passes.
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).
Delete the seven enums from komorebi-for-kde core/mod.rs (text identical to the crate's) and re-export them from core, so existing paths stay valid.
Verified: cargo check --workspace --all-targets in komorebi-for-kde: 0 errors, no warnings; cargo test -p komorebi --lib --test schemas --test animation: passed (counts in the stage log).
SubscribeOptions, StateQuery, WindowKind, ApplicationIdentifier, MoveBehaviour, MonocleFocusBehaviour and OperationBehaviour (text identical in the three trees after the converge revisions, checked with a per-item cmp) move from core/mod.rs to crates/komorebi-protocol/src/types.rs; core re-exports them, so komorebi::core::X and komorebi::X paths are unchanged. The five Windows-only payload enums and FocusFollowsMouseImplementation stay until SocketMessage moves (stage 2e).
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean; native cargo test -p komorebi-protocol passes.
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).
The seven payload enums take the shared text (same one as the Windows revision): the Windows docs of WindowKind's variants, the Windows spelling 'behaviour' in MoveBehaviour, MonocleFocusBehaviour and OperationBehaviour, and the cfg_attr doc of ApplicationIdentifier::Class (KDE keeps 'Role or subrole'). The SubscribeOptions doc loses its doctest and its intra-doc links here; the example comes back in the crate when the type moves, and an example with SocketMessage when that moves.
Intentional schema change, description only: komorebi-for-kde/schema.json spells behaviour in three descriptions (monocle focus, move, operation). Regenerated with komorebic static-config-schema and compared with the checked-in file: identical; schema.asc.json also identical to a regeneration.
Verified: cargo test -p komorebi --lib --test schemas in komorebi-for-kde: 302 + 5 passed, 0 failed; --doc: 44 + 2 passed (one doctest fewer: SubscribeOptions).
SubscribeOptions, StateQuery, WindowKind, ApplicationIdentifier, MoveBehaviour, MonocleFocusBehaviour and OperationBehaviour take the shared text (code was already identical in the three trees; only doc comments differ). Windows gains the KDE docs of SubscribeOptions and StateQuery, and the first doc line of WindowKind (replacing 'Window kind'). The one doc that differs in meaning per platform, ApplicationIdentifier::Class (Windows: Class, macOS and KDE: role or subrole), is selected by cfg_attr(target_os = "windows", doc = ...), so the description embedded in schema.json stays 'Class' on Windows.
None of the changed docs is embedded in komorebi's schema.json (checked by grep: only the ApplicationIdentifier, MoveBehaviour, MonocleFocusBehaviour and OperationBehaviour descriptions are, and they are unchanged for Windows). Windows schema.json not regenerated (komorebic cannot run on Linux).
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean.
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).
KDE's core/animation.rs keeps only the module docs, a re-export of AnimationStyle and the KDE-only QtCurve trait; animation/prefix.rs becomes the same one-line re-exports as in the Windows tree. All paths stay valid.
Verified: cargo check --workspace --all-targets in komorebi-for-kde: 0 errors; cargo test -p komorebi --lib --test schemas --test animation: 302 + 1 + 5 passed, 0 failed (the 3 serde tests now run in the protocol crate).
The converged core/animation.rs and animation/prefix.rs (identical in the three trees apart from KDE's QtCurve trait) become crates/komorebi-protocol/src/animation.rs and animation/prefix.rs; the Windows files keep their paths as one-line re-exports, so komorebi::core::AnimationStyle and komorebi::animation::prefix::AnimationPrefix are unchanged. The three serde unit tests now run in the protocol crate.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean; native cargo test -p komorebi-protocol: 4 + 3 passed, 0 failed.
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).
KDE's AnimationPrefix gains the Transparency and Workspace variants, so that all three trees share the union {movement, transparency, workspace} (D15/D16). KDE only ever uses Movement; the new variants are accepted in the configuration and on the command line and ignored by the KDE daemon, as macOS ignores Transparency today.
Intentional schema change, regenerated with komorebic static-config-schema: in komorebi-for-kde/schema.json the per-prefix animation settings (enabled, duration, style) change from properties {movement} with additionalProperties false to additionalProperties of the value type (the same shape as the Windows schema). The animation CLI docs list the three values.
Verified: cargo test -p komorebi --lib --test schemas --test animation in komorebi-for-kde: 305 + 5 + 1 passed, 0 failed.
The enum, its serde impls and tests were already the shared text; the only difference left is the doc of CubicBezier, which now says 'Bezier' (the Windows spelling). That text is a description in schema.json, so schema.json changes in that one line (description only). QtCurve stays in this file until the type moves, then in a KDE-only file.
Verified: cargo test -p komorebi --lib --test schemas in komorebi-for-kde: 305 + 5 passed, 0 failed (the schemas test compares the checked-in schema.json).
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).
core/animation.rs takes the KDE copy's module docs and its three serde unit tests (without KDE's QtCurve trait, which stays KDE-only); prefix.rs gets the module docs. No code change: the enum, the custom serde impls and the doc comments are as before, so schema.json is unchanged.
Verified: Windows clippy --workspace --locked --all-targets -D warnings clean. The new unit tests cannot run on Linux for this tree (the same tests run in KDE and, after the move, in the protocol crate).