The problem I'm having is that it requires sudo. The end goal of this is to set these two shell scripts to run as keyboard shortcuts, so I need to figure out how to set setpci to be able to run without a password with sudo. I know, it's probably insecure, and a kludge, but I don't see any other options at this point.

also, I apologize for necroing this thread, but these are two scripts I've been looking for on the interwebs ever since I switched back to using Linux on a daily basis.

There is a little program called xbacklight. It can get and set the brightness of your screen. If you have a webcam, you can even let it set your brightness automatically by taking a picture, getting the average brightness and setting the screen brightness accordingly.