How to undo a lot of Lion’s little changes using Terminal

Mac OS X Lion (s aapl) has been out for about a week now, long enough for a lot of us to realize that there might be a couple of essential tweaks we’d really like to make to our new systems. However, if you want to disable some of the new animations, reclaim some lost space in Safari’s bookmarks bar, or try to roll back some of the iOS-ification that has gone on, the options available in those default preference panes just won’t cut it.

Luckily though, the good old ‘defaults write’ command for OS X’s is still around to help us pop open that hood and tweak all the stuff that can’t be configured with just a point and a click. Here’s a quick roundup of a few defaults write commands that might make your early days with the new big cat a bit easier.

A few words about ‘defaults write’

The ‘defaults’ command allows users to interact with their user defaults via the terminal (located in the Applications>Utilities folder). Users can read, write, and delete user preference values that often aren’t available for configuration within an application’s normal preference panel. These commands can all be executed via the Terminal, and reversed by simply repeating the command with the original value swapped in for the replacements below. In most cases you’ll have to restart the application you’re trying to tweak before you can see the command’s effect. If you don’t want to mess around with the terminal, I’m sure many of these commands will soon find their way into an updated version of Secrets, which is a GUI preference pane for configuring this type of behavior.

The roundup

  • Animations. There are a lot of new animations in Lion. New windows will warp into existence from a single point on the screen; email replies will fold their way out of threaded conversations; and desktops will go swishing by as you move from space to space. There’s at least two of these you can put an end to right now if you want:
    • Disable Mail Reply animations: “defaults write DisableReplyAnimations -bool YES”
    • Disable New Window animations: “defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO”
  • Character picker. If you’ve ever been frustrated by hunting around in the character viewer for accented characters like the “è” or the “ë” then you probably want to just leave this setting alone. If however, if you’d rather be able to hold down a key and just have it automatically repeat, like it used to, then this defaults write is for you.
    • Disable the character picker: “defaults write -g ApplePressAndHoldEnabled -bool NO”
  • Window restore. Want to keep applications like Preview or QuickTime from restoring old windows that happened to be hanging around the last time you quit? Just switch out the name “Preview” in the command below to target other applications.
    • Disable window restore: “defaults write NSQuitAlwaysKeepsWindows -bool NO”
  • Bookmarks bar. You can get rid of both the Reading List icon and the Top Sites icon with this quick defaults write command:
    • Clean out icons from Safari’s bookmarks bar: “defaults write ProxiesInBookmarksBar ‘()’”
  • Save sheet shortcuts. Lion changes around the default save sheet shortcuts for a little added safety. If you’ve got a lot of muscle memory devoted to “Command-D” as the shortcut for “Don’t Save,” you can bring it back if you want — though to be honest, with “D” and “S” being so close together, I prefer the new settings.
    • Revert save sheet shortcut: “defaults write NSGlobalDomain NSSavePanelStandardDesktopShortcutOnly -bool YES”
  • iOS spell check pop-up. Part of the overall “iOS-ification” effort in Lion was to bring over those helpful but sometimes annoying little spell correction pop-ups you get as you type. The autocorrect can be enabled on a document by document basis with a right-click in “Spelling and Grammar,” but if you just want to kill it off altogether, you can.
    • Disable the iOS-style spell correct: “defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool NO”
  • ~/Library reveal. This last one isn’t technically a defaults command, but it’s too good to leave out. By default in Lion, user libraries are hidden. You can still navigate to the user library by holding down the “option key” while in the Go menu in the Finder, but if you want to restore ~/Library back to it’s proper place, just crack open the terminal and enter in the command below.
    • Restore ~/Library visibility: “chflags nohidden ~/Library”

I’m sure more hidden commands will surface as folks begin to settle into the new OS. I grabbed as many as I could find floating around, but if you’ve got some additional ones you’d like to share, please do so in the comments.