diff options
author | tcmal <me@aria.rip> | 2024-08-30 16:26:34 +0100 |
---|---|---|
committer | tcmal <me@aria.rip> | 2024-08-30 16:49:19 +0100 |
commit | a568b4a79d1ccabfdff0a5a8ecbb908e96f17cf5 (patch) | |
tree | aa646de48cb2ef040b7d9e7164f59c827f6961a3 /src/helpers.rs | |
parent | b5601a6eb3a8d0603bb837a847701d3d49f984c3 (diff) |
Add binds for moving clients up/down stack
Diffstat (limited to 'src/helpers.rs')
-rw-r--r-- | src/helpers.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/helpers.rs b/src/helpers.rs index 819719b..cd9fd18 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -56,6 +56,21 @@ pub fn focus_prev(wm: &mut WM<'_>) { wm.clients.change_focus(&wm.conn, false); } +/// Shift the currently focused window down the stack +pub fn shift_down(wm: &mut WM<'_>) { + wm.clients.shift_focused_client(&wm.conn, true); +} + +/// Shift the currently focused window up the stack +pub fn shift_up(wm: &mut WM<'_>) { + wm.clients.shift_focused_client(&wm.conn, false); +} + +/// Shift the currently focused window to the top of the stack +pub fn shift_top(wm: &mut WM<'_>) { + wm.clients.shift_focused_to_top(&wm.conn); +} + /// Toggle floating status for the currently focused window pub fn toggle_floating(wm: &mut WM<'_>) { if let Some(pos) = wm.clients.focused_pos() { |