mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Implement empty-workspace-above-first (#745)
* Implement empty-workspace-above-first option * add two failing tests * fix interactive_move_onto_empty_output_ewaf and interactive_move_onto_first_empty_workspace tests * Add two failing ewaf option toggle tests * Fix adding/removing first empty workspace on option toggle * Don't remove first empty workspace if focused * Stop workspace switch when enabling ewaf * layout/monitor: Offset workspace switch on adding workspace above * Fix some initial active workspace ids with ewaf * wiki: Document empty-workspace-above-first --------- Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
This commit is contained in:
@@ -444,6 +444,8 @@ pub struct Layout {
|
||||
pub center_focused_column: CenterFocusedColumn,
|
||||
#[knuffel(child)]
|
||||
pub always_center_single_column: bool,
|
||||
#[knuffel(child)]
|
||||
pub empty_workspace_above_first: bool,
|
||||
#[knuffel(child, unwrap(argument), default = Self::default().gaps)]
|
||||
pub gaps: FloatOrInt<0, 65535>,
|
||||
#[knuffel(child, default)]
|
||||
@@ -460,6 +462,7 @@ impl Default for Layout {
|
||||
default_column_width: Default::default(),
|
||||
center_focused_column: Default::default(),
|
||||
always_center_single_column: false,
|
||||
empty_workspace_above_first: false,
|
||||
gaps: FloatOrInt(16.),
|
||||
struts: Default::default(),
|
||||
preset_window_heights: Default::default(),
|
||||
@@ -3310,6 +3313,7 @@ mod tests {
|
||||
},
|
||||
center_focused_column: CenterFocusedColumn::OnOverflow,
|
||||
always_center_single_column: false,
|
||||
empty_workspace_above_first: false,
|
||||
},
|
||||
spawn_at_startup: vec![SpawnAtStartup {
|
||||
command: vec!["alacritty".to_owned(), "-e".to_owned(), "fish".to_owned()],
|
||||
|
||||
Reference in New Issue
Block a user