-
Notifications
You must be signed in to change notification settings - Fork 215
Description
Describe the bug
Hyprpanel uses ls -w1 /sys/class/backlight | head -1 to detect screen device and later use it in --device flag for brightnessctl. This code is based on certain assumptions that are not always true. For example, on my Macbook with T2 Linux (NixOS) I see this:
# command
ls -w1 /sys/class/backlight
# result:
# appletb_backlight
# gmux_backlightAnd head -1 returns appletb_backlight.
Because of that when I use slider in Hyprpanel the brightness of TouchBar is changed, instead of the brightness of the screen.
To Reproduce
Have a device with more than one element in /sys/class/backlight.
Expected behavior
To my knowledge there is no way to know (programmatically) which actual screen corresponds to the particular backlight device. So I would expect either: a) have all backlight devices controllable with individual slider (Hyprpanel shouldn't try understand what is what); b) give a config parameter to select which element from /sys/class/backlight should be used to control screen brightness
Desktop (please complete the following information):
- Distribution: NixOS
- Window Manager/Desktop Environment: Hyprland
Additional context
One more thing: it is not that important, but still annoying - I have some background daemon which controls TouchBar (tiny-dfr) and it changes the brightness of the touchbar after a few seconds on inactivity (no interaction with keyboard or touchbar). When it happens, HyprPanel shows OSD notifying me about decreased brightness. When I touch the touchpad/keyboard, tiny-dfr increases brightness of TouchBar again to 100%, which causes another OSD notification. It is just annoying.