#clipboard #global #text #paste #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

#1029 in Text processing

Download history 2/week @ 2024-02-15 19/week @ 2024-02-22 18/week @ 2024-02-29 7/week @ 2024-03-07 5/week @ 2024-03-14 31/week @ 2024-03-28 30/week @ 2024-04-04

61 downloads per month
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

~125KB