I can use something like
setpci -s 00:02.0 F4.B=XX
replacing 00:02.0 with your device address (obtained via lspci | grep VGA) and XX with a value between 00 and FF (FF = 100%, 7F = 50%, etc...) to manually change my brightness from the terminal (as root, or with proper chmods).
I wish to make a script to manually change my brightness via keystrokes. To do so, I need to get the current state (XX above) in order to relay to the script the current brightness of the screen.
How can I obtain the current state?