Skip to content
/ clipin Public

A Rust library to get text from clipboard or stdin

License

Notifications You must be signed in to change notification settings

0x6b/clipin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clipin

A Rust library to get text from clipboard or stdin.

Usage

Enable exactly one feature: async or sync. Returns trimmed text and optionally the clipboard instance if available.

Async

cargo add clipin --features async
#[tokio::main]
async fn main() {
    let (text, clipboard) = clipin::get().await.unwrap();
    println!("{text}");
}

Sync

cargo add clipin --features sync
fn main() {
    let (text, clipboard) = clipin::get().unwrap();
    println!("{text}");
}

License

MIT. See LICENSE for details.

About

A Rust library to get text from clipboard or stdin

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages