{"id":13604716,"url":"https://github.com/F-i-f/soft-brightness","last_synced_at":"2025-04-12T02:31:24.320Z","repository":{"id":45349186,"uuid":"169389882","full_name":"F-i-f/soft-brightness","owner":"F-i-f","description":"Gnome-shell extension to manage your display brightness via an alpha overlay (instead of the backlight).","archived":false,"fork":false,"pushed_at":"2024-05-27T06:41:28.000Z","size":307,"stargazers_count":120,"open_issues_count":21,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-02T19:35:47.292Z","etag":null,"topics":["brightness","dimmer","gnome-shell","gnome-shell-extension"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/F-i-f.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}},"created_at":"2019-02-06T10:37:57.000Z","updated_at":"2024-07-24T22:03:26.000Z","dependencies_parsed_at":"2024-01-16T23:45:41.555Z","dependency_job_id":"86994acb-3717-4507-9f20-f71e6ddeba05","html_url":"https://github.com/F-i-f/soft-brightness","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/F-i-f%2Fsoft-brightness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/F-i-f%2Fsoft-brightness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/F-i-f%2Fsoft-brightness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/F-i-f%2Fsoft-brightness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/F-i-f","download_url":"https://codeload.github.com/F-i-f/soft-brightness/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223489627,"owners_count":17153791,"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","dimmer","gnome-shell","gnome-shell-extension"],"created_at":"2024-08-01T19:00:50.442Z","updated_at":"2024-11-07T09:30:47.782Z","avatar_url":"https://github.com/F-i-f.png","language":"JavaScript","funding_links":[],"categories":["others","JavaScript"],"sub_categories":[],"readme":"# Soft Brightness Gnome Shell Extension\n\n[![Build Status](https://travis-ci.org/F-i-f/soft-brightness.svg?branch=master)](https://travis-ci.org/F-i-f/soft-brightness)\n\n![Brightness slider in Gnome Shell's system menu](docs/soft-brightness.png)\n\n## Overview\n\nSoft Brightness uses an alpha overlay to control the brightness on all\nor some of your monitors.  It integrates smoothly and does not\ninterfere with other Gnome Shell features.  It works flawlessly with\nthe _Night Light_, the _Magnifier_ from the Accessibility Services, or\nwith screen captures (as long as they are initiated by Gnome Shell).\n\nCommon uses are:\n\n- Your laptop has no back-light, maybe because it's not supported, or\n  you have an OLED display.\n\n- You want to control the brightness level of external monitor like\n  you do with your built-in screen.\n\nBonus features:\n\n- Minimum brightness level: do not get lost in the dark.\n\n- Can operate the shell in tear-free (VSync) mode at all time.\n\n- Disables itself temporarily when a screen shot is taken.\n\n## Configuration\n\nSoft Brightness comes with a configuration panel, which can be\naccessed from the \"Tweaks\" application or the [Gnome Shell Extensions\npage](https://extensions.gnome.org/local/).\n\n![Soft Brightness preference panel](docs/preferences.png)\n\n### Configuration Settings\n\n#### _Use backlight control_\n\nWhen enabled, Soft Brightness will work together with your computer's\nback-light.  The brightness slider and keyboard brightness hotkeys\nwill control both the back-light and the Soft Brightness overlays.\nThis is most useful:\n\n- if you have a back-light and  _Monitors_ is set to _External_, or\n\n- if a back-light is detected by Gnome but is not working (like some\n  OLED panel laptops which report having a back-light brightness which\n  doesn't exist).  In that latter case _Monitors_ should be set to\n  _All_.\n\nIf _Use backlight control_ is disabled, the Brightness slider will\nonly control the Soft Brightness overlays.  The keyboard brightness\nhotkeys will keep their default bindings.\n\n#### _Monitor(s)_\n\n- If set to _All_, a brightness overlay will be added to all attached\n  monitors.\n\n- If set to _Built-in_, the brightness overlay will only be added to\n  the built-in monitor, which is the setting right below _Monitor(s)_.\n\n- If set to _External_, a brightness overlay will only be added to all\n  monitors which are not the built-in monitor, defined in the setting\n  right below _Monitor(s)_.\n\n#### _Built-in monitor_\n\nA list of currently attached monitors is displayed.  Pick from the\nlist which monitor should be considered the built-in monitor.\n\nThe setting only has an effect if _Monitor(s)_ is set to _Built-in_ or\n_External_.\n\n#### _Full-screen behavior_\n\nChoose one of:\n\n- _Do not enforce brightness in full-screen_: When an application\n  enters full-screen mode, remove the brightness overlays.  You may\n  want to try this setting if your applications' refresh rate is\n  lagging in full-screen.  The application will\n  [unredirect](https://passthroughpo.st/linux-desktop-compositors-performance-functionality)\n  its window and will bypass Gnome Shell's compositing (this is the\n  default for full-screen applications in Gnome Shell unless changed\n  by another extension).\n\n- _Brightness enforced in full-screen_: The brightness overlay stays\n  active when an application enters full-screen mode.  This also\n  prevents the app from unredirecting its window (its surface will be\n  composited with Gnome Shell, and as a side-effect, will be subjected\n  to vertical refresh synchronization, ensuring tear-free rendering).\n  This is the default.\n\n- _Brightness enforced in full-screen, always tear-free_: Works like\n  _Brightness enforced in full-screen_, but will still prevent\n  full-screen applications from unredirecting their windows even if no\n  brightness overlay is active (brightness is 100%).  Applications\n  will then always be rendered\n  [tear-free](https://en.wikipedia.org/wiki/Screen_tearing), whatever\n  the brightness may be. In this mode, Soft Brightness can be used as\n  a replacement for extensions like _Fix Fullscreen Tearing_.\n\n#### _Minimum brightness_\n\nSets the minimum allowable brightness for the display where _0_ is\ncompletely dark and _1_ completely bright. Defaults to _0.1_ (10%).\n\nThe minimum brightness will also be enforced for the panel back-light\nif _Use backlight control_ is on.\n\nWhen the brightness is set to 0%, the display will go completely dark,\nit may be hard to reset the brightness with the slider then.\n\n#### _Mouse cursor brightness control_\n\nToggles between having the mouse cursor brightness follow the screen\nbrightness (on/_true_) and keeping the mouse cursor at full brightness\n(off/_false_).\n\nGnome Shell's handling of cursor tracking can be sometimes buggy and\ncan show the wrong cursor type or size when the mouse cursor\nbrightness follows the screen brightness.  It also introduces some\npointer motion lag.\n\nNote that if an other Gnome Shell component enables mouse tracking\n(for example the Zoom accessibility option), then the mouse cursor\nbrightness will always follow the screen's.\n\n#### _Debug_\n\nWhen toggled on, Soft Brightness will log extra debugging information\nto the system journal (or syslog).\n\nThis will be useful if you encounter a bug:  In that case, please turn\n_Debug_ on, and try to reproduce the issue with that setting before\ncapturing the debug logging.\n\nSoft Brightness's debug messages can be watched with:\n\n```\njournalctl -f | grep 'gnome-shell.*Soft-Brightness'\n```\n\n### Effect on power consumption\n\nSoft Brightness will cause extra load on the hardware and therefore\nslightly increase power usage, as it needs to add extra alpha layers\nand track the mouse among other things.  This is true of any Gnome\nShell extension.\n\nIf Soft Brightness controls an LCD panel, changing the brightness will\nnot change at all the panel's power consumption.  Use the back-light\ninstead:  Changing the back-light brightness will affect power\nconsumption, the lower the brightness, the lower the power usage.\n\nIf Soft Brightness controls an OLED panel, changing the brightness\nwill affect power consumption, the lower the brightness, the lower the\npower usage.\n\n### Common use cases and usage scenarios\n\n#### You have a desktop computer\n\nSoft Brightness can be used to control the brightness of all your\nattached monitors:\n\n- Set _Use backlight control_ to _Off_.\n\n- Set _Monitor(s)_ to _All_.\n\n#### You have a laptop computer with a back-light\n\nYou can leave the control of your attached display to the back-light\nand use Soft Brightness to control the brightness of external\ndisplays:\n\n- Set _Use backlight control_ to _On_.\n\n- Set _Monitor(s)_ to _External_.\n\n- Configure _Built-in monitor_ to your built-in panel's name.\n\n#### You have a laptop computer without a back-light\n\nFor example an OLED panel or non-functional back-light.  Have\nSoft-Brightness control the brightness for all your monitors:\n\n- Set _Use backlight control_ to _On_.\n\n- Set _Monitor(s)_ to _All_.\n\n## License\n\nSoft Brightness is free software: you can redistribute it and/or\nmodify it under the terms of the GNU General Public License as\npublished by the Free Software Foundation, either version 3 of the\nLicense, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\nGeneral Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see [http://www.gnu.org/licenses/].\n\n## Download / Install\n\nInstall directly from the [Gnome Shell Extensions\nsite](https://extensions.gnome.org/extension/1625/soft-brightness/).\n\nOr download the [zip\nfile](https://github.com/F-i-f/soft-brightness/releases/download/v30/soft-brightness@fifi.org.v30.shell-extension.zip)\nfrom the GitHub [releases\npage](https://github.com/F-i-f/soft-brightness/releases) and run:\n\n``` shell\ngnome-extensions install soft-brightness@fifi.org.v30.shell-extension.zip\n```\n\n## Building from source\n\n### Requirements\n\n- [meson](http://mesonbuild.com/) v0.50.0 or later.\n\n### Running the build\n\n- Check out: `git clone https://github.com/F-i-f/soft-brightness`\n\n- `cd soft-brightness`\n\n- Run meson: `meson build`\n\n- To install in your your gnome shell extensions' directory (~/.local/share/gnome-shell/extensions), run ninja: `ninja -C build install`\n\n- To build the extension zip files, run: `ninja -C build extension.zip`, the extension will be found under `build/extension.zip`.\n\n## Changelog\n\n### Version 30\n#### May 20, 2022\n\n- Support Gnome Shell 42.\n- Drop compatibility with Gnome Shell 3.32. The earliest supported\n  version is now 3.33.90.\n- Fix version detection code to handle non-numeric versions\n  (eg. 42.beta).\n- Fix error at startup (\"TypeError: this._overlays is null\").\n- Meson-gse update: Support js91, meson 0.61.\n- Cleanups.\n\n### Version 29\n#### December 22, 2021\n\n- Fixed long standing issue with _Mouse cursor brightness control_ not\n  working on Gnome 40 and later.\n- Declare compatibility with version 40 and 41 of Gnome Shell instead\n  of using minor versions (40.0 and 41.1).  This should clear reports\n  of the extension being incompatible with well-supported versions.\n- Drop compatibility with Gnome Shell 3.28 and 3.30 (which do not have\n  getSettings/initTranslations in ExtensionUtils).\n- Update meson-gse:\n  - Fix build issues with meson 0.60.0.\n  - Bump minimum meson version to 0.50.0.\n- Clean up code:\n  - Remove Lang imports.\n  - Use ExtensionUtils for getSettings/initTranslations instead of\n\tusing meson-gse's convenience.js.\n  - Drop old Gnome Shell 3.28 compatibility code.\n\n### Version 28\n#### December 18, 2021\n\n- Gnome Shell 41 compatibility.\n- Update meson-gse to latest:\n  - Bug fix for preferences logging.\n- Add Dutch translation (courtesy of @Vistaus).\n\n### Version 27\n#### March 25, 2021\n\n- Gnome-shell 40.0 compatibility.\n- Update preferences for Gnome-shell 40.0.\n- Disable mouse cloning on Gnome-shell 40 and later.\n- Update meson-gse to latest:\n  - Now prints the GJS version in the system log at start-up (if debug\n\tis enabled).\n  - Support more mozjs version (78, 68, 52) for build-time syntax\n\tchecks (`ninja test`).\n\n### Version 26\n#### November 12, 2020\n\n- Fix mouse cursor offset bug on GS 3.38.\n\n### Version 25\n#### October 30, 2020\n\n- Added Persian translation.\n\n### Version 23, 24\n#### October 29, 2020\n\n- Added Turkish translation.\n\n### Version 22\n#### October 28, 2020\n\n- GS 3.38 compatibility: CursorSprite.set_anchor_point has been removed.\n\n### Version 21\n#### October 8, 2020\n\n- Only disable mouse tracking on Gnome-Shell 3.38 when gjs 1.65 up to\n  1.66.0 inclusive are detected.\n- Report gjs version in log.\n\n### Version 20\n#### October 6, 2020\n\n- Kludgy work-around a Gnome-Shell bug where mouse tracking doesn't\n  generate events by delaying the mouse tracking initialization after\n  the extension has loaded.\n- Disable mouse tracking on Gnome-Shell 3.38 until [Gnome-Shell Issue\n  #3237](https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3237) is\n  fixed.\n- Support Gnome-Shell 3.38.\n\n### Version 19\n#### April 24, 2020\n\n- Add a preference for toggling mouse cloning.\n- Fix typos.\n- Update French translation.\n\n### Version 18\n#### March 12, 2020\n\n- Fix Gnome-shell 3.34 cursor tracking broken on Wayland\n- Enhance cursor tracking performance regression on GS \u003e= 3.34\n  introduced in version 16.\n\n### Version 17\n#### March 11, 2020\n\n- Gnome-shell 3.36 compatibility.\n- Fix deprecation warning in preferences.\n- Update meson-gse to latest.\n\n### Version 16\n#### March 10, 2020\n\n- Re-enable mouse cloning on Wayland GS \u003e= 3.34.1 (work-around only\n  active for 3.33.90 \u003c GS \u003c 3.34.1).\n- Added Czech translation (thanks to p-bo on GitHub).\n- Fix annoying bug on GS 3.34 where the brightness slider will creep\n  back to 100% whenever changed to something lower (only when using\n  backlight control).\n\n### Version 15\n#### October 27, 2019\n\n- Now compatible with GS 3.34 and GS 3.35.1.\n- Do not clone mouse on GS \u003e 3.33.90 when running under Wayland\n  (work-around [Mutter issue\n  #826](https://gitlab.gnome.org/GNOME/mutter/issues/826)).\n- Minor code clean-ups.\n- Show GS version and session type (Wayland/X11) at start-up when\n  debugging.\n\n### Version 14\n#### August 21, 2019\n\nFixed broken version 13 update.\n- Fix slider not up-to-date at start on GS 3.33.90.\n- Fix broken GS 3.32 compatibility code.\n\n### Version 13\n#### August 19, 2019\n\n- _Note that this version is broken._  Please use versions 12 (on\n  Gnome-Shell 3.32 and lower), or version 14 (all Shell versions).\n- Gnome-shell 3.33 compatibility.\n\n### Version 12\n#### April 23, 2019\n\n- Fix Drag-n-Drop (eg. in Overview).\n\n### Version 11\n#### April 23, 2019\n\n- Fix bug where the cursor sprite changes were not tracked correctly\n  on Gnome Shell 3.28.\n- Fix regression crash by infinite recursion when attempting to \"Use\n  backlight\" without a hardware backlight.  If that happens, the\n  extension will use its internal setting for the brightness value.\n\n### Version 10\n#### April 23, 2019\n\n- Fix extension errors on Gnome Shell 3.32.\n- Fix cursor disappearing when external monitors are plugged in or the\n  _Monitor(s)_ preference setting is changed.\n- Fix flickering on Gnome Shell 3.32 when mouse hovers non-overlaid\n  display sections but overlays are active on other monitors.\n- Fix mouse still being tracked unnecessarily when the overlays should\n  activate but don't because the monitors they would apply to are not\n  connected.\n- Gnome Shell 3.28 compatibility.\n- Expand documentation.\n\n### Version 9\n#### April 20, 2019\n\n- The mouse pointer is now affected by the brightness.\n- Better \u0026 simpler Magnifier handling.\n- Fix bugs.\n- Improved code maintainability.\n\n### Version 8\n#### April 16, 2019\n\n- Remove the overlay during screenshots: they are now unaffected by\n  the brightness setting.\n- Keep the brightness setting when the magnifier (aka. Universal\n  Access Magnifier/Zoom) is on.\n- Fix bugs.\n\n### Version 7\n#### March 30, 2019\n\n- Fix warning in logger.js that was introduced in version 6.\n\n### Version 6\n#### March 26, 2019\n\n- ES6 / Gnome-Shell 3.32 compatibility (still compatible with 3.30 and lower).\n- Updated meson-gse to latest.\n- Minor doc updates.\n\n### Version 5\n#### March 24, 2019\n\n- Updated meson-gse to latest.\n- Fix extension error on disable.\n- Fix extension error on enable-disable-enable.\n- Minor non-user visible, internal changes to preferences dialog.\n- Minor doc updates.\n\n### Version 4\n#### February 11, 2019\n\n- README.md: Meson 0.44.0 or later is required.\n- README.md: Add credits.\n- Drop duplicate shipped file in lib/convenience.js.\n- Add GPLv3 in LICENSE.\n- Use meson-gse for building: custom scripts moved there.\n- Fix french translations not showing up.\n- Beautify preferences dialog.\n- Fix a few strings for consistency.\n- Fix wrong gettext-domain in schema file.\n- Remove all global variables from extension.\n\n### Version 3\n#### February 6, 2019\n\n- Moved to git.\n- Use meson for builds, restructure source tree.\n- Added internationalization, and french translation.\n- Added LICENSE and README.md files.\n- Show git revision in debug logging.\n- Brightness overlays now mask the entire desktop, including transients.\n- Brightness overlays don't prevent DND actions in the overview anymore.\n- Fix a couple of typos.\n\n### Version 2\n#### February 5, 2019\n\n- The extension now removes the standard brightness control and puts its own in place (as opposed to trying to monkey patch the existing control).\n\n- Handle external/built-in monitor.\n\n- Control what happens in full-screen.\n\n#### Notes\n\nThe git release shows as 3 in the source code, but the extension (as built by the [Gnome Shell Extensions website](https://extensions.gnome.org/)) shows the release at 2.\nLet's call it release 2 then.\n\n### Version 1\n#### February 2, 2019\n\nFirst public release.\n\n## Credits\n\n- The [`meson-gse` credits](https://github.com/F-i-f/meson-gse/) are\n  included here by reference.\n\n\u003c!--  LocalWords:  OLED VSync extensions' Changelog README md GPLv3 X11\n --\u003e\n\u003c!--  LocalWords:  gse gettext DND js ES6 backlight applications' syslog\n --\u003e\n\u003c!--  LocalWords:  unredirect compositing unredirecting composited eg\n --\u003e\n\u003c!--  LocalWords:  fullscreen merchantability Wayland Xorg gdm Gitlab\n --\u003e\n\u003c!--  LocalWords:  bo kludgy gjs CursorSprite mozjs Vistaus gse's\n --\u003e\n\u003c!--  LocalWords:  getSettings initTranslations ExtensionUtils\n --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FF-i-f%2Fsoft-brightness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FF-i-f%2Fsoft-brightness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FF-i-f%2Fsoft-brightness/lists"}