Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

justn

macrumors member
Original poster
Apr 21, 2010
39
1
SoCen Cal
My end goal is to create a script that will disable and enable the Ambient Light sensor when I plug and unplug my MacBook Pro from power.

To do this I'm pretty sure I need a terminal command to enable and disable automatic dimming as the ambient light changes.
 
I know how to do it in System Preferences, but as I said before I want a command I can use in Terminal to do it.
 
I know how to do it in System Preferences, but as I said before I want a command I can use in Terminal to do it.

Disable it in System Preferences. Then in Terminal, enter:

Code:
defaults read com.apple.bezelservices

Enable it in System Preferences. In Terminal, enter:

Code:
defaults read com.apple.bezelservices

Compare to discover which key is involved. Once you know, you should be able to modify using defaults write

(I'm guessing that com.apple.bezelservices is the place to look.)
 
I know how to do it in System Preferences, but as I said before I want a command I can use in Terminal to do it.

Actually you said,
To do this I'm pretty sure I need a terminal command to enable and disable automatic dimming as the ambient light changes.
which sounds like you wanted a command line way because you didn't know if it could be done via the GUI.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.