Helical Alpha Code

dashtoggle: kill the dashboard!

#!/bin/sh

pref='com.apple.dashboard mcx-disabled'

function evalpref {
    defaults read $pref
    return;
    }

case $(evalpref) in
    1)
        echo "Dashboard On"
        defaults write $pref -boolean NO;;
    0)
        echo "Dashboard Off"
        defaults write $pref -boolean YES;;
    !1 | !0)
        echo "Error: Current value of $pref: $(evalpref)";;
esac

#kill the dock to put the widget call in effect
killall "Dock"

dashtoggle | Download Source | View Source