glcp

Crates.ioglcp
lib.rsglcp
version0.1.2
sourcesrc
created_at2023-03-28 03:42:49.464796
updated_at2023-03-28 03:47:10.401957
descriptionSmall library to help you set and get text from a global clipboard.
homepagehttps://github.com/UnsafeOats/glip
repositoryhttps://github.com/UnsafeOats/glip
max_upload_size
id822711
size4,584
shane s (UnsafeOats)

documentation

README

glip

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.

usage

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)
}
Commit count: 4

cargo fmt