Commit Graph
26 Commits
Author SHA1 Message Date
LGUG2Z 89c729e731 refactor(config): move asc and the application configuration data into komorebi-config
ApplicationSpecificConfiguration, AscApplicationRulesOrSchema and AscApplicationRules are code-identical in the trees except that AscApplicationRules differs in its rule kinds: five Windows-only kinds, titleless and tabbed on KDE and macOS. The crate holds the union (declaration order floating-first as before; the platform-only fields carry x-komorebi-platforms, so a view prunes them) and, for the Windows From<Vec<ApplicationConfiguration>> conversion that the orphan rule keeps next to its types, ApplicationOptions and ApplicationConfiguration (data only: the YAML generator stays in the Windows daemon). The crate gains the color-eyre dependency.

The oracle test builds the view of ApplicationSpecificConfiguration for Windows, KDE and macOS and compares it with each tree's checked-in schema.asc.json byte for byte: all three are identical. This is the first proof that per-platform views of one union reproduce the checked-in files exactly (D17/D18); the three trees still use their own copies.

Verified: native cargo test -p komorebi-config: 4 unit + 6 schemas passed, 0 failed (tier 1).
2026-10-31 01:37:54 -07:00
LGUG2Z be0e243d04 refactor(mac): use AspectRatio and PerAnimationPrefixConfig of komorebi-config
window and animation re-export the three types from komorebi-config; the local definitions and their imports are removed, so no call site changes.

Verified: macOS fake-CC cargo check --locked --target aarch64-apple-darwin --workspace --all-targets: finished, 0 errors, no warnings in komorebi (tier 2). Not verified: macOS unit tests.
2026-10-31 01:37:54 -07:00
LGUG2Z 7ebead10aa refactor(mac): converge the docs of AspectRatio to the Windows text
Same two variant docs as in the KDE revision before: 'A predefined aspect ratio' and 'A custom W:H aspect ratio' become the Windows 'Predefined aspect ratio' and 'Custom W:H aspect ratio'.

Schema: komorebi-for-mac/schema.json cannot be regenerated on this host, so the two description lines were edited to the text of the doc comments; the file equals the old one after deleting every description (jq walk), so description-only. The next revisions compare the generated definitions of the shared crate with this file.

Verified: jq description-only comparison (4 changed lines). Doc comments only: no compile needed, not run.
2026-10-31 01:37:54 -07:00
LGUG2Z d2a975aa0a refactor(mac): use the behaviour enums of komorebi-config
core re-exports WindowContainerBehaviour, FloatingLayerBehaviour, Placement, CrossBoundaryBehaviour and WindowHidingPosition from komorebi-config; the local definitions and impls are removed, so no call site changes.

Verified: macOS fake-CC cargo check --locked --target aarch64-apple-darwin --workspace --all-targets: finished, 0 errors, no new warnings (tier 2). Not verified: macOS unit tests.
2026-10-31 01:37:54 -07:00
LGUG2Z 79c9af95d1 refactor(config): move the behaviour enums into komorebi-config
WindowContainerBehaviour, FloatingLayerBehaviour (with should_float), Placement (with should_center and should_resize), CrossBoundaryBehaviour, WindowHidingPosition (KDE and macOS), WindowHandlingBehaviour and ZOrder (with its From<ZOrder> for isize; Windows) in behaviour.rs. The text is the KDE copy for the five that all trees share (identical to the Windows and macOS copies after the previous converge revision) and the Windows copy for the two Windows-only enums. A platform-only enum is defined here without a cfg: the daemon that does not read the key says so at load time. The trees keep their copies until the next revisions. The crate gains the clap dependency (ValueEnum) and the three Cargo.lock files the package entry.

The oracle gains a check that the generated definition of each enum equals the $defs entry of every checked-in schema.json that has it (all three trees for four of them, KDE and macOS for WindowHidingPosition, Windows for the other two).

Verified: native cargo test -p komorebi-config: 4 unit + 4 schemas passed, 0 failed (tier 1).
2026-10-31 01:37:54 -07:00
LGUG2Z 5b7e769207 refactor(mac): use the matching types of komorebi-config
komorebi depends on komorebi-config (workspace dependency with the schemars feature, like komorebi-protocol) and core::config_generation re-exports the five matching types from it, so no call site changes. 84 duplicated lines are removed. Cargo.lock gains the komorebi-config package.

Verified: macOS fake-CC cargo check --locked --target aarch64-apple-darwin --workspace --all-targets: finished, 0 errors (tier 2, type-check only). Not verified: macOS unit tests (cannot run).
2026-10-31 01:37:54 -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