Commit Graph
2522 Commits
Author SHA1 Message Date
LGUG2Z 4831a6c3ab refactor(bar-core): WidgetConfig with a variant for every widget lives in the core
The widget configuration enum moves to widgets/widget.rs of the core with
all thirteen variants (Keyboard, Media and Systray are no longer cfg-gated
or commented out per tree), plus `supported()`/`unsupported()`/`enabled()`
(enabled is now false for a widget the platform cannot run) and
`warn_unsupported`, which both shells call when they read the config. The
construction of the widget from its config (`as_boxed_bar_widget`, which
needs the runtime types) becomes the extension trait `WidgetConfigExt` in
each shell widget.rs; macOS builds a no-op `Unsupported` for the three
Windows-only widgets, which `enabled()` never lets through.

BEHAVIOUR (macOS), per D-coord-1: a macOS config with a `Keyboard`, `Media`
or `Systray` widget is now accepted and skipped with a logged warning ("the
Keyboard widget is not supported on this platform and is skipped"); before
it failed to deserialize (unknown variant), so the whole bar config was
rejected. Mac hand check: such a config starts the bar and logs the
warning. The macOS schema view removes the three variants from the
schema, so komorebi-for-mac/schema.bar.json and the nix options do not
change.

Verified: schema harness macOS and Windows byte-identical (3,774 / 9,091
lines); native bar-core tests 3+5; Windows clippy -D warnings --locked
clean (re-run after touching the files: Checking komorebi-bar-core and
komorebi-bar); macOS fake-CC check --locked 0 errors. Not run: the bars.
2026-10-31 10:51:02 -07:00
LGUG2Z a57648f36d refactor(bar-core): move the network widget config types into the core
NetworkConfig, NetworkSelectConfig, InterfaceDisplayType and
DefaultInterfaceConfig move to widgets/network_config.rs (the macOS file had
the first two without default_interface_options). The union NetworkConfig
therefore also has `default_interface_options` on macOS. The macOS schema
view already removes it from the schema, and serde ignored the key before,
so reading a config is unchanged; the macOS network widget now logs a
warning when the key is set ("not supported on macOS and is ignored").

BEHAVIOUR (macOS): one new log line when `default_interface_options` is
configured; nothing else. Needs no gate beyond the Mac hand check listed in
docs/dev/macos-handcheck.md.

Verified: schema harness macOS and Windows byte-identical (3,774 / 9,091
lines; the macOS view is what removes the field); native bar-core tests
3+5; Windows clippy -D warnings --locked clean; macOS fake-CC check
--locked 0 errors.
2026-10-31 10:48:17 -07:00
LGUG2Z c2e6b01f89 refactor(bar-core): move the komorebi widget config types and KomorebiLayout into the core
The seven Komorebi*Config structs (komorebi.rs) and the KomorebiLayout enum
with its hand-written Deserialize and Display (komorebi_layout.rs) are data:
they move to crates/komorebi-bar-core/src/widgets/komorebi_config.rs, which
needs komorebi-layouts (DefaultLayout; schemars forwarded) and color-eyre
in the core: two lines in each Cargo.lock. The two shells re-export them.
The inherent impl of KomorebiLayout (is_default, on_click, show_icon, show,
the egui painting) cannot stay an inherent impl of a foreign type: it
becomes the extension trait `KomorebiLayoutExt` in each shell with the same
bodies; komorebi.rs imports the trait. Because the types are no longer in
the shell file, the two komorebi_layout.rs differ no more than the Windows
one; the macOS widget files keep their own komorebi.rs runtime.

Verified: schema harness macOS and Windows byte-identical (3,774 / 9,091
lines); native bar-core tests 3+5; Windows clippy -D warnings --locked
clean; macOS fake-CC check --locked 0 errors (core files touched first). I
reverted a stray `cargo fmt --all` that had reformatted unrelated files.
Not run: the bars.
2026-10-31 10:47:01 -07:00
LGUG2Z cb8fc00afb refactor(mac-bar): converge komorebi.rs config text and komorebi_layout.rs onto the Windows source
Schema-text differences only, so that the config types can move into the
core: the macOS KomorebiLayout gets `#[serde(untagged)]` (its Deserialize is
hand-written and nothing in the bar serializes a layout, so no runtime
effect; it only changes the generated schema and the derived Serialize),
`eyre::Result` and `1.0_f32`; KomorebiFocusedContainerConfig::show_icon gets
the Windows `#[deprecated]` and doc (with `#[allow(deprecated)]` at the one
use). The macOS schema view already sets the macOS text of KomorebiLayout
and show_icon back, so komorebi-for-mac/schema.bar.json and
nix/komorebi-bar-options.nix do not change. The coordinator asked to leave
komorebi_layout alone: this was done because the evidence says it is not a
behaviour difference (custom Deserialize, no serialization anywhere in the
macOS bar: `grep to_string|to_value|to_writer` finds none); it is a separate
revision and can be dropped.

Verified: schema harness macOS and Windows byte-identical (3,774 / 9,091
lines); the two komorebi_layout.rs are byte-identical and the config region
of the two komorebi.rs is identical; Windows clippy -D warnings --locked
clean; macOS fake-CC check --locked 0 errors.
2026-10-31 10:43:56 -07:00
LGUG2Z e1820d9bbe refactor(bar-core): move the config types of the Keyboard, Media and Systray widgets into the core
KeyboardConfig, MediaConfig, SystrayConfig, OverflowTogglePosition,
ButtonPosition, FieldMatch and HiddenIconRule (pure data: serde and schemars
derives, no platform code) move from the Windows widget files to
crates/komorebi-bar-core/src/widgets/platform_config.rs, so that the next
revision can give WidgetConfig a variant for every widget. The Windows
widget files re-export them (`pub use`), so no other file changes; the
runtime halves (Win32, systray_util) stay in komorebi-bar. The core gains the
komorebi-config dependency (for MatchingStrategy; the schemars feature now
forwards to komorebi-config and komorebi-protocol); one line in each
Cargo.lock. Nothing on macOS refers to the types yet, so the macOS schema
cannot change. The schema harness (out of tree) no longer slices systray.rs
by line number.

Verified: schema harness macOS and Windows byte-identical (3,774 / 9,091
lines); native bar-core tests 3+5; Windows clippy -D warnings --locked
clean; macOS fake-CC check --locked 0 errors. Not run: the bars.
2026-10-31 10:42:45 -07:00
LGUG2Z a290449763 refactor(bar-core): move the applications widget into komorebi-bar-core
Move of the (now byte-identical) applications.rs of both bars to
crates/komorebi-bar-core/src/widgets/applications.rs. Edits: `PathExt` comes
from komorebi_protocol::pathext (what komorebi_client re-exports; it picks
%VAR% handling by target_os), `ImageIcon` from widgets::icons. The core
gains the komorebi-protocol (default features off) and tracing dependencies:
two lines in each Cargo.lock. Both bars re-export the module. 409 lines per
bar are gone. The schema harness now builds a copy of the core next to its
copy of komorebi-protocol (out of tree).

Verified: schema harness macOS and Windows byte-identical (3,774 / 9,091
lines); native bar-core tests 3+5; Windows clippy -D warnings --locked
clean; macOS fake-CC check --locked 0 errors. Not run: the bars.
2026-10-31 10:40:07 -07:00
LGUG2Z 1bc806c9d9 refactor(bar): converge applications.rs of both bars behind BarPlatform::command_icon
The two applications.rs differed in how an application icon is found for a
command string. The shared file now asks the platform (new hook
`BarPlatform::command_icon(&str) -> Option<ImageIcon>`). Windows os.rs gets
the former `UserCommand::get_executable` logic verbatim (as the private
`executable_of`) and the windows-icons lookup; macOS returns None, exactly
what its commented-out version did. `1.0` vs `1.0_f32` unified. The two
files are now byte-identical. No schema text changes.

Known and preserved: `UserCommand::launch_if_ready` spawns `cmd /C <command>`
in both bars, so launching an application from the macOS bar is broken (it
was before).

Verified: schema harness macOS and Windows byte-identical; Windows clippy
-D warnings --locked clean; macOS fake-CC check --locked 0 errors. Not run:
the bars.
2026-10-31 10:35:25 -07:00
LGUG2Z 0c197e8652 refactor(bar-core): move ImageIcon, ImageIconId and the icons cache into the core
The icon cache (IconsCache, ICONS_CACHE, ImageIcon, ImageIconId,
rgba_to_color_image) was in widgets/mod.rs of both bars with two small
differences: Windows has `Hwnd(isize)`, `SystrayIcon(String)` and `remove`,
macOS has `WindowId(u32)` and a private rgba_to_color_image. The core file
is the Windows one with the macOS variant and `From<u32>` added (an enum
with every variant, as D26 does for WidgetConfig); both bars re-export the
items from widgets/mod.rs so no widget changes. The core gains the `image`
dependency (one line in each Cargo.lock) and a Default impl for IconsCache
(clippy).

Verified: schema harness macOS and Windows byte-identical (3,774 / 9,091
lines); native bar-core tests 3+5; Windows clippy -D warnings --locked
clean; macOS fake-CC check --locked 0 errors (re-run after touching the core
files). Not run: the bars.
2026-10-31 10:30:21 -07:00
LGUG2Z e7cf89d8f5 docs(bar): the plan for one komorebi-bar, with measured blockers
docs/dev/bar-unification.md: why config.rs, bar.rs and komorebi.rs are not
moved yet, file by file with the measured difference (differing lines and
hunks), the structural blocker (two Cargo workspaces/lockfiles/flakes, two
komorebi-client crates), the schema views that settle schema.bar.json, the
ordered plan, KDE (no bar exists), the macOS commands that spawn cmd.exe or
explorer.exe and are preserved in os.rs, and what must be checked by hand on
Windows and on a Mac.

Verified: figures from diff on this tree; no code changed. Gates at this
tip: schema harness macOS and Windows byte-identical, native bar-core tests
3+5 passed, Windows clippy and macOS fake-CC check clean.
2026-10-31 10:22:30 -07:00
LGUG2Z 60fcd3071a refactor(bar-core): move the time widget into komorebi-bar-core
Pure move of the (now byte-identical) time.rs of both bars into
crates/komorebi-bar-core/src/widgets/time.rs; the only edit is the path of
Alignment. komorebi-bar-core gains the lazy_static dependency (TIME_RANGES);
Cargo.lock of the root and of komorebi-for-mac get that one line. Both bars
re-export the module. 541 lines per bar are gone.

Verified: schema harness: macOS byte-identical (3,774 lines), Windows
byte-identical (9,091 lines); native bar-core tests 3+5 passed; Windows
clippy -D warnings clean (--locked); macOS fake-CC check --locked 0 errors.
Not run: the bars.
2026-10-31 10:18:21 -07:00
LGUG2Z 3c5dac814c refactor(mac-bar): converge time.rs onto the Windows spelling
The two time.rs differed in three lines: a `default = false` schema
attribute on changing_icon and the variant title "Default" for
TimeFormat::Custom (both only in the macOS file; the title is a macOS
mislabel), and `1.0` vs `1.0_f32` (same type). The macOS source now reads
as the Windows one; the macOS schema view (komorebi_bar_core::schema) sets
the macOS text back, so komorebi-for-mac/schema.bar.json and
nix/komorebi-bar-options.nix are unchanged. The two files are now
byte-identical.

Verified: schema harness: macOS byte-identical (3,774 lines), Windows
byte-identical (9,091 lines); Windows clippy -D warnings clean; macOS
fake-CC check 0 errors.
2026-10-31 10:15:33 -07:00
LGUG2Z d8aa0dcd62 refactor(bar-core): move the storage widget into komorebi-bar-core
Pure move of the (now byte-identical) storage.rs of both bars into
crates/komorebi-bar-core/src/widgets/storage.rs; the only edit is the path
of Alignment (crate::bar::Alignment -> crate::alignment::Alignment). Both
bars re-export it (`pub use komorebi_bar_core::widgets::storage`), so no
other file changes. 207 lines per bar are gone.

Verified: schema harness: macOS byte-identical (3,774 lines), Windows
byte-identical (9,091 lines); native bar-core tests 3+5 passed; Windows
clippy -D warnings clean; macOS fake-CC check 0 errors. Not run: the bars.
2026-10-31 10:14:41 -07:00
LGUG2Z bfddb6f0c3 refactor(bar): converge storage.rs of both bars behind a platform hook
The two storage.rs differed in the click handler and in four doc strings.
The click now asks the platform (new SystemTool::StorageLocation(label)) and
each shell keeps exactly what it spawned: Windows `cmd.exe /C explorer.exe
<first word of the label>`, macOS `open <label without its last word>`. The
macOS doc strings take the Windows spelling (C:\, Local Disk); the macOS
schema view sets the macOS text back, so komorebi-for-mac/schema.bar.json
and nix/komorebi-bar-options.nix do not change.

Verified: schema harness S/bar2/regen.sh: macOS byte-identical (3,774
lines), Windows byte-identical (9,091 lines); the two storage.rs are now
byte-identical to each other; Windows clippy -D warnings clean; macOS
fake-CC check 0 errors. No click was exercised (cannot here).
2026-10-31 10:13:25 -07:00
LGUG2Z 352cda3be3 refactor(bar): print --schema through the platform view
Both bars now print `schema.bar.json` as the view of the generated union
schema (komorebi_bar_core::schema::generated_text): Windows through the
Windows view (the identity), macOS through the macOS view. The sources of
both bars are still separate, so the generated text is what it was and the
macOS changes set what is already there (they are idempotent); this is the
switch that lets the next revisions move code that differs only in schema
text into the core in the Windows spelling.

Verified: out-of-tree schema harness (S/bar2/regen.sh, real sources, bins
updated to call generated_text): macOS byte-identical to
komorebi-for-mac/schema.bar.json (3,774 lines), Windows byte-identical to
schema.bar.json (9,091 lines). Native bar-core tests 3+5 passed, Windows
clippy -D warnings clean, macOS fake-CC check 0 errors. The binaries were
not run (cannot on Linux).
2026-10-31 10:09:33 -07:00
LGUG2Z 280eea6fec feat(bar-core): per-platform views of one union bar schema
The Windows schema.bar.json is the union of the bar configuration (every
widget, the mouse options, Windows spelling). New module `schema` holds the
macOS view as data: 16 changes (set text/defaults that read differently,
remove the mouse property, the Keyboard/Media/Systray widget variants and
the NetworkConfig default_interface_options) followed by pruning of the
definitions nothing refers to any more. Same design as komorebi-config
(schema.rs, changes.rs); the changes are idempotent so a bar can print its
own generated schema through its view.

Nothing uses the views yet; no bar source changed.

Verified: native `cargo test -p komorebi-bar-core` 3 unit + 5 oracle passed
(new: the macOS view of the checked-in Windows file is byte-identical to
komorebi-for-mac/schema.bar.json; the Windows view is the Windows file; a
view is idempotent). Windows clippy -D warnings clean; macOS fake-CC check
0 errors. Not verified: nothing rendered.
2026-10-31 10:00:37 -07:00
LGUG2Z 633e7453cd chore(nix): regenerate the KDE options file from the current schema
Regenerated komorebi-for-kde/nix/komorebi-options.nix from schema.json with schemars-nixgen (50ce286: sorted output, hash first line) and nix fmt. The checked-in file was stale after steps 2 and 3 changed description lines in the schema. Verified: nix build of kfde-schema-fresh and kfde-nix-options-validation from the root flake both succeed.
2026-10-31 08:45:32 -07:00
LGUG2Z 9c3dcf8159 chore(nix): regenerate the macOS options files with the hash line
Regenerated komorebi-options.nix and komorebi-bar-options.nix from schema.json and schema.bar.json with schemars-nixgen (50ce286: sorted output, hash first line), then nix fmt from the root flake's formatter because the macOS flake has none on Linux. The generator was not run from the macOS tree's own just recipe. Verified: not built or evaluated on macOS; the macOS flake has no schema-fresh check, so the hash line is informational.
2026-10-31 08:45:32 -07:00
LGUG2Z a415922a46 build(kde): let schemars-nixgen write the schema hash line in nixgen
schemars-nixgen now writes the `# schema-sha256:` first line itself (schemars-nixgen 50ce286), so the justfile's printf and mv step would add a second one. Removes them and updates the comment. Verified: 'just nixgen' itself was not run (the recipe also builds a check); the same steps by hand gave a first line equal to `nix hash file --type sha256 --base16 schema.json`.
2026-10-31 08:45:32 -07:00
LGUG2Z 83819b22b1 docs(backend): focus is one call on Windows and macOS too
The doc of Backend::focus said Windows and macOS do focus and then center_cursor_in; writing the adapters showed that Window::focus on both takes mouse_follows_focus and centres the pointer itself (Windows also defers the focus while the window slides in). Doc comment only.

Verified: see the gates below; native cargo test -p komorebi-backend passes (doctests unchanged).
2026-10-31 01:37:54 -07:00
LGUG2Z 7260c9f772 docs(seam): findings from the 7c adapters (section 9)
Appends section 9 to docs/dev/seam.md: for each method of the shared Backend, what WindowsBackend and MacosBackend do and where that differs from what the daemon calls today (windows() and macOS's registry cannot be written faithfully; set_rect on Windows drops the top flag and keeps animation and guards; hide/restore results are ignored on Windows; macOS hide needs a corner and a display; raise on macOS also focuses; macOS monitors() has to be a main-thread-refreshed cache; set_opacity on Windows is the plain write). Concludes that the trait did not have to change and records three proposals (rect as Option, hide's hidden inputs, windows() as start-up operation).

Verified: docs only, not built. Every claim is by reading the code while writing the adapters; what could not be settled by reading is marked 'not verified' in the text.
2026-10-31 01:37:54 -07:00
LGUG2Z bd3454e433 feat(macos): MacosBackend, a compile-only adapter for the shared Backend
komorebi::macos_backend::MacosBackend implements komorebi_backend::Backend over the existing MacosApi, Window and AdhocWindow functions. It is NOT used by the daemon (no call site changed; that is step 11). No capability is supported (workspaces, maximize, opacity and focus-follows-mouse answer Unsupported).

Because nothing on macOS acts from a bare id, the adapter owns the id registry of seam.md consequence (1): the daemon would register(Window) and forget(id), every method looks the Window up by id and an unknown id is WindowGone. monitors() reads a cache that refresh_monitors(MainThreadMarker) fills on the main thread (the TARGET rule: no Backend method waits for main; the live NSScreen query panics off main). begin_batch/end_batch hold a stack of SkyLight BatchedUpdates guards. The parts that cannot be written faithfully (windows() is the registry, hide needs a corner and a display the trait has no place for, raise also focuses, no minimized/alive query that does not round-trip to the app, ...) are commented where they are and listed in seam.md section 9 (next revision).

komorebi-for-mac gains the komorebi-backend path dependency (workspace dependency, komorebi/Cargo.toml, Cargo.lock).

Verified: macOS fake-CC cargo check --locked --target aarch64-apple-darwin --workspace --all-targets: finished, 0 errors, no warning in macos_backend.rs. Not run: unit tests (macOS code cannot run here).
2026-10-31 01:37:54 -07:00
LGUG2Z 76d25c8843 feat(windows): WindowsBackend, a compile-only adapter for the shared Backend
komorebi::windows_backend::WindowsBackend implements komorebi_backend::Backend over the existing static WindowsApi and Window methods. It is NOT used by the daemon (no call site changed; that is step 8). A window is WindowId::from_hwnd(hwnd) (every bit kept), a monitor MonitorId::from_hmonitor; maximize, opacity and focus-follows-mouse are supported, the five workspace methods answer Unsupported, batches are no-ops.

Methods that cannot be written without a difference in semantics are commented where they are and will be listed in docs/dev/seam.md section 9 (next revision): set_rect (the top flag is dropped; Window::set_position keeps its animation, slide-in, live-resize guard and same-frame skip), hide/restore/minimize/unminimize/maximize (ShowWindow results are ignored, so only an IsWindow pre-check can say WindowGone; hide and restore also drive the border and HIDDEN_HWNDS), windows() (alt-tab list, not the core's filtered candidates), set_opacity (plain write, not the animated, globally-configured Window::transparent), monitor_from_point (nearest monitor, never None).

Verified: nix develop cargo clippy --workspace --locked --all-targets -- -D warnings finished with no warnings or errors. Not run: unit tests (Windows code cannot run here).
2026-10-31 01:37:54 -07:00
LGUG2Z 9bf77e32b9 feat(kde): KDE backends implement the shared Backend through Shared
komorebi::backend::shared::Shared<B> wraps any KDE Backend (the KWin one, the fake, a dyn Backend) and implements komorebi_backend::Backend over it, so KDE is the first implementation of the shared trait without any change to its own trait or call sites. Ids are WindowId::from_u32 (an id wider than u32 is a window KDE never had); a failed window command becomes Error::WindowGone when the window is no longer alive and Error::Platform(report) otherwise; every optional field is Some; every Capability is supported; batches are no-ops (KDE batches by construction).

Tests (5, in backend/shared.rs): the KDE fake, through Shared, passes the shared contract (check_all); the error mapping; wide ids; every capability supported; fields coming through.

Verified: komorebi-for-kde cargo test --workspace --no-fail-fast: 881 passed, 0 failed over 80 binaries (876 baseline + these 5). clippy -D warnings on komorebi-for-kde reports 3 ptr_arg errors in static_config.rs that predate this work; none in backend/.
2026-10-31 01:37:54 -07:00
LGUG2Z 1497e5d62a refactor(kde): the fake backend wraps komorebi-backend's FakeBackend
komorebi::backend::fake::FakeBackend (and Command) keep their paths, signatures (u32 ids, eyre errors, the 18-variant Command) and behaviour, but the desktop is now komorebi_backend::fake::FakeBackend. The KDE type wraps it and translates ids and errors ('no such window: <id>' text is unchanged); the commands and state that only KDE has (apply_look, set_border_colours, set_wallpaper, drag_end and their getters) stay in the wrapper, and their commands are logged in the shared fake's log (Command::Ext) so their order among the others is kept. KDE's own trait Backend is untouched: that is the least invasive route, no call site and no test body changes (the 26 unit tests of fake.rs stay in the file byte for byte and now test the wrapper).

Cargo: komorebi-for-kde gains the komorebi-backend path dependency (workspace dependency plus komorebi/Cargo.toml; Cargo.lock updated).

Verified: in komorebi-for-kde, cargo test --workspace --no-fail-fast: 876 passed, 0 failed over 80 binaries (identical to the baseline; counts unchanged because the fake.rs tests were kept and the crate's tests are additional). The shared crate's own tests are counted separately.
2026-10-31 01:37:54 -07:00
LGUG2Z 998396dfc5 test(backend): contract tests that any Backend must pass
komorebi_backend::contract: a Harness trait (how a test puts a live window on the desktop of the backend under test) and 14 checks, run by check_all::<H>(): windows listed by id; window agrees with windows/is_window/window_rect; an unknown window is not a window; every window command on an unknown or on a destroyed window fails with WindowGone naming that window; a destroyed window is neither alive nor listed; set_rect on a live window succeeds and the frame stays readable (a request: the value read is not checked); hide/restore tolerate repeats; focus names a known window; capabilities and Unsupported agree (supported means never Unsupported, unsupported means always Unsupported, with a live or unknown window); monitors are sane and found by point; Batch scopes nest around writes; the backend works from another thread; it is usable as a trait object.

Only what the Backend documentation promises is checked, because a write is a request and platforms act at different speeds. The fake passes under three configurations (plain, with a frame offset, with no capability at all, as macOS would be) and a deliberately broken backend (set_rect answers Ok for a gone window) is shown to fail exactly the two checks that cover it.

Verified: native cargo test -p komorebi-backend: 29 unit tests passed, 6 doctests passed, 1 compile_fail doctest passed, 0 failed; clippy --all-targets -D warnings clean.
2026-10-31 01:37:54 -07:00
LGUG2Z 6874a51769 feat(backend): FakeBackend with failure injection and frame offsets
The in-memory desktop of komorebi-for-kde (backend/fake.rs) moved into the shared crate, rewritten against WindowId/MonitorId/Result and the generic Backend only (look, border colours, wallpaper and drag frames stay out: they are KDE's).

Same behaviour as the KDE fake (permissive mode, minimum sizes, user_* helpers, maximize, fullscreen, workspaces, the ordered Command log with 15 of KDE's 18 variants; close() leaves the foreground window alone, as KDE's did), plus:
- failure injection: fail_next(Op, Error) and fail_next_for(Op, WindowId, Error), oldest first, one per call; the failed call is still logged as a command and changes nothing else (none existed on KDE);
- frame offsets: set_frame_offset / set_window_frame_offset make window_rect differ from the request by a constant, as the Windows shadow border does;
- capabilities: all four on by default, set_supported switches one off and its operations return Unsupported without being logged;
- batches: begin/end are counted (open_batches) and logged as BatchBegin/BatchEnd;
- FakeBackend<X>: a platform extension logs its own commands in order with record_ext (Command::Ext(X)); the shared fake is FakeBackend<NoExt> (new/permissive/with_one_monitor), an extension uses empty/permissive_ext/one_monitor because default type parameters are not inferred.

Verified: native cargo test -p komorebi-backend: 24 unit tests and 6 doctests passed, 0 failed (the KDE fake tests were ported and 6 failure/offset/capability/batch/extension tests added); clippy --all-targets -D warnings clean; cargo fmt applied.
2026-10-31 01:37:54 -07:00
LGUG2Z f08237d402 feat(backend): the shared Backend trait, WindowId, plain-data infos and the error type
New crate crates/komorebi-backend (edition 2024, root workspace member, depends only on komorebi-layouts for Rect).

- WindowId and MonitorId: opaque u64 newtypes. KDE and macOS ids convert with from_u32/to_u32; a Windows HWND/HMONITOR goes through from_hwnd/to_hwnd, which keep the bits of the isize unchanged (isize as usize as u64), so no handle is lost whether or not it fits in 32 bits (the e2e samples stay below 2^32, which is an observation, not a guarantee).
- WindowInfo and MonitorInfo: plain data; only id, pid, rect, minimized and alive are required, the rest (title, class, exe, path, fullscreen, maximized, normal; name and serial id of a monitor) are Option (seam.md consequence 6).
- Error: WindowGone(id) (finding 9: macOS uses a failed write as its signal that a window died), Unsupported(Capability) and Platform(cause).
- Backend: only the operations of seam.md section 2.1 that at least two platforms have (5 queries, 9 commands), a Capability query for workspaces, maximize, opacity and focus-follows-mouse (their methods default to Unsupported), begin_batch/end_batch with a no-op default plus the Batch guard (finding 8), the documented set_rect contract (a request; reads after a write return what the platform defines, consequence 2 as corrected) and the thread contract (any non-main thread, no waiting for the platform's main thread: consequences 3 and 4, written as TARGET rules). Every doc comment says which platforms implement the method.

Verified: native cargo test -p komorebi-backend (2 unit tests, 3 doctests, 0 failed) and cargo clippy -p komorebi-backend --all-targets -- -D warnings clean. The Windows/KDE/macOS gates are not affected yet (new crate, nothing depends on it).
2026-10-31 01:37:54 -07:00
LGUG2Z 1b8fdcdcc9 refactor(mac-bar): delete the commented-out Windows code in bar.rs
bar.rs of the macOS bar still carries the Windows code it was copied from as comments: the PowerShell session (start/stop/exec), the InputConfig scroll state and its initialisation, the mouse configuration in apply_config, the hwnd field and its use, the CJK font fallbacks and the whole mouse handler of update. Those blocks (and the comments that only introduce them) are deleted; every live comment stays. The shared bar.rs of the later steps would otherwise inherit them.

Removed: 258 lines (the 269 of the digest included live comments that were kept).
Verified: macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors (6 bar warnings, unchanged); rustfmt --check clean on bar.rs; harness regeneration byte-identical for both. Not verified: rendering.
2026-10-31 01:37:54 -07:00
LGUG2Z d0bb7465f6 refactor(mac-bar): delete keyboard.rs and media.rs, which nothing compiles
komorebi-for-mac/komorebi-bar/src/widgets/keyboard.rs (177 lines, still written against the windows crate) and media.rs (122 lines) are not declared as modules (their mod lines in widgets/mod.rs are comments), so they are not part of the build; the widget variants that would use them are commented out in widget.rs. The files and the two commented-out mod lines are removed. The macOS bar has no keyboard or media widget; the config types of both live in the Windows bar and move to komorebi-bar-core with the platform seam. No behaviour change, no schema change.

Verified: macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors (6 bar warnings, unchanged); harness regeneration byte-identical for both. Not verified: rendering.
2026-10-31 01:37:54 -07:00
LGUG2Z 6da27dda3c refactor(bar-core): move the memory, date and update widgets into komorebi-bar-core
Pure move of the three widget files that are byte-identical in the two bars since the previous revision. Each bar's widgets/mod.rs re-exports them (pub use komorebi_bar_core::widgets::memory / date / update). The core takes chrono, chrono-tz, reqwest (blocking) and serde_json (now a normal dependency, it was only a dev-dependency).

Removed: 541 lines from each bar (138 + 245 + 158), 541 added once.

Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings clean; macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors; native cargo test -p komorebi-bar-core 3 unit + 2 oracle passed; harness regeneration byte-identical for both (macOS 3,774 lines, Windows 9,091 lines). Not verified: rendering.
2026-10-31 01:37:54 -07:00
LGUG2Z 7cd85bd446 refactor(bar): memory, date and update use the platform hooks
The three widgets that differ between the bars only by a platform fact now read it from the hook, in both trees identically: memory opens the task manager through open_system_tool(TaskManager) (was cmd.exe /C taskmgr.exe on Windows, open -a 'Activity Monitor' on macOS: the same commands, now in each platform.rs); date takes its calendar glyph from calendar_icon() (CALENDAR_DOTS on Windows, CALENDAR on macOS); update polls latest_release_api_url() (the komorebi and komorebi-for-mac release APIs) and opens the release page through open_system_tool(Url(..)) (explorer.exe on Windows; on macOS the same explorer.exe it spawns today, broken there, unchanged). After this the memory.rs, date.rs and update.rs of the two bars are byte-identical.

Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings clean; macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors; memory.rs, date.rs and update.rs byte-identical across the trees (diff). Note kept as it was: update.rs has a second GitHub API URL (the periodic refresh thread, line 85) that is the komorebi repo in both bars, also on macOS; only the first check goes through the hook. Not verified: clicks and the update check (no screen, no daemon).
2026-10-31 01:37:54 -07:00
LGUG2Z b8de056b28 refactor(bar-core): the cpu and battery widgets open their tools through the platform hook
The click on the cpu widget (task manager) and on the battery widget (power settings) now calls platform().open_system_tool(...) instead of spawning cmd.exe in shared code. The Windows hook spawns the same commands as before; the macOS hook still spawns the same (broken there) cmd.exe commands, so neither platform's behaviour changes. Fixing macOS is now a change to one function of komorebi-for-mac/komorebi-bar/src/platform.rs.

Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings clean; macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors; native cargo test -p komorebi-bar-core 3 unit + 2 oracle passed; harness regeneration byte-identical for both. Not verified: that a click still opens the tool (no screen).
2026-10-31 01:37:54 -07:00
LGUG2Z 086833af96 refactor(bar-core): add the BarPlatform hooks with the Windows and macOS implementations
komorebi_bar_core::platform holds what the widgets need from the operating system and differs between the bars: BarPlatform { open_system_tool, latest_release_api_url, calendar_icon }, the SystemTool enum (task manager, power settings, network settings, a URL) and install()/platform(), a once-set global the shell fills first thing in main() (a widget calls platform() when it is clicked or built, never before main). Each bar gets an os.rs with its implementation (main.rs re-exports the core module as crate::platform, so shared files can say crate::platform::platform()): Windows spawns exactly the commands the widgets spawn today (cmd.exe /C taskmgr.exe, cmd.exe /C start ms-settings:batterysaver, cmd.exe /C ncpa, explorer.exe <url>); macOS maps TaskManager to open -a 'Activity Monitor' and network settings to open x-apple.systempreferences:... as memory.rs and network.rs do today, and keeps the commands the shared files spawn on macOS today for the rest (cmd.exe taskmgr.exe for cpu, cmd.exe start ms-settings:batterysaver for battery, explorer.exe for a URL), which are broken there: a one-line fix per tool in os.rs, not part of this change.

Nothing calls the hooks yet: the next revisions switch the widgets over, one concern each.

Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings clean; macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors (6 bar warnings, unchanged); native cargo test -p komorebi-bar-core 3 unit + 2 oracle passed; rustfmt --check clean on the new files and both main.rs. No widget calls the hooks yet, so no behaviour changes.
2026-10-31 01:37:54 -07:00
LGUG2Z 98f9e184a2 refactor(bar-core): move the battery and cpu widgets into komorebi-bar-core
Pure move of the two widget files that are byte-identical in the Windows and macOS bars. Each bar's widgets/mod.rs re-exports them (pub use komorebi_bar_core::widgets::battery / cpu), so crate::widgets::battery::... resolves as before; the files themselves are unchanged.

Dependencies: the core takes sysinfo from the root workspace (0.39) and starship-battery 0.11, the versions the Windows bar already used. The macOS bar therefore now gets these two widgets built against sysinfo 0.39 (its own workspace pins 0.38, still used by its other widgets until they move) and starship-battery 0.11 (was 0.10; its own dependency on the crate is removed). Both compile unchanged; behaviour of the libraries is not verified on macOS.

Not changed on purpose: the macOS bug that these two files spawn cmd.exe (taskmgr.exe, explorer.exe) on click is still there, identically; it is fixed behind the platform hook, not inside a move.

Removed: 325 lines from each bar (191 + 134), 325 added once.

Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings clean; macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors (bar warnings 6, unchanged; macOS Cargo.lock: starship-battery 0.10.3 -> 0.11.1 with its dependencies (uom, plist, nix), sysinfo 0.39.6 added next to 0.38.4); native cargo test -p komorebi-bar-core 3 unit + 2 oracle passed; harness regeneration (S/bar2/regen.sh, which now fails when a harness does not build): macOS byte-identical (3,774 lines), Windows byte-identical (9,091 lines). Not verified: rendering, sysinfo and starship-battery behaviour on macOS.
2026-10-31 01:37:54 -07:00
LGUG2Z c05ef98d77 refactor(bar-core): the BarWidget trait moves into komorebi-bar-core
The three-line trait every widget implements is split off widgets/widget.rs (the WidgetConfig enum stays there until every widget it names has moved) and becomes komorebi_bar_core::widgets::widget::BarWidget; each bar's widget.rs re-exports it, so crate::widgets::widget::BarWidget resolves as before. The core's config module re-exports the leaf types (crate::config::LabelPrefix) so that the widgets can later move without a text edit.

Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings clean; macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors; native cargo test -p komorebi-bar-core 3 unit + 2 oracle passed. No schema type changed. Not verified: rendering.
2026-10-31 01:37:54 -07:00
LGUG2Z d5ad916ff1 refactor(bar-core): move render.rs into komorebi-bar-core
Pure move of render.rs (RenderConfig, Grouping, GroupingConfig, GroupingStyle, RoundingConfig and the helpers), byte-identical in both bars since the three previous revisions, with the one path edit the move needs: Alignment is imported from komorebi_bar_core::alignment instead of crate::bar. Each bar's main.rs re-exports the module (pub use komorebi_bar_core::render), so crate::render::... resolves as before.

Removed: 382 lines from each bar, 382 added once.

Note: the one added line is #[allow(clippy::new_without_default)] on RenderConfig::new, which clippy now asks for because the type is public API of a library crate.

Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings clean; macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors; native cargo test -p komorebi-bar-core 3 unit + 2 oracle passed; harness regeneration: macOS byte-identical (3,774 lines), Windows byte-identical (9,091 lines). Not verified: rendering.
2026-10-31 01:37:54 -07:00
LGUG2Z 03d454de17 refactor(bar): the RenderExt impl for KomobarConfig moves from render.rs to config.rs
render.rs is about to move into komorebi-bar-core and must not know KomobarConfig. The only place it did was impl RenderExt for &KomobarConfig (the trait and RenderConfig stay in render.rs); that block, byte-identical in both bars, becomes the last item of config.rs with its imports. No behaviour change.

Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings clean; macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors; rustfmt --check clean on both config.rs and render.rs. Not verified: rendering.
2026-10-31 01:37:54 -07:00
LGUG2Z a3afb3a94b refactor(bar): GroupingConfig.transparency_alpha has one spelling in render.rs
The two render.rs differed in two places. The Windows bar documented transparency_alpha with '(default: 200)' in its text; the macOS bar documented it without and put the default into the schema (schemars extend default 200), so the macOS nix options file gets default = 200. The macOS spelling is taken for both, because a change to the macOS schema.bar.json would also change the generated nix/komorebi-bar-options.nix, which cannot be regenerated here. Windows: the description loses the '(default: 200)' text and the property gains "default": 200 (reviewed diff of schema.bar.json below, pin updated in tests/schema_oracle.rs); the one comment on RenderConfig that only Windows had ('/// Render configuration') is added to the macOS copy. The two render.rs are then byte-identical.

The schema diff is the two lines of the property: description 'Alpha value for the color transparency [[0-255]] (default: 200)' -> 'Alpha value for the color transparency [[0-255]]', and one added "default": 200. macOS schema.bar.json is untouched (its harness regeneration is byte-identical).

Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings clean; macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors; native cargo test -p komorebi-bar-core: 3 unit + 2 oracle passed, 0 failed; harness regeneration: macOS byte-identical (3,774 lines), Windows byte-identical to the updated schema.bar.json (9,091 lines, diff exactly the two lines above). Not verified: rendering.
2026-10-31 01:37:54 -07:00
LGUG2Z 70bff5d549 refactor(bar): render.rs takes Colour and Rgb from komorebi-themes
komorebi_client::Colour and ::Rgb are re-exports of komorebi_themes::colour::Colour and ::Rgb in both trees; naming the crate that defines them lets render.rs move into komorebi-bar-core, which must not depend on komorebi_client (D25). Both bars' render.rs change identically. No behaviour change.

Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings clean; macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors. Types are the same re-exports, so no schema change. Not verified: rendering.
2026-10-31 01:37:54 -07:00
LGUG2Z 3b641c04ce refactor(bar-core): move the leaf types of config.rs and their three tests into komorebi-bar-core
Pure move of the tail of config.rs, which both bars have byte-identical: Position (with its Vec2 and Pos2 conversions), LabelPrefix, DisplayFormat, the extend_enum! macro, WorkspacesDisplayFormat, MediaDisplayFormat and the three extend_* unit tests, to komorebi_bar_core::config::types. Each config.rs re-exports the module (pub use komorebi_bar_core::config::types::*), so crate::config::LabelPrefix and the others resolve as before; the Windows config.rs keeps its own pub use of KomobarTheme.

Two differences, neither visible in a schema: the macOS bar had no MediaDisplayFormat (it has no media widget), so it now has the unused type; the unit tests count as 3 in komorebi-bar-core instead of 3 in each bar, and run natively on Linux. The bars take the crate's schemars feature from their own (komorebi-bar-core/schemars).

Removed: 170 lines from the Windows config.rs and 149 from the macOS one; 174 added once (170 moved, 4 import lines).

Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings clean; macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors (bar warnings 6, unchanged); native cargo test -p komorebi-bar-core: 3 unit tests (the moved extend_* tests) + 2 schema oracle passed, 0 failed; harness regeneration (S/bar2/regen.sh): macOS byte-identical (3,774 lines), Windows byte-identical (9,090 lines). Not verified: rendering.
2026-10-31 01:37:54 -07:00
LGUG2Z c9d03e2ff4 refactor(bar-core): move the shared statics and Alignment into komorebi-bar-core
Pure move of what every bar module reads and nothing in it depends on: the monitor and label statics of main.rs (MAX_LABEL_WIDTH, MONITOR_LEFT/TOP/RIGHT/INDEX, BAR_HEIGHT, DEFAULT_PADDING, AUTO_SELECT_FILL/TEXT_COLOUR, and the Windows WIDGET_CLICKED flag with its two functions) and the three-variant Alignment of bar.rs. Each bar re-exports them (pub use komorebi_bar_core::statics::*, pub use komorebi_bar_core::alignment::Alignment), so crate::MAX_LABEL_WIDTH and crate::bar::Alignment resolve as before.

The only difference between the trees is that the macOS bar now also has the WIDGET_CLICKED flag and its two functions; nothing in the macOS bar calls them (only the Windows systray widget does), so there is no behaviour change.

Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings clean; macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors; native cargo test -p komorebi-bar-core 2 passed, 0 failed. Not verified: rendering.
2026-10-31 01:37:54 -07:00
LGUG2Z 8ad6213b04 refactor(bar-core): move selected_frame.rs and ui.rs into komorebi-bar-core
Pure move of the two files of the bar that depend on nothing else in it, byte-identical in the Windows and macOS bars (selected_frame.rs since the previous revision). Each bar keeps its paths: main.rs re-exports the modules (pub use komorebi_bar_core::selected_frame / ui), so every crate::selected_frame::... and crate::ui::... in the widgets and bar.rs resolves as before. The crate takes eframe from the workspace; the macOS bar takes the crate by path.

Removed: 111 lines (89 + 22) from each of the two bars, 111 added once.

Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings clean; macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors (bar warnings 10 -> 6, the four strokes of the previous revision); native cargo test -p komorebi-bar-core 2 passed, 0 failed; harness schema regeneration (S/bar2/regen.sh): macOS byte-identical to its schema.bar.json (3,774 lines), Windows byte-identical to the regenerated schema.bar.json (9,090 lines). Not verified: rendering.
2026-10-31 01:37:54 -07:00
LGUG2Z a56a691d10 refactor(mac-bar): selected_frame.rs spells its strokes as the Windows bar does
The four Stroke::new(1.0, ...) calls become 1.0_f32, which is what the Windows copy has and what the compiler falls back to anyway (the f32: From<f64> fallback lint). Converge step before moving selected_frame.rs into komorebi-bar-core: afterwards both copies are byte-identical. No behaviour change.

Verified: macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors; the bar's warnings went from 10 to 6 (the four f32 literal fallbacks in this file are gone); macOS schema regeneration (harness) still byte-identical. Not verified: rendering.
2026-10-31 01:37:54 -07:00
LGUG2Z eaf43a2ca4 build(bar-core): add the komorebi-bar-core crate with the schema oracle test
Skeleton of the shared bar crate (D25/D26): an empty library and the oracle that every later move of bar code is held to. tests/schema_oracle.rs pins the checked-in schema.bar.json of the Windows bar (9,090 lines, FNV-1a 0x557301341968bff9) and of the macOS bar (3,774 lines, 0xc99e02949424e5d7), so any change to either file, intended or not, fails the test until the pin is updated in a reviewed revision. Once config.rs moves into the crate the test generates the schema and compares it with the file instead.

The pins are of the files as they are after the previous revision (the regenerated Windows file) and are the values the out-of-tree harness (S/bar2/regen.sh over the real sources) reproduces: macOS byte-identical, Windows byte-identical to the regenerated file.

Verified: native cargo test -p komorebi-bar-core: 2 passed, 0 failed; Windows cargo clippy --workspace --locked --all-targets -D warnings clean; macOS fake-CC cargo check --locked --workspace --all-targets finished, 0 errors.
2026-10-31 01:37:54 -07:00
LGUG2Z c5949d20ef docs(bar): regenerate the Windows schema.bar.json after step 2
Step 2 put SocketMessage in komorebi-protocol, so the Windows bar schema (reached through MouseConfig.message) changed. The file was regenerated with the harness that reproduced the old file byte for byte except for the State closure (S/bar2/regen.sh: real config.rs, render.rs, selected_frame.rs, ui.rs and widgets over the real komorebi-protocol, komorebi-layouts and komorebi-themes with the Windows cfgs on).

Diff, 10,552 -> 9,090 lines, all from step 2 (D15, D16, D27):
- State is now the opaque StateBlob (object, no properties) and the 31 defs only reachable through it are gone: Column, ColumnSplit, ColumnSplitWithCapacity, ColumnWidth, Container, CustomLayout, FloatingLayerBehaviour, GridLayoutOptions, IdWithIdentifier, InitialWindowPlacementRules, Layout, LayoutOptions, MatchingRule, Monitor, PlacementMatchingRules, PlacementTarget, Ring, Ring2-4, ScrollingCentering, ScrollingLayoutOptions, ThemeOptions, ThemeVariant, Wallpaper, Window, WindowContainerBehaviour, WindowPlacement, Workspace, WorkspaceConfig, WorkspaceLayer.
- SocketMessage gains ReloadHotkeys and HotkeysState (the unified enum) and a description; DebugWindow is int64 (was int).
- Descriptions added to State, StateQuery, SubscribeOptions; WindowKind description reworded.
Nothing in the bar's own types changed. The macOS file regenerates byte-identical (3,774 lines) and is not touched.

Verified: S/bar2/regen.sh (macOS cmp identical; Windows differs only by the items above, checked with jq after deleting the 31 defs from the old file). Not verified: against a real Windows komorebi-bar --schema run (cannot run here).
2026-10-31 01:37:54 -07:00
LGUG2Z e950c8f967 chore(repo): combine step 3 with the integration line
Merge revision: wip-main (history merges, fixes, step 0, steps 1, 2, 4 and 5, flake work, seam document) and wip-step3 (komorebi-config: matching types, behaviour enums, AspectRatio/PerAnimationPrefixConfig, asc and the application configuration data, placement types, the one StaticConfig with per-platform schema views, the daemons wired to it). Conflicts between step 3's edits and step 4's restructuring of komorebic (the schema-printing arms moved into the WindowsCommands/MacosCommands/KdeCommands matches) and in the Cargo.lock files are resolved here once, instead of through 35 separate rebases.
2026-10-31 01:37:54 -07:00
LGUG2Z fb545cf7a4 test(komorebic-core): the macOS pages in docs/cli are what the command line renders
Renders the macOS command line through komorebic-core (it needs no macOS to do it) and compares every page with komorebi-for-mac/docs/cli after the page transform macOS uses (a heading, 'Usage: komorebic <name>'), and the number of pages. It found the four macOS pages that step 2 left stale (the previous revision regenerates them) and keeps all 158 in step from now on. The test returns early when the macOS tree is not in the source (the nix build of the Windows workspace).

Verified: native cargo test -p komorebic-core --test docs_cli: 1 passed.
2026-10-31 01:37:54 -07:00
LGUG2Z 5763df9f73 feat(config): the platform table, read from the markers of the one StaticConfig
platforms::reads(platform, key) says whether a platform reads a top-level key and platforms::unsupported_keys(raw, platform) lists the keys of a configuration text that are keys of komorebi.json but that the platform does not read, which is what a daemon can say at load time instead of dropping them silently. The table is the x-komorebi-platforms markers themselves, so a key cannot be added without saying who reads it. The daemons do not call it yet: reporting at load time is a visible change of behaviour for the user's decision.

The oracle test checks the table against the three checked-in schemas (every key of a tree's schema.json is read by that platform) and on examples.

Verified: native cargo test -p komorebi-config: 4 unit + 9 schemas + 1 doctest passed, 0 failed (tier 1).
2026-10-31 01:37:54 -07:00
LGUG2Z f84a941795 docs(komorebic): regenerate the four macOS pages that step 2 changed
Step 2 moved SocketMessage into komorebi-protocol and unified its doc comments, so four macOS pages under komorebi-for-mac/docs/cli changed (animation, border-colour and two more; 26 insertions, 10 deletions). Regenerated with the docgen oracle (S/step4/oracle-check.sh) so the checked-in pages match what the command line renders. Verified: oracle-check reports the macOS pages identical.
2026-10-31 01:37:54 -07:00
LGUG2Z 657360d358 refactor(windows): use StaticConfig and its family of komorebi-config
static_config re-exports StaticConfig, WorkspaceConfig, MonitorConfig, BorderColours, ThemeOptions, Wallpaper, AnimationsConfig, AppSpecificConfigurationPath, TabsConfig and StackbarConfig from komorebi-config and loses their definitions, the end_of_life/aliases/deprecated notices and read_raw/read (about 650 lines). The inherent impl StaticConfig cannot stay in the daemon (orphan rule): apply_globals is a private trait (ApplyGlobals) and preload, postload and reload are the public extension trait StaticConfigExt, bodies unchanged; process_command, window_manager and main import the trait (komorebic only calls read and the notices, which are inherent in the crate, so it is untouched). The From<&WindowManager> and From<&Monitor> conversions fill the keys Windows never writes (border_radius, titleless_applications, tabbed_applications, window_hiding_position) with None or Default. The five #[deprecated] attributes of the old fields are gone (the schema marker replaced them; see the crate).

Verified: Windows cargo clippy --workspace --locked --all-targets -D warnings: clean (tier 2); the oracle test proves the Windows view of this StaticConfig equals schema.json byte for byte. Not verified: Windows unit tests (cannot run), running komorebic.exe or the daemon.
2026-10-31 01:37:54 -07:00