{"id":16244184,"url":"https://github.com/doumanash/clipboard-master","last_synced_at":"2025-04-06T11:08:38.175Z","repository":{"id":45965074,"uuid":"85160976","full_name":"DoumanAsh/clipboard-master","owner":"DoumanAsh","description":"Clipboard monitoring utility","archived":false,"fork":false,"pushed_at":"2024-08-10T05:48:58.000Z","size":35,"stargazers_count":43,"open_issues_count":1,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-11T14:17:54.180Z","etag":null,"topics":["clipboard","clipboard-manager","winapi"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/clipboard-master","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DoumanAsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-16T06:32:47.000Z","updated_at":"2024-09-16T09:05:11.000Z","dependencies_parsed_at":"2024-12-16T16:46:09.116Z","dependency_job_id":null,"html_url":"https://github.com/DoumanAsh/clipboard-master","commit_stats":{"total_commits":25,"total_committers":4,"mean_commits":6.25,"dds":0.12,"last_synced_commit":"2dd85cfe06c6439b9cb86acc0d556e3b2e524d85"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoumanAsh%2Fclipboard-master","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoumanAsh%2Fclipboard-master/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoumanAsh%2Fclipboard-master/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoumanAsh%2Fclipboard-master/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DoumanAsh","download_url":"https://codeload.github.com/DoumanAsh/clipboard-master/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247471520,"owners_count":20944158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clipboard","clipboard-manager","winapi"],"created_at":"2024-10-10T14:18:08.136Z","updated_at":"2025-04-06T11:08:38.134Z","avatar_url":"https://github.com/DoumanAsh.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clipboard-master\n\n![](https://github.com/DoumanAsh/clipboard-master/workflows/Rust/badge.svg)\n[![Crates.io](https://img.shields.io/crates/v/clipboard-master.svg)](https://crates.io/crates/clipboard-master)\n[![Docs.rs](https://docs.rs/clipboard-master/badge.svg)](https://docs.rs/clipboard-master/*/x86_64-pc-windows-msvc/clipboard_master/)\n\nClipboard monitoring library.\n\n## Supported platforms\n\n- Windows - uses dummy window to receive messages when clipboard changes;\n- Linux - uses [x11_clipboard](https://github.com/quininer/x11-clipboard)\n- MacOS - uses polling via `NSPasteboard::changeCount` as there is no event notification.\n\n## Clipboard Master Library\n\nThis project exports `Master` struct that provides simple way to handle clipboard updates.\n\nExample:\n\n```rust\nextern crate clipboard_master;\n\nuse clipboard_master::{Master, ClipboardHandler, CallbackResult};\n\nuse std::io;\n\nstruct Handler;\n\nimpl ClipboardHandler for Handler {\n    fn on_clipboard_change(\u0026mut self) -\u003e CallbackResult {\n        println!(\"Clipboard change happened!\");\n        CallbackResult::Next\n    }\n\n    fn on_clipboard_error(\u0026mut self, error: io::Error) -\u003e CallbackResult {\n        eprintln!(\"Error: {}\", error);\n        CallbackResult::Next\n    }\n}\n\nfn main() {\n    let mut master = Master::new(Handler).expect(\"create new monitor\");\n\n    let shutdown = master.shutdown_channel();\n    std::thread::spawn(move || {\n        std::thread::sleep(core::time::Duration::from_secs(1));\n        println!(\"I did some work so time to finish...\");\n        shutdown.signal();\n    });\n    //Working until shutdown\n    master.run().expect(\"Success\");\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoumanash%2Fclipboard-master","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoumanash%2Fclipboard-master","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoumanash%2Fclipboard-master/lists"}