#clipboard #global #paste #text #copy

glcp

Small library to help you set and get text from a global clipboard

3 releases

0.1.2 Mar 28, 2023
0.1.1 Mar 28, 2023
0.1.0 Mar 28, 2023

#23 in #paste


Used in shrtcut

MIT license

5KB
83 lines

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)
}

Dependencies

~135KB