Skip to content

Instantly share code, notes, and snippets.

@kissgyorgy
Last active June 1, 2017 05:56
Show Gist options
  • Save kissgyorgy/6464603 to your computer and use it in GitHub Desktop.
Save kissgyorgy/6464603 to your computer and use it in GitHub Desktop.
Change OS X defaults
# prevent the creation of .DS_Store files on network drives
# http://hints.macworld.com/article.php?story=2005070300463515
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
#---------------------------------------------------------------------
# Disable/enable Dashboard:
# http://hints.macworld.com/article.php?story=20050723123302403
defaults write com.apple.dashboard mcx-disabled -boolean YES
defaults write com.apple.dashboard mcx-disabled -boolean NO
#restart dock after it
killall Dock
#---------------------------------------------------------------------
# Make ForkLift default file viewer
defaults write -g NSFileViewer -string com.binarynights.ForkLift2
# change back
defaults delete -g NSFileViewer
#---------------------------------------------------------------------
# Show hidden files in Finder, Mac OS X 10.7 and 10.8
# http://www.mikesel.info/show-hidden-files-mac-os-x-10-7-lion/
defaults write com.apple.Finder AppleShowAllFiles YES
defaults write com.apple.Finder AppleShowAllFiles NO
# OS X 10.9
defaults write com.apple.finder AppleShowAllFiles -boolean true
defaults write com.apple.finder AppleShowAllFiles -boolean false
# for open/save dialogs
defaults write -g AppleShowAllFiles -bool true
defaults write -g AppleShowAllFiles -bool false
#---------------------------------------------------------------------
# Set repeating keys in Lion
# In Lion, holding down a key won't repeat it, but will instead show
# a popup menu to select between character variations. This doesn't work
# well with command mode, so you may want to disable it.
# This can be done via entering this at the terminal:
defaults write com.sublimetext.2 ApplePressAndHoldEnabled -bool false
#---------------------------------------------------------------------
# Hide all icons from Desktop
# http://osxdaily.com/2009/09/23/hide-all-desktop-icons-in-mac-os-x/
defaults write com.apple.finder CreateDesktop -bool false
killall Finder
# Show them again
defaults write com.apple.finder CreateDesktop -bool true
killall Finder
#---------------------------------------------------------------------
# Add Stack View Of Recently Run Apps To Dock
defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }'
killall Dock
#---------------------------------------------------------------------
# http://lifehacker.com/the-best-hidden-settings-you-can-unlock-with-os-xs-ter-1476627111
# You can move the Dock to any corner you want with this Terminal command:
# options: end, start, middle
defaults write com.apple.dock pinning -string end
killall Dock
#---------------------------------------------------------------------
# Dashboard widgets on desktop:
defaults write com.apple.dashboard devmode YES
# Now, log out and log back in.
# Open up your Dashboard, grab the widget you want by clicking and holding it with your mouse,
# and hit F12 to drop it onto your desktop.
#---------------------------------------------------------------------
# Enable 2D Dock
defaults write com.apple.dock no-glass -bool true
#---------------------------------------------------------------------
# Enable single application mode
# This makes only have one app showing at once.
defaults write com.apple.dock single-app -bool true
killall Dock
#---------------------------------------------------------------------
# Copy Text from Quick Look
defaults write com.apple.finder QLEnableTextSelection -bool true
killall Finder
#---------------------------------------------------------------------
# Want to get a little notification of the currently playing track in iTunes right from the app's icon?
defaults write com.apple.dock itunes-notifications -bool TRUE
killall Dock
# Disable:
defaults delete com.apple.dock itunes-notifications
#---------------------------------------------------------------------
# Enable the debug menu in Address Book:
defaults write com.apple.addressbook ABShowDebugMenu -bool true
#---------------------------------------------------------------------
# Enable the debug menu in iCal (Doesn't work in Mavericks):
defaults write com.apple.iCal IncludeDebugMenu -bool true
#---------------------------------------------------------------------
# Enable the debug menu in Disk Utility:
defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true
defaults write com.apple.DiskUtility advanced-image-options -bool true
#---------------------------------------------------------------------
# Disable the Startup Chime
sudo nvram SystemAudioVolume=%80
#---------------------------------------------------------------------
# Change dock appearing animation delay:
defaults write com.apple.Dock autohide-delay -float 0
killall Dock
# To restore defaults:
defaults delete com.apple.dock autohide-delay; killall Dock;
#---------------------------------------------------------------------
# Stop Preview from Auto-Restoring What You Left Open:
defaults write com.apple.Preview NSQuitAlwaysKeepsWindows -bool false
# Quicktime:
defaults write com.apple.QuickTimePlayerX NSQuitAlwaysKeepsWindows -bool false
#---------------------------------------------------------------------
# Disable Window Animations:
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
#---------------------------------------------------------------------
# Disable Notification Center
launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist killall NotificationCenter
# Notification Center will close down and disappear until you reboot.
#---------------------------------------------------------------------
# Prevent from Sleeping
caffeinate -t 3600
#---------------------------------------------------------------------
# Stop the Help Viewer from Floating Over Other Windows
defaults write com.apple.helpviewer DevMode -bool true
#---------------------------------------------------------------------
# Unhide Library folder
chflags nohidden ~/Library/
#---------------------------------------------------------------------
# Enable key repeat in Apple Lion for Sublime Text
# from: https://gist.github.com/kconragan/2510186
defaults write com.sublimetext.3 ApplePressAndHoldEnabled -bool false
# globally:
defaults write -g ApplePressAndHoldEnabled -bool false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment