{"id":17101336,"url":"https://github.com/hackerb9/sarmad","last_synced_at":"2025-03-23T19:16:17.490Z","repository":{"id":113746468,"uuid":"208253701","full_name":"hackerb9/sarmad","owner":"hackerb9","description":"Set external display backlight using builtin brightness keys","archived":false,"fork":false,"pushed_at":"2021-08-20T05:30:04.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T01:56:37.962Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hackerb9.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":"2019-09-13T11:45:21.000Z","updated_at":"2021-08-20T05:30:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"6a511d89-ca18-426f-b985-2a777185700a","html_url":"https://github.com/hackerb9/sarmad","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/hackerb9%2Fsarmad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackerb9%2Fsarmad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackerb9%2Fsarmad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackerb9%2Fsarmad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hackerb9","download_url":"https://codeload.github.com/hackerb9/sarmad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245153896,"owners_count":20569408,"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":[],"created_at":"2024-10-14T15:24:50.132Z","updated_at":"2025-03-23T19:16:17.461Z","avatar_url":"https://github.com/hackerb9.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sarmad\nSet external display backlight using builtin brightness keys\n\nEver plug in an external display and find that the brightness keys on\nyour laptop don't work with it? This program solves that problem.\n\nSarmad sets the brightness on *all* displays to follow what is set by\nbuiltin keys and typical tools such as Gnome's brightness slider.  It\ndoes this by reading values set in `/sys/class/backlight/*/brightness`.\nSarmad then uses xrandr to attempt to set every display's backlight\ndirectly. If that fails (for example, with HDMI connections) it uses\nxrandr to adjust brightness in software.\n\n## Installation\n\nIt's a shell script, so just\n[download it](https://github.com/hackerb9/sarmad/raw/master/sarmad),\nmark it executable, and put it in your path. \n```\nwget https://github.com/hackerb9/sarmad/raw/master/sarmad\nchmod 755 sarmad\nsudo mv sarmad /usr/local/bin/sarmad\n```\n\n## Usage\n\nRun `sarmad` in the background and then hit your brightness keys.\n\nTo have it automatically start at login, run it in the background from\n`~/.xsessionrc`.\n\n```\necho 'sarmad \u0026'  \u003e\u003e ~/.xsessionrc\n```\n\n## Caveats\n\nThis only works on machines with a detected backlight, such as\nlaptops. It reads the current brightness level from the file\n`/sys/class/backlight/*/brightness`. \n\nIf you don't have that, then you'll want to use a different tool, such\nas binding a keyboard shortcut to run my \n[brightness script](https://github.com/hackerb9/brightness). You can also try \n`xbacklight +10` or using `acpi_listen` to detect special brightness up and down keys.\n\nThe reason I went with this odd, indirect way is so that other\nbacklight control tools, particularly Gnome's brightness slider, would\nwork automatically.\n\n## What's with the weird name?\n\nA descriptive name would've been too long, so I named it after\n@sarmadka, whose\n[script](https://github.com/pop-os/pop/issues/73#issuecomment-381296708)\ninspired this one. It's also indirectly named after Sarmad Kashani,\nthe mystic poet who “once was bathed in the Light of Truth within...”\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackerb9%2Fsarmad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhackerb9%2Fsarmad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackerb9%2Fsarmad/lists"}