Is it possible to dim the screen from Terminal, in a Mac with OS X Lion? Is there any command to do control brightness and volume?
You can do it via an Applescript and run it as such:
You can save these as .script files and then run them from the CLI like this:
You can also do it this way, but that requires more setup.
You can install this command line tool from github.com/nriley/brightness. The install is pretty easy if you have homebrew:
And usage is straightforward:
Unfortunately it doesn't work for external monitors. See Does Apple support DDC/CI for 3rd party displays via Apple's Thunderbolt to DVI adapter for background on why.
I've created a node module for this that supports setting the brightness using the CLI. See https://github.com/kevva/brightness-cli.
And then simply just run