Struct leftwm_layouts::LayoutDefinition
source · [−]pub struct LayoutDefinition {
pub name: String,
pub column_type: ColumnType,
pub flipped: Flipped,
pub rotation: Rotation,
pub main_window_count: usize,
pub main_size: Size,
pub main_split: SplitAxis,
pub stack_split: SplitAxis,
pub reserve_column_space: ReserveColumnSpace,
pub balance_stacks: bool,
}Fields
name: StringThe unique identifier for the layout, there can be only one layout with the same name. If a layout is defined multiple times, it may be overwritten.
column_type: ColumnTypeThe column type used in this layout.
This usually isn’t changed during runtime.
See ColumnType for details.
flipped: FlippedSee Flipped for details.
rotation: RotationSee Rotation for details.
main_window_count: usizeDetermines the amount of windows to show in the
main column of the layout. If the layout has no main
column, this modifier will be ignored.
main_size: SizeThe Size of the available space which the
main column should occupy. If the layout has no main column,
or no window in the main column, this modifier will be ignored.
Value can either be absolute Pixels (400px) or a Ratio (eg. 0.5).
Defaults to 0.5, meaning 50%.
main_split: SplitAxisThe way to split windows in the main_column when there
are more than one window. If the layout has no main column,
or no window in the main column, this modifier will be ignored.
See SplitAxis for details. Defaults to SplitAxis::Vertical
stack_split: SplitAxisThe way to split windows in the stack_column(s) when
there are more than one window. See SplitAxis for details.
reserve_column_space: ReserveColumnSpaceThe way to handle empty column space where there is no window.
See ReserveColumnSpace for details.
balance_stacks: boolWhen set to true stack windows are distributed evenly between stacks,
when set to false the first stack gets a single window, and
the rest of the windows go to the second stack.
This modifier is ignored in layouts that have just one stack
Demonstration
When set to true
+-----+-------+-----+
| 2 | | 4 |
| | | |
|-----| 1 |-----|
| 3 | | 5 |
| | | |
+-----+-------+-----+When set to false
+-----+-------+-----+
| | | 3 |
| | |-----|
| 2 | 1 | 4 |
| | |-----|
| | | 5 |
+-----+-------+-----+Implementations
sourceimpl LayoutDefinition
impl LayoutDefinition
pub fn increase_main_size(&mut self, upper_bound: i32)
pub fn decrease_main_size(&mut self)
pub fn increase_main_window_count(&mut self)
pub fn decrease_main_window_count(&mut self)
pub fn fallback() -> Self
Trait Implementations
sourceimpl Clone for LayoutDefinition
impl Clone for LayoutDefinition
sourcefn clone(&self) -> LayoutDefinition
fn clone(&self) -> LayoutDefinition
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read more