kennylevinsen/wldash

More than one backlight is not supported

Closed this issue · 2 comments

This is possible e.g. when using the ddcci module to control brightness on external screens.

2ba19f9 adds support for specifying a backlight device.

This allows you to configure your widgets something along the lines of:

- margin:
  margins: [0, 0, 0, 8]
    widget:
      backlight:
        device: "intel_backlight"
        font_size: 24.0
        length: 600
- margin:
  margins: [0, 0, 0, 8]
    widget:
      backlight:
        device: "ddcci4"
        font_size: 24.0
        length: 600
- margin:
  margins: [0, 0, 0, 8]
    widget:
      backlight:
        device: "ddcci5"
        font_size: 24.0
        length: 600

If a backlight device isn't present, that part of the widget tree collapses, so just add all possible devices.

(Making it automatic would require duplicating layout code and configuration into the backlight widget, which felt gross. It'll require a little bit of layout rework to fix.)

cool thanks!