All Projects → alacritty → copypasta

alacritty / copypasta

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE.apache2 MIT LICENSE.mit
Cross-platform Rust system clipboard library

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to copypasta

Ditto
Ditto is an extension to the Windows Clipboard. You copy something to the Clipboard and Ditto takes what you copied and stores it in a database to retrieve at a later time.
Stars: ✭ 193 (+3.76%)
Mutual labels:  clipboard
copy-image-clipboard
Lightweight library to copy PNG and JPG images to clipboard
Stars: ✭ 37 (-80.11%)
Mutual labels:  clipboard
uniclip
Cross-platform shared clipboard
Stars: ✭ 116 (-37.63%)
Mutual labels:  clipboard
Windows User Action Hook
A .NET library to subscribe for Windows operating system global user actions such mouse, keyboard, clipboard & print events
Stars: ✭ 224 (+20.43%)
Mutual labels:  clipboard
CopyPasteJS
This a small JS library to execute clipboard functions in a fast and easy way.
Stars: ✭ 20 (-89.25%)
Mutual labels:  clipboard
Copy-button
copy textview into anywhere
Stars: ✭ 14 (-92.47%)
Mutual labels:  clipboard
Vue Clipboards
📋 Vue2.0 directive to copy or cut text to clipboard.
Stars: ✭ 200 (+7.53%)
Mutual labels:  clipboard
Json-to-Dart-Model
marketplace.visualstudio.com/items?itemName=hirantha.json-to-dart
Stars: ✭ 84 (-54.84%)
Mutual labels:  clipboard
vim-poweryank
Copy text over SSH
Stars: ✭ 51 (-72.58%)
Mutual labels:  clipboard
ImageClipboard.jl
Copy & Paste images with Julia
Stars: ✭ 33 (-82.26%)
Mutual labels:  clipboard
Vim Yoink
Vim plugin that maintains a yank history to cycle between when pasting
Stars: ✭ 225 (+20.97%)
Mutual labels:  clipboard
Vscode Paste Image
paste image from clipboard to markdown/asciidoc directly!
Stars: ✭ 236 (+26.88%)
Mutual labels:  clipboard
clipsync-windows
Clipboard which sync with Android and Windows Platform.
Stars: ✭ 20 (-89.25%)
Mutual labels:  clipboard
Devcomrade
DevComrade - A copy/paste/run productivity improvement utility for developers
Stars: ✭ 206 (+10.75%)
Mutual labels:  clipboard
clipboard-watch
This is height performance clipboard watcher, support windows,osx
Stars: ✭ 21 (-88.71%)
Mutual labels:  clipboard
Clipboardy
Chrome extension for copying posted code to clipboard from stackoverflow.com, github.com & npmjs.com
Stars: ✭ 202 (+8.6%)
Mutual labels:  clipboard
no-clipboard-app
Share your clipboard text to your device like Oculus Go.
Stars: ✭ 12 (-93.55%)
Mutual labels:  clipboard
AsyncClipboardService
📋 An async & low-level windows clipboard service implementation for .NET, C#
Stars: ✭ 14 (-92.47%)
Mutual labels:  clipboard
nougat
Screenshot wrapper
Stars: ✭ 20 (-89.25%)
Mutual labels:  clipboard
WinPopclip
Popclip alternative for Windows
Stars: ✭ 76 (-59.14%)
Mutual labels:  clipboard

copypasta

copypasta is a rust-clipboard fork, adding support for the Wayland clipboard.

rust-clipboard is a cross-platform library for getting and setting the contents of the OS-level clipboard.

Example

extern crate copypasta;

use copypasta::{ClipboardContext, ClipboardProvider};

fn main() {
    let mut ctx = ClipboardContext::new().unwrap();

    let msg = "Hello, world!";
    ctx.set_contents(msg.to_owned()).unwrap();

    let content = ctx.get_contents().unwrap();

    println!("{}", content);
}

API

The ClipboardProvider trait has the following functions:

fn get_contents(&mut self) -> Result<String, Box<Error>>;
fn set_contents(&mut self, String) -> Result<(), Box<Error>>;

ClipboardContext is a type alias for one of {WindowsClipboardContext, OSXClipboardContext, X11ClipboardContext, NopClipboardContext}, all of which implement ClipboardProvider. Which concrete type is chosen for ClipboardContext depends on the OS (via conditional compilation).

License

rust-clipboard is dual-licensed under MIT and Apache2.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].