A Rust library to get text from clipboard or stdin.
Enable exactly one feature: async or sync. Returns trimmed text and optionally the clipboard instance if available.
cargo add clipin --features async#[tokio::main]
async fn main() {
let (text, clipboard) = clipin::get().await.unwrap();
println!("{text}");
}cargo add clipin --features syncfn main() {
let (text, clipboard) = clipin::get().unwrap();
println!("{text}");
}MIT. See LICENSE for details.