{"id":16646666,"url":"https://github.com/alexdelorenzo/brightness","last_synced_at":"2025-10-04T13:11:36.616Z","repository":{"id":71776043,"uuid":"144422174","full_name":"alexdelorenzo/brightness","owner":"alexdelorenzo","description":"☀️ Dim your Mac's display from the command line via CoreDisplay","archived":false,"fork":false,"pushed_at":"2018-09-01T17:05:11.000Z","size":88,"stargazers_count":26,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T16:05:29.402Z","etag":null,"topics":["brightness-control","brightness-daemon","brightness-level","coredisplay","facial-recognition","macos","macosx","osx"],"latest_commit_sha":null,"homepage":"https://alexdelorenzo.dev/programming/2018/08/16/reverse_engineering_private_apple_apis","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexdelorenzo.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":"2018-08-11T22:31:33.000Z","updated_at":"2024-11-22T20:12:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"92d74f43-fb51-4930-87ab-8b11fad49fef","html_url":"https://github.com/alexdelorenzo/brightness","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alexdelorenzo/brightness","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdelorenzo%2Fbrightness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdelorenzo%2Fbrightness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdelorenzo%2Fbrightness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdelorenzo%2Fbrightness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexdelorenzo","download_url":"https://codeload.github.com/alexdelorenzo/brightness/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdelorenzo%2Fbrightness/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278316458,"owners_count":25966987,"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-10-04T02:00:05.491Z","response_time":63,"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":["brightness-control","brightness-daemon","brightness-level","coredisplay","facial-recognition","macos","macosx","osx"],"created_at":"2024-10-12T08:42:45.745Z","updated_at":"2025-10-04T13:11:36.599Z","avatar_url":"https://github.com/alexdelorenzo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ☀ brightness: Adjust display brightness with your 🌞\n\n`brightness` is a command-line utility and daemon that adjusts your display's brightness.\n\nIn daemonized mode, `brightness` will use facial recognition to determine whether or not to change your display's brightness when your system goes idle.\n\nAs a command-line utility, you can use `brightness` to get and set your display's brightness.\n\n## Use Cases\n\nYou intend to leave your screen on, even while there's little to no mouse or keyboard activity.  This can happen while watching a video, reading text or following a recipe. \n\nYou probably don't like it when your screen goes off when you're looking at it. There's probably a camera on your screen and it's probably in front of your face.\n\nLet's use it to make computers a little less annoying.\n\n### You want to adjust display brightness programmatically, or you're using macOS 10.13+\n\nApple deprecated their public IOKit Framework APIs in favor of an undocumented CoreDisplay API. Deprecation of IOKit broke existing utilities.\n\nHowever, [`brightness` takes advantage of private CoreDisplay APIs that control display brightness](https://alexdelorenzo.me/programming/2018/08/16/reverse_engineering_private_apple_apis.html), allowing us to adjust it programmatically.\n\n# Installation\n\n```bash\n# clone the repo\ngit clone https://github.com/thismachinechills/brightness.git\n\n\n# install the application\ncd brightness\npip3 install -r requirements.txt\npython3 setup.py install\n\n\n# check if it worked\nbrightness --help\n```\n\n## Notes\n\nI've only tested this on macOS 10.13\n\n## Prerequisites\n\n### Python Version\nPython 3.7.0+\n\n\n### Application Dependencies\n`pip3 install -r requirements.txt`\n\n\n### Platform Dependencies\n\n#### macOS\n\nmacOS 10.13+. \n\nAll dependencies can be installed with `pip3 install -r requirements.txt`.\n\nOr\n`pip3 install pyobjc`\n\n#### Windows\nWindows 10+. \n\nAll dependencies can be installed with `pip3 install -r requirements.txt`.\n\nOr `pip3 install wmi`\n\n#### Linux\nPlease install `xbacklight` and `xprintidle`.\n\n##### Ubuntu \u0026 Debian\n`sudo apt install xbacklight xprintidle`\n\n\n# Usage\n\n```bash\nUsage: brightness [OPTIONS]\n\n  brightness is a daemon and command-line utility that adjusts your\n  display's brightness.\n\n  In daemonized mode, brightness will use facial recognition to determine\n  whether or not to change your display's brightness when your system goes\n  idle.\n\n  As a command-line utility, you can use brightness to get and set your\n  display's brightness.\n\n  Run without arguments to get the current brightness for the default\n  display.\n\n  $ brightness\n  75.0\n\nOptions:\n  -c, --capture INTEGER           Capture device.  [default: 0]\n  -b, --brightness INTEGER RANGE  Screen brightness between 0 and 100.\n                                  [default: 0]\n  -d, --daemon                    Run in daemonized mode. Use facial\n                                  recognition when system goes idle to\n                                  determine whether to change brightness.\n                                  [default: False]\n  -i, --idle FLOAT                Seconds between inactivtiy and facial\n                                  recognition.  [default: 300]\n  -f, --frames INTEGER            Number of frames to capture in succession.\n                                  Increase this value if you're getting false\n                                  negatives  [default: 2]\n  --help                          Show this message and exit.\n```\n\n## Example\n\nChange the brightness to 50%\n\n`brightness -b 50`\n\nRun in daemonized mode. If the system has been idle for 10 minutes (600 seconds), `brightness` will check for faces.\n\n`brightness -d -i 600`\n\nRun in daemonized mode. If the system has been idle for 120 seconds, capture 3 frames from device `0` for use in facial recognition.\n\n`brightness -d -c 0 -b 0 -i 120 -f 3`\n\n\n\n\n# Contributions\nAll contributions are welcomed and encouraged. \n\nBy submitting a contribution, you agree that your modifications can be distributed under the licensing terms below.\n\n# License\nSee `LICENSE`.\n \n## Alternative License\nPlease contact me if you'd like to use this software under another license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdelorenzo%2Fbrightness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexdelorenzo%2Fbrightness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdelorenzo%2Fbrightness/lists"}