Customise Your Mac: 'defaults' as a way of achieving anything but
Depending upon your level of experience with your Mac, you might have delved into the depths of the command line before. You might have even wandered around in it a little, or followed a guide that told you how to achieve a specific goal, which you might not have been able to do with the graphical user interface (GUI). Regardless of you level of experience, there are a bunch of one line commands that you can drop into Terminal in order to change your computer in ways you could only dream of achieving otherwise. Today, I’ll run through some of those that I think are most appealing. Simply copy and paste the commands into the terminal, and hit enter.
Note: In the interests of saving space/being less repetitive, I have developed a system which will tell you how to make the changes take effect. A (K) means that, after your hard work, you’ll need to run the command
killall Dock
while a (L) means you’ll need to log out and back in again to see your changes. (R) requires that you restart your computer.
User Level: Curmudgeon
There are some users of OS X out there who bemoan, or begrudgingly accept, the changes thrust upon them by Apple. Fellow grumblers: rejoice! I can’t take you back to the glorious days of OS 6, but I can at least try and slow for you what might feel like a rapidly decreasing appreciation of the desktop OS.
Disable Mission Control and Spaces (K)
defaults write com.apple.dock mcx-expose-disabled -bool TRUE
To restore the default settings,
defaults delete com.apple.dock mcx-expose-disabled
Disable Dashboard (K)
defaults write com.apple.dashboard mcx-disabled -boolean true
To restore the default settings, run the command again, this time changing ‘true’ to ‘false’. Simple!
Disable the System-wide ‘Resume’ Feature (L)
defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool false
To restore the default settings, change ‘false’ to ‘true’, and run the command again.
Disable Closing Applications When All Windows Are Closed (L)
defaults write -g NSDisableAutomaticTermination -bool true
To restore the default settings, change ‘true’ to ‘false’.
Re-enable Key Repeats (L)
This is my personal favourite. Whilst this feature is perhaps handy for those who dabble in a spot of française, it can often be more satisfying to be able to type more mechanically.
defaults write -g ApplePressAndHoldEnabled -bool false
As always, change ‘false’ to ‘true’ to reverse the effect.
Making Do
Not everybody can have the latest and greatest, and often being resourceful can feel much more fulfilling than rushing out to buy something which is, in all likelihood, unnecessary. These commands won’t give you computer an extra processor, but will give it an extra lease of life.
Set a Size Limit For Time Machine (R)
This will stop Time Machine from taking up all of the space on your external hard drive. I always tell people that it is advisable to have an external capacity of at least 1.5 times the amount of stuff you want to have backed up on Time Machine, so keep that in mind when choosing a hard drive. You don’t want to run out space too suddenly! For this one, you’ll have to do some maths. If the maximum size of all of your backups is to be 500GB – keeping in mind that $latex 500 \cdot 1024 = 512000&s=1$ – you’ll want to enter
defaults write /Library/Preferences/com.apple.TimeMachine MaxSize 512000
To remove this, enter
defaults delete com.apple.TimeMachine DoNotOfferNewDisksForBackup
Save to Your Local Machine by Default (L)
Not everyone has a fast internet connection, or even has copious amounts of storage left on their iCloud account. This command makes your local hard drive the default location for saving all of your files.
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
As always, change ‘false’ to ‘true’ to reverse this action.
Don’t Bog Down Your Mac with Unnecessary Graphic Flair (L)
Smooth scrolling taxes your computer when it could be doing better things, like rendering your web pages, or compiling your latest and greatest programme. This command disables smooth scrolling.
defaults write -g NSScrollAnimationEnabled -bool false
You can revert back by changes ‘false’ to ‘true’.
Further Reading
This is only a drop in the ocean of possibilities. With time, people are discovering more and more possibilities. Third party applications might also have their own properties which can be toggled. If you’d like to read more, I recommend the following: