refactor(macos): take the default constants from komorebi-settings

DEFAULT_RESIZE_DELTA, DEFAULT_MOUSE_FOLLOWS_FOCUS and the initial values of
DEFAULT_WORKSPACE_PADDING and DEFAULT_CONTAINER_PADDING now come from
komorebi_settings::shared (PlatformDefaults::MACOS); the statics keep their
names and types, so no reader changes. Adds the komorebi-settings path
dependency (Cargo.lock +1 package). Plan step 10, S1. Pure refactor: same
values (50, true, 5, 5). BORDER_OFFSET_ADJUSTMENT stays where it is: it is a
macOS-only constant (the platform part, later).

Verified: macOS fake-CC cargo check --target aarch64-apple-darwin
--workspace --all-targets: 0 errors (type-check only; nothing linked or run;
no Mac).
This commit is contained in:
LGUG2Z committed 2026-10-31 11:25:29 -07:00
1 parent b7b95320ee
commit fe2febed56
4 files changed
+20 -4

No files matched your search

+12
View File
@@ -3170,6 +3170,7 @@ dependencies = [
"komorebi-config",
"komorebi-layouts",
"komorebi-protocol",
"komorebi-settings",
"komorebi-themes",
"komorebi-transport",
"lazy_static",
@@ -3332,6 +3333,17 @@ dependencies = [
name = "komorebi-scrolling"
version = "0.1.42"
[[package]]
name = "komorebi-settings"
version = "0.1.42"
dependencies = [
"komorebi-config",
"komorebi-layouts",
"komorebi-protocol",
"komorebi-themes",
"parking_lot",
]
[[package]]
name = "komorebi-themes"
version = "0.1.42"
+1
View File
@@ -17,6 +17,7 @@ komorebi-themes = { path = "../komorebi-themes" }
komorebi-backend = { path = "../crates/komorebi-backend" }
komorebi-collections = { path = "../crates/komorebi-collections" }
komorebi-config = { path = "../crates/komorebi-config", default-features = false, features = ["schemars"] }
komorebi-settings = { path = "../crates/komorebi-settings" }
komorebi-protocol = { path = "../crates/komorebi-protocol", default-features = false, features = ["schemars"] }
komorebi-transport = { path = "../crates/komorebi-transport" }
komorebi-layouts = { path = "../komorebi-layouts", features = [
+1
View File
@@ -10,6 +10,7 @@ komorebi-backend = { workspace = true }
komorebi-collections = { workspace = true }
komorebi-layouts = { workspace = true }
komorebi-config = { workspace = true }
komorebi-settings = { workspace = true }
komorebi-protocol = { workspace = true }
komorebi-transport = { workspace = true }
quickxml_to_serde = { git = "https://github.com/LGUG2Z/quickxml_to_serde.git", version = "0.6.1" }
+6 -4
View File
@@ -159,10 +159,12 @@ lazy_static! {
Arc::new(Mutex::new(HashMap::new()));
}
pub static DEFAULT_WORKSPACE_PADDING: AtomicI32 = AtomicI32::new(5);
pub static DEFAULT_CONTAINER_PADDING: AtomicI32 = AtomicI32::new(5);
pub static DEFAULT_RESIZE_DELTA: i32 = 50;
pub static DEFAULT_MOUSE_FOLLOWS_FOCUS: bool = true;
pub static DEFAULT_WORKSPACE_PADDING: AtomicI32 =
AtomicI32::new(komorebi_settings::shared::PlatformDefaults::MACOS.workspace_padding);
pub static DEFAULT_CONTAINER_PADDING: AtomicI32 =
AtomicI32::new(komorebi_settings::shared::PlatformDefaults::MACOS.container_padding);
pub static DEFAULT_RESIZE_DELTA: i32 = komorebi_settings::shared::DEFAULT_RESIZE_DELTA;
pub static DEFAULT_MOUSE_FOLLOWS_FOCUS: bool = komorebi_settings::shared::DEFAULT_MOUSE_FOLLOWS_FOCUS;
pub const PUBLIC_KEY: [u8; 32] = [
0x5a, 0x69, 0x4a, 0xe1, 0x3c, 0x4b, 0xc8, 0x4e, 0xc3, 0x79, 0x0f, 0xab, 0x27, 0x6b, 0x7e, 0xdd,