{"id":20613073,"url":"https://github.com/manio/cec-dpms","last_synced_at":"2025-07-24T23:39:54.172Z","repository":{"id":57544902,"uuid":"461898060","full_name":"manio/cec-dpms","owner":"manio","description":"Simple program to power on/off TV by simulating DPMS feature using HDMI CEC","archived":false,"fork":false,"pushed_at":"2025-04-14T05:45:28.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-17T10:46:51.472Z","etag":null,"topics":["cec","dpms","hdmi","libcec","rust"],"latest_commit_sha":null,"homepage":"https://manio.github.io/cec-dpms/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manio.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,"zenodo":null}},"created_at":"2022-02-21T14:31:34.000Z","updated_at":"2025-04-14T05:45:31.000Z","dependencies_parsed_at":"2025-04-05T10:21:40.074Z","dependency_job_id":"6f207472-f388-49bb-9e63-94c835623018","html_url":"https://github.com/manio/cec-dpms","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/manio/cec-dpms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manio%2Fcec-dpms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manio%2Fcec-dpms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manio%2Fcec-dpms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manio%2Fcec-dpms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manio","download_url":"https://codeload.github.com/manio/cec-dpms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manio%2Fcec-dpms/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266923038,"owners_count":24006996,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cec","dpms","hdmi","libcec","rust"],"created_at":"2024-11-16T11:08:47.553Z","updated_at":"2025-07-24T23:39:54.144Z","avatar_url":"https://github.com/manio.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔘 cec-dpms\n\n[![Crates.io](https://img.shields.io/crates/v/cec-dpms.svg)](https://crates.io/crates/cec-dpms)\n[![Crates.io](https://img.shields.io/crates/l/cec-dpms.svg)](https://crates.io/crates/cec-dpms)\n\n## Description\nThis small linux tool is intended to emulate DPMS using [HDMI-CEC](https://en.wikipedia.org/wiki/Consumer_Electronics_Control) interface.\nIt is using the [libcec](https://github.com/Pulse-Eight/libcec) library via [cec-rs](https://crates.io/crates/cec-rs).\nThis way it allows to emulate DPMS but for the TV connected to the CEC bus, as the result the TV behaves similar to a regular monitor.\nThe user however has to run own scripts for controlling it.\n\n## Usage\n```\ncec-dpms 0.1.0\nSimple program to power on/off TV by simulating DPMS feature using HDMI CEC\n\nUSAGE:\n    cec-dpms [OPTIONS]\n\nOPTIONS:\n    -d, --debug            Enable debug info\n    -h, --help             Print help information\n    -i, --input \u003cINPUT\u003e    input device path/name of CEC device\n    -V, --version          Print version information\n```\n\nThe program is designed to be continuously running in background (Eg. started from systemd service).\u003cbr\u003e\nIt is listening to `USR1` and `USR2` signals:\n- `USR1` is powering ON the TV,\n- `USR2` is powering OFF the TV\n\n## Example\nAn example of using this tool along with [Sway](https://swaywm.org/):\u003cbr\u003e\nIn the sway config file configure the `swayidle` like this:\n```\nexec swayidle \\\n    timeout 600 'swaymsg \"output * dpms off\"' \\\n       resume 'swaymsg \"output * dpms on\"' \\\n    timeout 600 'sudo pkill -USR2 cec-dpms' \\\n       resume 'sudo pkill -USR1 cec-dpms'\n```\n\n## systemd integration\nA sample service file for systemd is here:\u003cbr\u003e\n[systemd/cec-dpms.service](https://github.com/manio/cec-dpms/blob/master/systemd/cec-dpms.service)\u003cbr\u003e\nYou need to adjust it for your needs (eg. check the binary path).\u003cbr\u003e\nAfter placing the unit file in correct location and reloading systemd, the unit can be started as usual:\u003cbr\u003e\n`systemctl start cec-dpms.service`\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanio%2Fcec-dpms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanio%2Fcec-dpms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanio%2Fcec-dpms/lists"}