krust-cliplinkd 0.4.0

ClipLink daemon — receive text from mobile and auto-paste on desktop
1
2
3
4
5
6
7
8
9
10
11
use anyhow::Context;

/// Write text to the system clipboard.
pub fn set_text(text: &str) -> anyhow::Result<()> {
    let mut clipboard =
        arboard::Clipboard::new().context("Failed to open system clipboard")?;
    clipboard
        .set_text(text)
        .context("Failed to write to clipboard")?;
    Ok(())
}