So I have a XPS 15 with an OLED screen. This means that the brightness controls don't work. I can however control the brightness using
xrandr --output <display> --brightness <value>
And I have managed to put this in a shell script that can be called by hooking up the keyboard keys to that program.
However this is an imperfect solution as the power management controls for screen brightness don't work and the GUI feedback of the brightness is mismatched with the current brightness.
So I want to hook up my script into the call tree when the brightness is changed by the native os functions. How can I hook up my script to the underlying calls for adjustment? I believe it has something to do with ACPI calls but I can't figure out where to hook in my script.