{"id":17991673,"url":"https://github.com/iyear/mousetrap-rs","last_synced_at":"2025-03-25T23:32:23.822Z","repository":{"id":65561354,"uuid":"581407451","full_name":"iyear/mousetrap-rs","owner":"iyear","description":"Detect starting from Windows explorer in Rust","archived":false,"fork":false,"pushed_at":"2022-12-23T08:20:21.000Z","size":5,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T04:54:03.077Z","etag":null,"topics":["cli","mousetrap","rust-library","windows-api"],"latest_commit_sha":null,"homepage":"","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/iyear.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}},"created_at":"2022-12-23T05:08:51.000Z","updated_at":"2023-09-11T12:23:10.000Z","dependencies_parsed_at":"2023-01-30T18:01:20.056Z","dependency_job_id":null,"html_url":"https://github.com/iyear/mousetrap-rs","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyear%2Fmousetrap-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyear%2Fmousetrap-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyear%2Fmousetrap-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iyear%2Fmousetrap-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iyear","download_url":"https://codeload.github.com/iyear/mousetrap-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245562255,"owners_count":20635896,"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":["cli","mousetrap","rust-library","windows-api"],"created_at":"2024-10-29T19:23:17.494Z","updated_at":"2025-03-25T23:32:21.447Z","avatar_url":"https://github.com/iyear.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mousetrap-rs\n\n[![Crates.io](https://img.shields.io/crates/v/mousetrap?style=flat-square)](https://crates.io/crates/mousetrap)\n[![Docs.rs](https://img.shields.io/docsrs/mousetrap?style=flat-square)](https://docs.rs/mousetrap)\n\nRust implementation of https://github.com/inconshreveable/mousetrap, which is used in ngrok.\n\n\u003e mousetrap is a tiny library that answers a single question.\n\u003e\n\u003e On a Windows machine, was the process invoked by someone double-clicking on the executable file while browsing in explorer?\n\n\u003e `mousetrap` provides a way to detect these invocations so that you can provide more helpful behavior and instructions on how to run the CLI tool.\n\nOn non-Windows platforms, this library always returns `false`.\n\n## Installation\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nmousetrap = \"0.1\"\n```\n\n## Usage\n\n```rust\nuse std::io;\n\nfn main() {\n    println!(\"started_by_explorer: {}\", mousetrap::started_by_explorer());\n\n    println!(\"Press Enter to exit...\");\n\n    let mut s = String::new();\n    io::stdin().read_line(\u0026mut s).unwrap();\n}\n```\n\n## More\n\nThis is my first contribution to the Rust community. I hope you find it useful.\n\nAnd I'm not familiar with Rust currently, so if you have any suggestions, feel free to open an issue or PR.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyear%2Fmousetrap-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiyear%2Fmousetrap-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiyear%2Fmousetrap-rs/lists"}