jacob-pro / solar-screen-brightness

Automatically adjust monitor / screen brightness at night using sunrise/sunset times
GNU Lesser General Public License v3.0
54 stars 4 forks source link

Allow configuring brightness settings per display #21

Closed xPaw closed 5 months ago

xPaw commented 2 years ago

This is a simple and effective app!

I have two different displays, and as a result they require different brightness settings.

I think starting simple should be enough (get devices and display brightness setting for each of them, and store them in config by their device id). Might need to take care of being able to disable per device (or at least support the case when low/high brightness is the same value).

Per monitor/device brightness settings is mentioned under planned features, just making an issue to provide a use case.

mruac commented 1 year ago

+1 for this, or being able to set minimum brightness per monitor when adjusting for sunset/sunrise brightnesses so that the brightness can stay consistent during the times its not adjusting.

cristipopescu1 commented 7 months ago

+1 , perhaps the option to turn the app off for specific displays might also be handy

alihassantahir commented 7 months ago

+1 , perhaps the option to turn the app off for specific displays might also be handy

How about you disable DDC for that monitor? The SSB will not work for that monitor then.

jacob-pro commented 6 months ago

There is now support for this in the latest release, although you will need to configure it manually.

You will need to edit the config file: %LOCALAPPDATA\solar-screen-brightness\config.json

You can set monitor overrides like this:

{
  "brightness_day": 80,
  "brightness_night": 60,
  "transition_mins": 40,
  "location": {
    "latitude": 51.50745,
    "longitude": -0.12777
  },
  "overrides": [
    {
      "pattern": "CH89_C34H89xWJ (DP)",
      "key": "device_description",
      "brightness": {
        "brightness_day": 100,
        "brightness_night": 70
      }
    }
  ]
}

You can also disable brightness for that device:

    {
      "pattern": "CH89_C34H89xWJ (DP)",
      "key": "device_description",
      "brightness": null
    }

The keys and patterns can be found by calling: ssb-cli.exe --once

{
  "monitors": [
    {
      "device_name": "\\\\.\\DISPLAY1\\Monitor0",
      "properties": {
        "device_description": "CH89_C34H89xWJ (DP)",
        "device_key": "\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Class\\{4d36e96e-e325-11ce-bfc1-08002be10318}\\0006",
        "device_name": "\\\\.\\DISPLAY1\\Monitor0",
        "device_path": "\\\\?\\DISPLAY#SAM0E25#5&40a2469&0&UID4354#{e6f07b5f-ee97-4a90-b076-33f57bf4eaa7}"
      },
      "brightness": null,
      "error": null
    },

key can be any of the listed device properties

pattern is a match against the value for that key, it can include * to indicate a wildcard match.

I will be working on a GUI for this soon to make it more friendly.

Please let me know if this is suitable for you?

xPaw commented 6 months ago

Sounds reasonable.

jacob-pro commented 5 months ago

This is now available in the 2.1.0 release: https://github.com/jacob-pro/solar-screen-brightness/releases/tag/2.1.0

image