Skip to content

Commit

Permalink
fix(config): disable tiling for ws without layouts
Browse files Browse the repository at this point in the history
This commit ensures that when a layout or a custom layout is not defined
for a workspace in the static configuration file, Workspace.tile will be
set to false. Thanks to M. Kichel on Discord for pointing out the need
for this!
  • Loading branch information
LGUG2Z committed Nov 10, 2023
1 parent 5fd90d2 commit 96bf37b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions komorebi/src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,17 @@ impl Workspace {

if let Some(layout) = &config.layout {
self.layout = Layout::Default(*layout);
self.tile = true;
}

if let Some(pathbuf) = &config.custom_layout {
let layout = CustomLayout::from_path_buf(pathbuf.clone())?;
self.layout = Layout::Custom(layout);
self.tile = true;
}

if config.custom_layout.is_none() && config.layout.is_none() {
self.tile = false;
}

if let Some(layout_rules) = &config.layout_rules {
Expand Down

0 comments on commit 96bf37b

Please sign in to comment.