DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Massimiliano has posted 1 posts at DZone. View Full User Profile

Dock 2D/3D

08.29.2008
| 3490 views |
  • submit to reddit
        // Switch Dock 2D / 3D

#!/bin/sh
CURRENT=`defaults read com.apple.dock no-glass`
case $CURRENT in
    0)
        OPTION='YES'
        ;;
    1) 
        OPTION='NO'
        ;;
    *)
        OPTION='YES'
        ;;
esac

defaults write com.apple.dock no-glass -boolean $OPTION
killall Dock
echo "Restarting dock..."