mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-23 08:54:16 +01:00
refactor(kde): 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::KDE); the statics keep their names and types, so no reader changes. Adds the komorebi-settings path dependency (workspace and package manifest, Cargo.lock +1 package). Plan step 10, S1 (docs/dev/settings.md section 5). Pure refactor: same values (50, true, 5, 5), pinned by the crate's platform-defaults test. Verified: KDE cargo test -p komorebi --lib --tests (lite env, own target dir): all test binaries ok, 0 failed. KDE VM suites not run.
This commit is contained in:
1 parent
fb145f96a8
commit
3a287fcf0d
4 files changed
+20
-4
No files matched your search
Generated
+12
@@ -2508,6 +2508,7 @@ dependencies = [
|
||||
"komorebi-layouts",
|
||||
"komorebi-protocol",
|
||||
"komorebi-scrolling",
|
||||
"komorebi-settings",
|
||||
"komorebi-themes",
|
||||
"komorebi-transport",
|
||||
"lazy_static",
|
||||
@@ -2612,6 +2613,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 0.12.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "komorebi-themes"
|
||||
version = "0.1.42"
|
||||
|
||||
@@ -27,6 +27,7 @@ komorebi-layouts = { path = "../komorebi-layouts", features = [
|
||||
komorebi-scrolling = { path = "../komorebi-scrolling" }
|
||||
# the wire types shared with the other komorebi daemons
|
||||
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" }
|
||||
# the themes (and the palettes made from pictures), from the same upstream revision
|
||||
|
||||
@@ -12,6 +12,7 @@ komorebi-collections = { workspace = true }
|
||||
komorebi-layouts = { workspace = true }
|
||||
komorebi-scrolling = { workspace = true }
|
||||
komorebi-config = { workspace = true }
|
||||
komorebi-settings = { workspace = true }
|
||||
komorebi-protocol = { workspace = true }
|
||||
komorebi-transport = { workspace = true }
|
||||
version = { path = "../version" }
|
||||
|
||||
@@ -208,16 +208,18 @@ lazy_static! {
|
||||
|
||||
/// The padding, in pixels, between the edge of a monitor's work area and the tiles of its
|
||||
/// workspaces, for a monitor that sets none of its own. The default for this is 5.
|
||||
pub static DEFAULT_WORKSPACE_PADDING: AtomicI32 = AtomicI32::new(5);
|
||||
pub static DEFAULT_WORKSPACE_PADDING: AtomicI32 =
|
||||
AtomicI32::new(komorebi_settings::shared::PlatformDefaults::KDE.workspace_padding);
|
||||
/// The padding, in pixels, around each tile, for a monitor that sets none of its own. The default
|
||||
/// for this is 5.
|
||||
pub static DEFAULT_CONTAINER_PADDING: AtomicI32 = AtomicI32::new(5);
|
||||
pub static DEFAULT_CONTAINER_PADDING: AtomicI32 =
|
||||
AtomicI32::new(komorebi_settings::shared::PlatformDefaults::KDE.container_padding);
|
||||
/// How many pixels `ResizeWindowEdge` and `ResizeWindowAxis` resize by, when `komorebi.json` does
|
||||
/// not say
|
||||
pub static DEFAULT_RESIZE_DELTA: i32 = 50;
|
||||
pub static DEFAULT_RESIZE_DELTA: i32 = komorebi_settings::shared::DEFAULT_RESIZE_DELTA;
|
||||
/// Whether the pointer goes to the window that is given the focus, when `komorebi.json` does not
|
||||
/// say
|
||||
pub static DEFAULT_MOUSE_FOLLOWS_FOCUS: bool = true;
|
||||
pub static DEFAULT_MOUSE_FOLLOWS_FOCUS: bool = komorebi_settings::shared::DEFAULT_MOUSE_FOLLOWS_FOCUS;
|
||||
|
||||
/// The event, the message or the change of the monitors a [`Notification`] is about
|
||||
///
|
||||
|
||||
Reference in new issue
Block a user