mirror of
https://github.com/YaLTeR/niri.git
synced 2025-10-06 00:23:14 +02:00
Change expel-window-from-column to expel the bottom window
This way, expel becomes symmetric with consume. This is also how it works in PaperWM. Though, in PaperWM if the expelled window was focused, it will remain focused, while in this commit it is never focused, making it the exact opposite of consume. Use consume-or-expel-window-right for the old expel behavior.
This commit is contained in:
@@ -447,9 +447,9 @@ binds {
|
||||
Mod+BracketLeft { consume-or-expel-window-left; }
|
||||
Mod+BracketRight { consume-or-expel-window-right; }
|
||||
|
||||
// Consume one window from the right into the focused column.
|
||||
// Consume one window from the right to the bottom of the focused column.
|
||||
Mod+Comma { consume-window-into-column; }
|
||||
// Expel one window from the focused column to the right.
|
||||
// Expel the bottom window from the focused column to the right.
|
||||
Mod+Period { expel-window-from-column; }
|
||||
|
||||
Mod+R { switch-preset-column-width; }
|
||||
|
@@ -2153,20 +2153,18 @@ impl<W: LayoutElement> Workspace<W> {
|
||||
return;
|
||||
}
|
||||
|
||||
let mut offset = Point::from((source_column.render_offset().x, 0.));
|
||||
let prev_off = source_column.tile_offset(source_column.active_tile_idx);
|
||||
let source_tile_idx = source_column.tiles.len() - 1;
|
||||
|
||||
let removed = self.remove_tile_by_idx(
|
||||
source_col_idx,
|
||||
source_column.active_tile_idx,
|
||||
Transaction::new(),
|
||||
None,
|
||||
);
|
||||
let mut offset = Point::from((source_column.render_offset().x, 0.));
|
||||
let prev_off = source_column.tile_offset(source_tile_idx);
|
||||
|
||||
let removed =
|
||||
self.remove_tile_by_idx(source_col_idx, source_tile_idx, Transaction::new(), None);
|
||||
|
||||
self.add_tile(
|
||||
Some(target_col_idx),
|
||||
removed.tile,
|
||||
true,
|
||||
false,
|
||||
removed.width,
|
||||
removed.is_full_width,
|
||||
Some(self.options.animations.window_movement.0),
|
||||
|
Reference in New Issue
Block a user