Switch internal monitor off by software (script/terminal/shortcut/…)
Solution 1:
If it wasn't clear from the comments, the behavior of clamshell mode changed in 10.7:
- If a laptop is connected to an external display, closing the lid doesn't put the laptop to sleep.
- If you open the lid after that, the internal display is turned back on.
sudo nvram boot-args=iog=0x0
restores the behavior in 10.6 and earlier.
If others were looking for a way to trigger normal display sleep (like when pressing ⌃⇧⏏), you can use SleepDisplay.
Solution 2:
To disable the internal screen for OS X Lion based laptops, launch the Terminal and enter the following command:
sudo nvram boot-args="iog=0x0"
You’ll need to reboot for changes to take effect, and the internal display will then be completely disabled regardless of whether the Mac is open or closed.
To undo this, you can go back to the Terminal and enter:
sudo nvram -d boot-args
Then reboot again, or you can just zap PRAM by holding down Command+Option+P+R during reboot, which clears out the boot-args as well. If you were to disconnect the MacBook Pro from an external video source, zapping the PRAM would be how you’d want to reenable the internal display.
This is the opposite of “clamshell mode” – where the Mac laptop is closed and the screen is still turned on. Clamshell can look nice, but without adequate air flow the Mac may overheat, thus running the computer with the display open is recommended. If you’re going to do this, be sure to set the primary display so that the menubar, Dock, and alert windows go to the proper screen.
Source: OSXDaily
Solution 3:
If I understand it correctly, you want to only be using your external display and have the internal display to be shut off. To achieve this, you want to put your macbook in clamshell mode.
To do this you must have your macbook attached to
a) an external power source
b) an external display
c) external keyboard + mouse.
Then all you do is close the lid (see pic below).
When you want to put your mac to sleep you press opt+cmd+eject, and when you want to turn it on again you press any key on your wireless keyboard, having your macbook closed at all times.
More info can be found here.
Solution 4:
You know, you could just put the laptop into display mirror mode instead.... Just turn the brightness all the way off on the laptop display.