mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-25 10:08:33 +02:00
feat(wm): ensure workspace count
Allow the number of workspaces for a given monitor to be pre-created, so that configuration options can be sent (name, padding, layout) before the workspace has ever been activated.
This commit is contained in:
@@ -53,6 +53,13 @@ impl Monitor {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn ensure_workspace_count(&mut self, ensure_count: usize) {
|
||||
if self.workspaces().len() < ensure_count {
|
||||
self.workspaces_mut()
|
||||
.resize(ensure_count, Workspace::default());
|
||||
}
|
||||
}
|
||||
|
||||
pub fn move_container_to_workspace(
|
||||
&mut self,
|
||||
target_workspace_idx: usize,
|
||||
|
||||
Reference in New Issue
Block a user