{"id":20038233,"url":"https://github.com/jjcosgrove/brightosd","last_synced_at":"2026-05-13T09:31:49.776Z","repository":{"id":93586354,"uuid":"87728388","full_name":"jjcosgrove/brightosd","owner":"jjcosgrove","description":"macOS BezelUI client/server apps for displaying brightness OSD when using external monitors.","archived":false,"fork":false,"pushed_at":"2018-08-30T21:42:07.000Z","size":78,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T18:52:22.008Z","etag":null,"topics":["brightness","external-monitors","hammerspoon","macos","osd"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jjcosgrove.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-09T18:03:07.000Z","updated_at":"2019-03-01T13:36:20.000Z","dependencies_parsed_at":"2023-03-13T17:17:15.411Z","dependency_job_id":null,"html_url":"https://github.com/jjcosgrove/brightosd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjcosgrove%2Fbrightosd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjcosgrove%2Fbrightosd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjcosgrove%2Fbrightosd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjcosgrove%2Fbrightosd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jjcosgrove","download_url":"https://codeload.github.com/jjcosgrove/brightosd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241468178,"owners_count":19967806,"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":["brightness","external-monitors","hammerspoon","macos","osd"],"created_at":"2024-11-13T10:26:57.208Z","updated_at":"2026-05-13T09:31:44.741Z","avatar_url":"https://github.com/jjcosgrove.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BrightOSD\n\nmacOS BezelUI client/server apps for displaying brightness OSD when using external monitors.\n\n## Demo\n\n[![Demo](https://j.gifs.com/DRKpMn.gif)](https://www.youtube.com/watch?v=_4sBzKckLJ8)\n\n## Approach\n\nI created a simple client/server pair which communicates* using: [DistributedNotificationCenter](https://developer.apple.com/reference/foundation/distributednotificationcenter)\n\n*uni-directionally, from client to server only\n\nThe code is mostly Swift-based. No images are used, as I instead chose to draw the brightness image manually using: [NSBezierPath](https://developer.apple.com/reference/appkit/nsbezierpath)\n\nThe end result is OK, IMHO but there is probably scope to improve the colors/transparencies - although, for me I can now see the OSD more clearly when viewing above a very dark background (unlike stock BezelUI OSDs)\n\n## Install\n\nBuild both BrightOSDClient and BrightOSDServer with Xcode and copy binaries to your $PATH:\n```\n/usr/local/bin\n```\n\n## Usage\n\nStart BrightOSDServer:\n\n```\nbrightosdserver \u0026\n```\n\nSend desired brightness and mode (light/dark) to BrightOSDServer using BrightOSDClient:\n\n```\nbrightosdclient -b 10 -m dark\n```\n\nOr\n\n```\nbrightosdclient -b 5 -m light -s\n```\n\netc...\n\n## Options (BrightOSDClient)\n```\n-b brightness level (Int: 0-16)\n-m mode (String: light or dark)\n-s silent/suppressed output\n```\n\n## Tips\n\n1. Install ddcctl - from [here](https://github.com/kfix/ddcctl)\n2. Install Hammerspoon - from [here](https://github.com/Hammerspoon/hammerspoon)\n\nuse something like the following to allow the existing F1/F2 (brightness) keys to execute required commands (note this is for dual AOC monitors):\n\n```lua\nlocal minBrightOSDBrightness = 0\nlocal maxBrightOSDBrightness = 16\nlocal currentBrightOSDBrightness = maxBrightOSDBrightness\n\nlocal maxMonitorBrightness = 100\nlocal currentMonitorBrightness = maxMonitorBrightness\n\nlocal tap = hs.eventtap.new({ hs.eventtap.event.types.keyDown }, function(event)\n\n  local keyCode = event:getKeyCode()\n\n  if (keyCode == 145 or keyCode == 144) then\n\n    -- brightness down\n    if (keyCode == 145) then\n\n      if ( currentBrightOSDBrightness - 1 \u003e= 0) then\n        currentBrightOSDBrightness = currentBrightOSDBrightness - 1\n        currentMonitorBrightness = math.floor(maxMonitorBrightness/maxBrightOSDBrightness*currentBrightOSDBrightness + 0.5)\n\n        hs.execute('/usr/local/bin/ddcctl -d 1 -b ' .. currentMonitorBrightness)\n        hs.execute('/usr/local/bin/ddcctl -d 2 -b ' .. currentMonitorBrightness)\n      end\n\n    end\n\n     -- brightness up\n    if (keyCode == 144) then\n\n      if ( currentBrightOSDBrightness + 1 \u003c= maxBrightOSDBrightness) then\n         currentBrightOSDBrightness = currentBrightOSDBrightness + 1\n         currentMonitorBrightness = math.floor(maxMonitorBrightness/maxBrightOSDBrightness*currentBrightOSDBrightness + 0.5)\n\n         hs.execute('/usr/local/bin/ddcctl -d 1 -b ' .. currentMonitorBrightness)\n         hs.execute('/usr/local/bin/ddcctl -d 2 -b ' .. currentMonitorBrightness)\n      end\n\n    end\n\n    hs.execute('/usr/local/bin/brightosdclient -b ' .. currentBrightOSDBrightness)\n\n  end\n\n  return false\nend):start()\n```\n\nYou should then have a fairly decent brightness control for your external monitors on macOS.\n\n## Notes\n\nI cannot help you with ddcctl, or Hammerspoon. Please raise any issues you have with either tool, directly with the author(s).\n\n## Contribute\n\nBugs or feature requests/contributions can be done via:\n\n[https://github.com/jjcosgrove/brightosd/issues](https://github.com/jjcosgrove/brightosd/issues)\n\n## Authors\n\n* Just me for now.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjcosgrove%2Fbrightosd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjjcosgrove%2Fbrightosd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjcosgrove%2Fbrightosd/lists"}