From b5601a6eb3a8d0603bb837a847701d3d49f984c3 Mon Sep 17 00:00:00 2001 From: tcmal Date: Fri, 30 Aug 2024 15:48:34 +0100 Subject: Add bind for killing clients --- 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 5a2844d..819719b 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -70,6 +70,13 @@ pub fn toggle_fullscreen(wm: &mut WM<'_>) { } } +/// Send the kill signal to the currently focused client +pub fn kill_client(wm: &mut WM<'_>) { + if let Some(pos) = wm.clients.focused_pos() { + wm.clients.kill_client(&wm.conn, pos); + } +} + /// Set the focused tag for the currently selected monitor pub fn set_tag_focus(wm: &mut WM<'_>, tag_focus: TagFocus) { wm.clients -- cgit v1.2.3