Crates.io | glcp |
lib.rs | glcp |
version | 0.1.2 |
source | src |
created_at | 2023-03-28 03:42:49.464796 |
updated_at | 2023-03-28 03:47:10.401957 |
description | Small library to help you set and get text from a global clipboard. |
homepage | https://github.com/UnsafeOats/glip |
repository | https://github.com/UnsafeOats/glip |
max_upload_size | |
id | 822711 |
size | 4,584 |
not much to say here, this is a small library to let you set and get text from the global clipboard. basically, it's frustrating for the clipboard to disappear as soon as your program finishes running, so this is a wrapper on the cli commands for global clipboards in linx, mac, and windows.
use glcp::GlobalClip;
use anyhow::Result;
fn main() -> Result<() {
let value = "set it here";
GlobalClip::set(value);?
let from_clipboard = GlobalClip::get()?;
assert_eq!(value, from_clipboard)
}