Skip to content

Instantly share code, notes, and snippets.

@bg5sbk
Created April 4, 2014 13:43
Show Gist options
  • Save bg5sbk/9974976 to your computer and use it in GitHub Desktop.
Save bg5sbk/9974976 to your computer and use it in GitHub Desktop.
Disable or enable dashboard on Mac OS
#!/bin/sh
if [ ! $# -eq 1 ]; then
echo "How To Use:" >&2
echo " ./dashboard.sh [enable|disable]" >&2
exit
fi
if [ $1 == 'enable' ]; then
X='No'
elif [ $1 == 'disable' ]; then
X='Yes'
else
echo "How To Use:" >&2
echo " ./dashboard.sh [enable|disable]" >&2
exit
fi
defaults write com.apple.dashboard mcx-disabled -bool $X
killall Dock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment