feat(wm): add grid layout

Based on the Grid layout on LeftWM

Co-authored-by: LGUG2Z <LGUG2Z@fastmail.com>
This commit is contained in:
Javier Portillo
2024-02-17 00:43:04 -06:00
committed by جاد
parent c3e39311c1
commit 9fcf4ec19f
3 changed files with 167 additions and 22 deletions

View File

@@ -20,6 +20,7 @@ pub enum DefaultLayout {
VerticalStack,
HorizontalStack,
UltrawideVerticalStack,
Grid,
// NOTE: If any new layout is added, please make sure to register the same in `DefaultLayout::cycle`
}
@@ -135,7 +136,8 @@ impl DefaultLayout {
Self::Rows => Self::VerticalStack,
Self::VerticalStack => Self::HorizontalStack,
Self::HorizontalStack => Self::UltrawideVerticalStack,
Self::UltrawideVerticalStack => Self::BSP,
Self::UltrawideVerticalStack => Self::Grid,
Self::Grid => Self::BSP,
}
}
@@ -147,7 +149,8 @@ impl DefaultLayout {
Self::HorizontalStack => Self::VerticalStack,
Self::VerticalStack => Self::Rows,
Self::Rows => Self::Columns,
Self::Columns => Self::BSP,
Self::Columns => Self::Grid,
Self::Grid => Self::BSP
}
}
}