Skip to content

Instantly share code, notes, and snippets.

@bliotti
Last active January 14, 2026 03:04
Show Gist options
  • Select an option

  • Save bliotti/cbd1143800062f1f8db1beb08b834b2a to your computer and use it in GitHub Desktop.

Select an option

Save bliotti/cbd1143800062f1f8db1beb08b834b2a to your computer and use it in GitHub Desktop.
A single executable shell script that applies all the macOS performance tweaks
#!/usr/bin/env bash
set -e
echo "Reverting macOS UI/perf tweaks…"
# Remove (revert) UI settings to defaults
defaults delete -g AppleReduceTransparency 2>/dev/null || true
defaults delete -g AppleReduceMotion 2>/dev/null || true
defaults delete -g NSAutomaticWindowAnimationsEnabled 2>/dev/null || true
# Dock defaults
defaults delete com.apple.dock autohide-time-modifier 2>/dev/null || true
defaults delete com.apple.dock autohide-delay 2>/dev/null || true
defaults delete com.apple.dock expose-animation-duration 2>/dev/null || true
# Finder defaults
defaults delete com.apple.finder DisableAllAnimations 2>/dev/null || true
# Resume defaults
defaults delete -g NSQuitAlwaysKeepsWindows 2>/dev/null || true
# Smart text defaults
defaults delete -g NSAutomaticSpellingCorrectionEnabled 2>/dev/null || true
defaults delete -g NSAutomaticQuoteSubstitutionEnabled 2>/dev/null || true
defaults delete -g NSAutomaticDashSubstitutionEnabled 2>/dev/null || true
# Spotlight back on (requires sudo)
echo "Re-enabling Spotlight indexing (requires sudo)…"
sudo mdutil -i on / || true
# Photos analysis resume
defaults write com.apple.photoanalysisd analysis-paused -bool false
killall photoanalysisd photolibraryd 2>/dev/null || true
# Restart affected services
killall Dock 2>/dev/null || true
killall Finder 2>/dev/null || true
echo "Done. Log out/in (or reboot) for all defaults to fully apply."
#!/usr/bin/env bash
set -e
echo "Applying macOS Sonoma Intel performance optimizations…"
# Reduce GPU-heavy UI effects
defaults write -g AppleReduceTransparency -bool true
defaults write -g AppleReduceMotion -bool true
# Disable window animations
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
# Dock responsiveness
defaults write com.apple.dock autohide-time-modifier -float 0
defaults write com.apple.dock autohide-delay -float 0
defaults write com.apple.dock expose-animation-duration -float 0
# Finder responsiveness
defaults write com.apple.finder DisableAllAnimations -bool true
# Disable Resume system-wide
defaults write -g NSQuitAlwaysKeepsWindows -bool false
# Disable smart text features
defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false
defaults write -g NSAutomaticQuoteSubstitutionEnabled -bool false
defaults write -g NSAutomaticDashSubstitutionEnabled -bool false
# Restart affected services
killall Dock 2>/dev/null || true
killall Finder 2>/dev/null || true
# Spotlight indexing off (requires sudo)
if [[ $EUID -ne 0 ]]; then
echo "Disabling Spotlight (requires sudo)…"
sudo mdutil -i off /
sudo mdutil -E /
else
mdutil -i off /
mdutil -E /
fi
# Pause Photos analysis
defaults write com.apple.photoanalysisd analysis-paused -bool true
killall photoanalysisd photolibraryd 2>/dev/null || true
echo "Done. Log out and back in for all changes to take effect."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment