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:
- Set your brightness to 5%
- Set your minimum brightness to anything between 0 and 5, such as
light -N 1
- 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"
May be related to #870
The brightness step seems to be hard-coded to 5% and ignores the minimum value. Previously, I was using
lightto set the brightness with an exponential curve by multiplying the brightness (light -T .75,light -T 1.3333) I've since switched toashell msg brightness-up / brightness-down. This had the unintended effect of setting the brightness beyond my minimum value of 1light -N 1. I've confirmed the volume component does not have this same issue, it's bounded between 0 and 100%.To reproduce:
light -N 1ashell 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:
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.