window management library
git clone https://git.lucas.co/cce-window-manager.git
feat: WindowSwitcherPrev action with super+shift+tab default binding
Reverse companion to window_switcher: cycles the switcher highlight
backwards. Ships as a stock default chord so it works without an
input.kdl entry (defaults never shadow user bindings).
Co-Authored-By: Claude Fable 5 <[email protected]>
src/api.rs | 3 +++
src/bindings.rs | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/api.rs b/src/api.rs
index 4adf21b..442e9e5 100644
--- a/src/api.rs
+++ b/src/api.rs
@@ -56,6 +56,7 @@ pub enum Action {
FocusLeft,
FocusRight,
WindowSwitcher,
+ WindowSwitcherPrev,
Move,
Resize,
Exit,
@@ -101,6 +102,7 @@ impl Action {
Action::FocusLeft => "focus_left",
Action::FocusRight => "focus_right",
Action::WindowSwitcher => "window_switcher",
+ Action::WindowSwitcherPrev => "window_switcher_prev",
Action::Move => "move",
Action::Resize => "resize",
Action::Exit => "exit",
@@ -146,6 +148,7 @@ impl Action {
"focus_left" => Action::FocusLeft,
"focus_right" => Action::FocusRight,
"window_switcher" => Action::WindowSwitcher,
+ "window_switcher_prev" => Action::WindowSwitcherPrev,
"move" => Action::Move,
"resize" => Action::Resize,
"exit" => Action::Exit,
diff --git a/src/bindings.rs b/src/bindings.rs
index c348c1e..6935282 100644
--- a/src/bindings.rs
+++ b/src/bindings.rs
@@ -148,6 +148,8 @@ pub const DEFAULT_BINDINGS: &[DefaultBinding] = &[
DefaultBinding { mods: mods::SUPER | mods::CTRL, key: "minus", action: Action::ZoomOut },
DefaultBinding { mods: mods::SUPER | mods::CTRL, key: "equal", action: Action::ZoomReset },
DefaultBinding { mods: mods::SUPER | mods::SHIFT, key: "r", action: Action::Reload },
+ // Reverse companion to the (user-configured) super+tab window switcher.
+ DefaultBinding { mods: mods::SUPER | mods::SHIFT, key: "Tab", action: Action::WindowSwitcherPrev },
];
#[cfg(test)]
@@ -182,7 +184,7 @@ mod tests {
Action::None, Action::Spawn, Action::Toggle, Action::Close,
Action::FocusNext, Action::FocusPrev, Action::FocusUp,
Action::FocusDown, Action::FocusLeft, Action::FocusRight,
- Action::WindowSwitcher,
+ Action::WindowSwitcher, Action::WindowSwitcherPrev,
Action::Move, Action::Resize, Action::Exit, Action::Reload,
Action::Fullscreen, Action::LayoutNext, Action::ModeNext,
Action::ModeNextShared, Action::View1, Action::View2,