Disable dashboard in Mac OS X

I find the dashboard in Mac OS X pretty pointless. Luckily, there is an easy way to remove it (thanks to this post).

Note that I’ve tested this in 10.8 Mountain Lion.

Disable

defaults write com.apple.dashboard mcx-disabled -boolean YES 
killall Dock

Enable

defaults write com.apple.dashboard mcx-disabled -boolean NO
killall Dock