The code for xrandr is quite messy and I can't quite understand, it also severely lacks documentation. What's the best/cleanest interface to be able to control brightness through libxrandr?
edit: to clarify I want to use the api not the cli command
The code for xrandr is quite messy and I can't quite understand, it also severely lacks documentation. What's the best/cleanest interface to be able to control brightness through libxrandr?
edit: to clarify I want to use the api not the cli command
$ xrandr | grep " connected" | cut -f1 -d " "
to get the name of the monitor
then
$ xrandr --output <name-from-previous> --brightness <desired-brightness>
<desired-brightness> must be between 0 and 1
References: http://sandipbgt.com/2015/10/01/control-screen-brightness-from-commandline-in-ubuntu/