aboutsummaryrefslogtreecommitdiff
path: root/src/ipc/client.rs
diff options
context:
space:
mode:
authorKainoa Kanter <kainoa@t1c.dev>2025-10-25 23:33:49 -0700
committerGitHub <noreply@github.com>2025-10-26 06:33:49 +0000
commite6f3c538da0c646bda43fcde7ef7dc3b771e0c8b (patch)
tree935a519695fecc6998790bb628c85c1d6db52262 /src/ipc/client.rs
parent4310c20c320d040f3df7a93de4064e452a1876ae (diff)
downloadniri-e6f3c538da0c646bda43fcde7ef7dc3b771e0c8b.tar.gz
niri-e6f3c538da0c646bda43fcde7ef7dc3b771e0c8b.tar.bz2
niri-e6f3c538da0c646bda43fcde7ef7dc3b771e0c8b.zip
feat: event-stream event for when a screenshot is taken (#2565)
* feat: event-stream event for when a screenshot is taken * ScreenshotTaken --> ScreenshotCaptured * review comments * fix: screenshot completion event path serializatation * fixes --------- Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
Diffstat (limited to 'src/ipc/client.rs')
-rw-r--r--src/ipc/client.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ipc/client.rs b/src/ipc/client.rs
index 4c356355..3c7b27a9 100644
--- a/src/ipc/client.rs
+++ b/src/ipc/client.rs
@@ -481,6 +481,15 @@ pub fn handle_msg(mut msg: Msg, json: bool) -> anyhow::Result<()> {
};
println!("Config loaded {status}");
}
+ Event::ScreenshotCaptured { path } => {
+ let mut parts = vec![];
+ parts.push("copied to clipboard".to_string());
+ if let Some(path) = &path {
+ parts.push(format!("saved to {path}"));
+ }
+ let description = parts.join(" and ");
+ println!("Screenshot captured: {description}");
+ }
}
}
}