Skip to content

Brightness step goes beyond minimum values #959

Description

@MindfulMinun

May be related to #870

The brightness step seems to be hard-coded to 5% and ignores the minimum value. Previously, I was using light to set the brightness with an exponential curve by multiplying the brightness (light -T .75, light -T 1.3333) I've since switched to ashell msg brightness-up / brightness-down. This had the unintended effect of setting the brightness beyond my minimum value of 1 light -N 1. I've confirmed the volume component does not have this same issue, it's bounded between 0 and 100%.

To reproduce:

  1. Set your brightness to 5%
  2. Set your minimum brightness to anything between 0 and 5, such as light -N 1
  3. Run ashell msg brightness-down. The brightness will be set to 0 and the screen won't be backlit.

I have two proposals, to add a new configuration option to define the minimum brightness, such as:

brightness_min = 1 # or 5

However I don't think this is best as it violates single-responsibility principle and leaves ashell closed for extension. Better still would be a custom OSD component with options to specify a shell command, similar to how the power button accepts custom shell commands and settings is open for custom buttons. I believe this would be best way to address this even if it would require more work, but this would address #870. Display brightness and volume controls are outside of ashell's responsibility.

[[osd.CustomSlider]]
name = "Brightness"
icon = "☀ "
step_up = "light -T 1.333"
step_down = "light -T .75"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions