mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-16 05:41:16 +01:00
The macOS bar module moves from komorebi-for-mac/komorebi-bar/src/macos to komorebi-bar/src/macos (the include_str! path follows), komorebi-bar/src/main.rs is a cfg_select! over target_os that runs windows::main or macos::main, and komorebi-bar/Cargo.toml has what both share in [dependencies] and the rest in per-target tables (Windows: windows, windows-core, windows-icons x2, systray-util, tokio, regex, which, egui_extras, netdev 0.46, sysinfo 0.39, komorebi-themes without default features; macOS: objc2, objc2-app-kit, icns, raw-window-handle, netdev 0.40, sysinfo 0.38, komorebi-themes with defaults), so each platform keeps the versions it had. The old komorebi-bar-macos package stays as a shim that includes the moved module. The macOS flake builds -p komorebi-bar and its source filter takes the unified package's manifest, main.rs and src/macos; the Windows filter leaves src/macos out. The bar does not build for Linux (no arm of the cfg_select), as before. Gates run: Windows clippy --all-targets -D warnings PASS; macOS fake-CC check --locked --all-targets of -p komorebi-bar and -p komorebi-bar-macos PASS (type check only); bar-core schema oracle (3 + 6) PASS; the S/bar2 harness regenerates schema.bar.json for Windows (9091 lines) and macOS (3774) byte-identical to the checked-in files; tools/kde-closure-check ok; CLI docs oracle identical x3; nix evaluation PASS and by evaluation an edit of komorebi-bar/src/windows changes the Windows derivations only (the macOS side cannot be evaluated on this Linux host). Not run: nix builds, any bar run (Windows screenshot gate and the Mac hand check are owed).
18 lines
417 B
Rust
18 lines
417 B
Rust
//! `komorebi-bar`, the status bar of komorebi, for Windows and macOS: the module of the target OS is
|
|
//! the bar, the code both share is in `komorebi-bar-core`.
|
|
|
|
cfg_select! {
|
|
target_os = "windows" => {
|
|
mod windows;
|
|
use windows as platform;
|
|
}
|
|
target_os = "macos" => {
|
|
mod macos;
|
|
use macos as platform;
|
|
}
|
|
}
|
|
|
|
fn main() -> color_eyre::Result<()> {
|
|
platform::main()
|
|
}
|