Clipboard monitoring utilities.
This project exports Master
struct that provides simple way to handle clipboard updates.
Example: ```rust extern crate clipboard_master;
use clipboard_master::{Master, ClipboardHandler, CallbackResult};
use std::io;
struct Handler;
impl ClipboardHandler for Handler { fn onclipboardchange(&mut self) -> CallbackResult { println!("Clipboard change happened!"); CallbackResult::Next }
fn on_clipboard_error(&mut self, error: io::Error) -> CallbackResult {
eprintln!("Error: {}", error);
CallbackResult::Next
}
}
fn main() { let _ = Master::new(Handler).run(); } ```
Simple monitor of clipboard content. Following actions are performed: - Add magnet link to default torrent client. - Trim clipboard content
``` USAGE: cp-master [flags]
Starts monitoring Clipboard changes
Flags: -h, --help - Prints this message. -m, --magnet - Starts torrent client when detecting magnet URI. ```