Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zee-editor/crossclip
Crossclip is a cross-platform Rust library for interfacing with the system clipboard
https://github.com/zee-editor/crossclip
clipboard cross-platform x11
Last synced: 3 months ago
JSON representation
Crossclip is a cross-platform Rust library for interfacing with the system clipboard
- Host: GitHub
- URL: https://github.com/zee-editor/crossclip
- Owner: zee-editor
- License: apache-2.0
- Created: 2020-07-12T17:24:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-24T00:09:02.000Z (over 2 years ago)
- Last Synced: 2024-10-16T04:12:28.335Z (4 months ago)
- Topics: clipboard, cross-platform, x11
- Language: Rust
- Homepage:
- Size: 113 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# Crossclip
[![Build Status](https://travis-ci.com/mcobzarenco/crossclip.svg?branch=master)](https://travis-ci.com/mcobzarenco/crossclip)
[![Crates.io](https://img.shields.io/crates/v/crossclip.svg)](https://crates.io/crates/crossclip)
[![Documentation](https://docs.rs/crossclip/badge.svg)](https://docs.rs/crossclip)Crossclip is a cross-platform Rust library for interfacing with the system
clipboard. It has been tested on GNU/Linux, FreeBSD, Windows and Mac OSX.The library is a fork of [clipboard2](), itself a fork of [rust-clipboard](https://github.com/aweinstock314/rust-clipboard)
## Prerequisites
On Linux you need the x11 library. On a Debian-y distribution, install it with something like
```bash
sudo apt install xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev
```## Example
```rust
use crossclip::{Clipboard, SystemClipboard, Result};fn main() -> Result<()> {
let clipboard = SystemClipboard::new()?;
clipboard.set_string_contents(String::from("Hello"))?;
println!("{}", clipboard.get_string_contents()?);
}
```## License
This project is licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or
http://opensource.org/licenses/MIT)at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion by you, as defined in the Apache-2.0 license, shall be dual
licensed as above, without any additional terms or conditions.