git.lucas.co / cce-window-manager
window management library
git clone https://git.lucas.co/cce-window-manager.git

commitfd568c47db3a0f23dded9b19d06f465ee5e59d98
parent641d09d9c7
authorLucas Galante <[email protected]>
date2026-07-28 20:11
feat: Screenshot action, bound to Print by default

Co-Authored-By: Claude Fable 5 <[email protected]>

 src/api.rs      | 3 +++
 src/bindings.rs | 1 +
 2 files changed, 4 insertions(+)

diff --git a/src/api.rs b/src/api.rs
index 5111521..2c6e488 100644
--- a/src/api.rs
+++ b/src/api.rs
@@ -88,6 +88,7 @@ pub enum Action {
     PanRight,
     PanUp,
     PanDown,
+    Screenshot,
 }
 
 impl Action {
@@ -134,6 +135,7 @@ impl Action {
             Action::PanRight => "pan_right",
             Action::PanUp => "pan_up",
             Action::PanDown => "pan_down",
+            Action::Screenshot => "screenshot",
         }
     }
 
@@ -180,6 +182,7 @@ impl Action {
             "pan_right" => Action::PanRight,
             "pan_up" => Action::PanUp,
             "pan_down" => Action::PanDown,
+            "screenshot" => Action::Screenshot,
             _ => return None,
         })
     }
diff --git a/src/bindings.rs b/src/bindings.rs
index 6935282..3dd81ec 100644
--- a/src/bindings.rs
+++ b/src/bindings.rs
@@ -140,6 +140,7 @@ pub const DEFAULT_BINDINGS: &[DefaultBinding] = &[
     DefaultBinding { mods: mods::SUPER, key: "l", action: Action::FocusRight },
     DefaultBinding { mods: mods::SUPER, key: "Left", action: Action::OverlayLeft },
     DefaultBinding { mods: mods::SUPER, key: "Right", action: Action::OverlayRight },
+    DefaultBinding { mods: 0, key: "Print", action: Action::Screenshot },
     DefaultBinding { mods: mods::SUPER | mods::CTRL, key: "Up", action: Action::PanUp },
     DefaultBinding { mods: mods::SUPER | mods::CTRL, key: "Down", action: Action::PanDown },
     DefaultBinding { mods: mods::SUPER | mods::CTRL, key: "Left", action: Action::PanLeft },