{"id":20186246,"url":"https://github.com/ugolinolle/charger-detector","last_synced_at":"2026-05-04T23:39:45.419Z","repository":{"id":251395796,"uuid":"837291637","full_name":"UgolinOlle/charger-detector","owner":"UgolinOlle","description":"🖥️ · Detect when a charger is connected to a computer","archived":false,"fork":false,"pushed_at":"2024-08-02T16:22:51.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-05T05:13:37.200Z","etag":null,"topics":["asahi","asahilinux","c","linux","macos"],"latest_commit_sha":null,"homepage":"https://ugolin-olle.com/projects/charger-detector","language":"C","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/UgolinOlle.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":"2024-08-02T16:15:22.000Z","updated_at":"2024-08-02T16:22:54.000Z","dependencies_parsed_at":"2024-08-02T18:13:47.659Z","dependency_job_id":"a1e0c687-153f-4bcb-a3fe-49c6fc0c8310","html_url":"https://github.com/UgolinOlle/charger-detector","commit_stats":null,"previous_names":["ugolinolle/charger-detector"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/UgolinOlle/charger-detector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UgolinOlle%2Fcharger-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UgolinOlle%2Fcharger-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UgolinOlle%2Fcharger-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UgolinOlle%2Fcharger-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UgolinOlle","download_url":"https://codeload.github.com/UgolinOlle/charger-detector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UgolinOlle%2Fcharger-detector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32629523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"ssl_error","status_checked_at":"2026-05-04T10:08:02.005Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["asahi","asahilinux","c","linux","macos"],"created_at":"2024-11-14T03:16:32.725Z","updated_at":"2026-05-04T23:39:45.399Z","avatar_url":"https://github.com/UgolinOlle.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Charger Detector\n\n## 📕・Description\n\nThis project provides a solution to detect when a charger is connected to a computer, even when the computer is in sleep mode. Upon detection, a sound is played to notify the user. The service is configured to run in the background using systemd, with the capability to handle events even during sleep.\n\n## 📦・Prerequisites\n\n- Linux with systemd configured.\n- Terminal access with administrator privileges.\n- A functional audio device.\n\n## ⌨️・・Steps to Install and Configure the Service\n\n1. Clone the Repository and Compile the Program\n\nClone the project repository and compile the program using make:\n\n```bash\ngit clone https://github.com/UgolinOlle/charger-detector.git\ncd charger-detector\nmake install\n```\n\n2. Configure the systemd Service\n\nThe service is configured to run under systemd as a user service. Once installed, it can be enabled and started with the following commands:\n\n```bash\nsystemctl --user enable charger-detector.service\nsystemctl --user start charger-detector.service\n```\n\n3. Check the Service Status\n\nYou can verify if the service is running correctly with:\n\n```bash\nsystemctl --user status charger-detector.service\n```\n\n4. Test the Program\n\nPlug in the charger to verify that the program plays a sound upon detection. If the sound is not played, ensure that your audio system is functional and that the service is active.\nAdditional Resources\n\n- Official systemd Documentation\n- Mac Power Management Guide\n\nFeel free to customize this program to suit your specific needs, including setting up custom sounds or adding additional features.\n\n## 🧑‍🤝‍🧑・Contributing\n\nContributions to the Charger Detector project are welcome. If you encounter any issues or wish to improve the code, feel free to open a pull request or an issue.\n\n## 📑・License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n\n## 📩・Contact\n\nFor any questions or collaboration, feel free to contact us via [email](mailto:hello@ugolin-olle.com) or\n[LinkedIn](https://linkedin.com/in/ugolin-olle).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fugolinolle%2Fcharger-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fugolinolle%2Fcharger-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fugolinolle%2Fcharger-detector/lists"}