From d8636d651d04ef5dca667cece35c9e0eac05d0d1 Mon Sep 17 00:00:00 2001 From: alex-ds13 <145657253+alex-ds13@users.noreply.github.com> Date: Thu, 23 Jan 2025 17:38:04 +0000 Subject: [PATCH] fix(wm): don't store empty layout_rules on monitor cache --- komorebi/src/static_config.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/komorebi/src/static_config.rs b/komorebi/src/static_config.rs index 6dbf6745..9435bbad 100644 --- a/komorebi/src/static_config.rs +++ b/komorebi/src/static_config.rs @@ -176,6 +176,7 @@ impl From<&Workspace> for WorkspaceConfig { Layout::Custom(_) => {} } } + let layout_rules = (!layout_rules.is_empty()).then_some(layout_rules); let mut window_container_behaviour_rules = HashMap::new(); for (threshold, behaviour) in value.window_container_behaviour_rules().iter().flatten() { @@ -217,7 +218,7 @@ impl From<&Workspace> for WorkspaceConfig { .workspace_config() .as_ref() .and_then(|c| c.custom_layout.clone()), - layout_rules: Option::from(layout_rules), + layout_rules, custom_layout_rules: value .workspace_config() .as_ref()