feat: move tiled windows directionally
This commit is contained in:
1 parent
8c1184ddda
commit
0d9bbe49f7
3 files changed
+87
-6
No files matched your search
@@ -278,6 +278,21 @@ impl Ferese {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn move_direction(&mut self, direction: Direction) {
|
||||
let Some(current) = self.focused_window else {
|
||||
return;
|
||||
};
|
||||
let Some(bounds) = self.output_bounds() else {
|
||||
return;
|
||||
};
|
||||
|
||||
match self.layout.move_window(current, direction, bounds) {
|
||||
Ok(true) => self.relayout(),
|
||||
Ok(false) => {}
|
||||
Err(error) => tracing::error!(%error, ?current, "failed to move tiled window"),
|
||||
}
|
||||
}
|
||||
|
||||
fn output_bounds(&self) -> Option<Rect> {
|
||||
let output = self.space.outputs().next()?;
|
||||
let geometry = self.space.output_geometry(output)?;
|
||||
|
||||
Reference in new issue
Block a user