From 5d2a23a5d618725b75ba77d7185601e5439801c5 Mon Sep 17 00:00:00 2001 From: tcmal Date: Mon, 15 Jul 2024 15:30:06 +0100 Subject: support fullscreen mode --- src/helpers.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/helpers.rs') diff --git a/src/helpers.rs b/src/helpers.rs index b7488dd..24c8cf2 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -47,3 +47,10 @@ pub fn toggle_floating(wm: &mut WM<'_>) { wm.clients.toggle_floating(&wm.conn, pos); } } + +/// Toggle fullscreen status for the currently focused window +pub fn toggle_fullscreen(wm: &mut WM<'_>) { + if let Some(pos) = wm.clients.focused_pos() { + wm.clients.toggle_fullscreen(&wm.conn, pos); + } +} -- cgit v1.2.3