Crate grim_rs

Crate grim_rs 

Source
Expand description

§grim-rs

A pure Rust implementation of the grim screenshot utility for Wayland.

This library provides a simple interface for taking screenshots on Wayland compositors that support the wlr-screencopy protocol.

§Features

  • Capture entire screen (all outputs)
  • Capture specific output by name
  • Capture specific region
  • Capture multiple outputs with different parameters
  • Save screenshots as PNG or JPEG
  • Get screenshot data as PNG or JPEG bytes

§Example

use grim_rs::Grim;

let mut grim = Grim::new()?;
let result = grim.capture_all()?;
grim.save_png(&result.data, result.width, result.height, "screenshot.png")?;

Re-exports§

pub use error::Error;
pub use error::Result;
pub use geometry::Box;

Modules§

error
geometry

Structs§

CaptureParameters
Parameters for capturing a specific output.
CaptureResult
Result of a screenshot capture operation.
Grim
Main interface for taking screenshots.
MultiOutputCaptureResult
Result of capturing multiple outputs.
Output
Information about a display output.