summaryrefslogtreecommitdiff
path: root/src/helpers.rs
diff options
context:
space:
mode:
authortcmal <me@aria.rip>2024-08-30 15:48:34 +0100
committertcmal <me@aria.rip>2024-08-30 16:20:29 +0100
commitb5601a6eb3a8d0603bb837a847701d3d49f984c3 (patch)
tree3004b27ed9b710b7cd8d4569e852f072db7814e8 /src/helpers.rs
parent12c930d9118941997336deb9ef6c676aa35b1cd9 (diff)
Add bind for killing clients
Diffstat (limited to 'src/helpers.rs')
-rw-r--r--src/helpers.rs7
1 files changed, 7 insertions, 0 deletions
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