Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

backlight module device option not working as expected

Open Aimmig opened this issue 1 year ago • 2 comments

I'd like to control and display my screen brightness as well as keyboard backlight. So I configured two instances of the backlight module with device option according to my brightnessctl output, which lists intel_backlight and white:kbd_backlight. Both can be set/read with brightnessctl. So the relevant part of my config file is

"backlight": {
    "device": "intel_backlight",
"format": "{percent}% {icon}",
    "format-icons": ["", ""],
    "on-scroll-up":   "brightnessctl s 1%+",
    "on-scroll-down": "brightnessctl s 1%-",
    "on-click-right": "brightnessctl s 0"
},
"backlight#2": {
"device": "white:kbd_backlight",
"format": "{percent}% {icon}",
    "format-icons": [""],
    "on-scroll-up":   "brightnessctl s 1+",
    "on-scroll-down": "brightnessctl s 1-",
    "on-click-right": "brightnessctl s 0"
},

First module works fine, but the second module for the keyboard backlight seems to ignore the device option and shows the same output for percent and applies the command to intel_backlight. Interestingly, if only the first module with white:kbd_backlight device (instead of intel_backlight) option is used, still all commands are applied to intel_backlight. I suspect that - for some reason - it falls back to intel_backlight, which is the default, when not specifing device option.

Aimmig avatar Jan 20 '24 16:01 Aimmig

I am not familiar with brightnessctl, what happens is you specify the device in the command line (see docs)?

apiraino avatar Mar 29 '24 19:03 apiraino

I tried to put brightnessctl s +1 --device white:kbd_backlight (which works as expected when run on command line) as command for on-scroll-up. While that works for changing the brightness of the keyboard backlight, the queried value for displaying in the format section is still wrong in that case.

Aimmig avatar Apr 02 '24 12:04 Aimmig