Skip to content

Commit

Permalink
fix(wm): include workspace rules on cached monitor
Browse files Browse the repository at this point in the history
The `WorkspaceConfig` stored on `Workspace` was changed to not be
serialized, however it needs to be serialized and deserialized when
caching a monitor (after a disconnect), so that when it reconnects it is
able to read all the workspace rules, which include:

- initial_workspace_rules
- workspace_rules
- window_container_behaviour_rules
- layout_rules
- custom_layout_rules

This commit changes the serde skip to only skip if is is `None`.

This means that the `komorebic state` command will have all this
information as well and it will send it when notifying subscribers too,
which isn't good at all, so we need to find another way of excluding it
from the state.
  • Loading branch information
alex-ds13 authored and LGUG2Z committed Feb 22, 2025
1 parent 8bc04f0 commit 1edeb44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion komorebi/src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ pub struct Workspace {
window_container_behaviour_rules: Option<Vec<(usize, WindowContainerBehaviour)>>,
#[getset(get = "pub", get_mut = "pub", set = "pub")]
float_override: Option<bool>,
#[serde(skip)]
#[serde(skip_serializing_if = "Option::is_none")]
#[getset(get = "pub", set = "pub")]
workspace_config: Option<WorkspaceConfig>,
}
Expand Down

0 comments on commit 1edeb44

Please sign in to comment.