Skip to content

Instantly share code, notes, and snippets.

@ggamel
Created June 9, 2023 22:33
Show Gist options
  • Save ggamel/121fb4045bb47f7a938a97ac21803679 to your computer and use it in GitHub Desktop.
Save ggamel/121fb4045bb47f7a938a97ac21803679 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Set the computer name
sudo scutil --set ComputerName "COMPUTERNAME"
# Set the host name
sudo scutil --set HostName "COMPUTERNAME"
# Set the local host name
sudo scutil --set LocalHostName "COMPUTERNAME"
# Set NetBIOS name for Windows file sharing
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "COMPUTERNAME"
# Set Apple Font Smoothing
defaults -currentHost write -g AppleFontSmoothing -int 0
# Disable the focus ring animation
defaults write NSGlobalDomain NSUseAnimatedFocusRing -bool false
# Expand the print panel by default
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true
# Expand the save panel by default
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true
defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true
# Do not save new documents to iCloud by default
defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
# Automatically quit the print app once printing is completed
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
# Set the screenshot image format
defaults write com.apple.screencapture type -string "png"
# Disable screenshot window shadow
defaults write com.apple.screencapture disable-shadow -bool true
# Add a Quit menu item to Finder
defaults write com.apple.finder QuitMenuItem -bool true
# Disable Finder animations
defaults write com.apple.finder DisableAllAnimations -bool true
# Show status bar in Finder
defaults write com.apple.finder ShowStatusBar -bool true
# Show path bar in Finder
defaults write com.apple.finder ShowPathbar -bool true
# Set the Finder view style to use list view
defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
# Disable warning when emptying the trash
defaults write com.apple.finder WarnOnEmptyTrash -bool false
# Enable browsing all network interfaces
defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true
# Show user Library folder and remove Finder attributes
chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library
# Show mounted volumes on the Desktop
sudo chflags nohidden /Volumes
# Expand various information panes in Finder's Get Info window
defaults write com.apple.finder FXInfoPanesExpanded -dict General -bool true OpenWith -bool true Privileges -bool true
# Set the size of Dock icons
defaults write com.apple.dock tilesize -int 32
# Disable Dock icon bouncing when launching applications
defaults write com.apple.dock launchanim -bool false
# Remove the auto-hiding Dock delay
defaults write com.apple.dock autohide-delay -float 0
# Remove the animation time when hiding/showing the Dock
defaults write com.apple.dock autohide-time-modifier -float 0
# Enable tabbing between all controls in Safari
defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true
# Disable tabbing between all controls in Safari
defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool false
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool false
# Show the full website address in Safari's search field
defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true
# Enable Safari's internal debug menu
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
# Enable Safari's developer menu
defaults write com.apple.Safari IncludeDevelopMenu -bool true
# Enable Safari's web inspector
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true
# Enable WebKit developer extras for all applications
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
# Set Terminal's default encoding to UTF-8
defaults write com.apple.terminal StringEncodings -array 4
# Disable line marks in Terminal
defaults write com.apple.Terminal ShowLineMarks -int 0
# Prevent Time Machine from prompting to use newly connected volumes as backup volumes
defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
# Open Activity Monitor with the main window by default
defaults write com.apple.ActivityMonitor OpenMainWindow -bool true
# Set the default view in Activity Monitor to CPU
defaults write com.apple.ActivityMonitor ShowCategory -int 0
# Set the default sort column in Activity Monitor to CPU Usage
defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage"
# Set the default sort direction in Activity Monitor to ascending
defaults write com.apple.ActivityMonitor SortDirection -int 0
# Set the default text encoding for TextEdit to UTF-8
defaults write com.apple.TextEdit PlainTextEncoding -int 4
defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4
# Set TextEdit to use plain text mode for new documents
defaults write com.apple.TextEdit RichText -int 0
# Enable Disk Utility's debug menu
defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true
# Enable advanced image options in Disk Utility
defaults write com.apple.DiskUtility advanced-image-options -bool true
# Disable automatic emoji substitution in Messages
defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticEmojiSubstitutionEnablediMessage" -bool false
# Disable smart quotes in Messages
defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false
# Disable continuous spell checking in Messages
defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false
# Expand the print panel by default in Chrome
defaults write com.google.Chrome PMPrintingExpandedStateForPrint2 -bool true
defaults write com.google.Chrome.canary PMPrintingExpandedStateForPrint2 -bool true
# Disable system-wide automatic spelling correction
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# Disable automatic spelling correction in Safari
defaults write com.apple.Safari WebAutomaticSpellingCorrectionEnabled -bool false
# Disable the press-and-hold feature for keys
defaults write -g ApplePressAndHoldEnabled -bool false
# Disable window opening animations
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
# Disable smooth scrolling
defaults write -g NSScrollAnimationEnabled -bool false
# Speed up window resizing
defaults write -g NSWindowResizeTime -float 0.001
# Disable Quick Look animation
defaults write -g QLPanelAnimationDuration -float 0
# Disable rubber band scrolling
defaults write -g NSScrollViewRubberbanding -bool false
# Disable document revisions window animation
defaults write -g NSDocumentRevisionsWindowTransformAnimation -bool false
# Disable toolbar full screen animation duration
defaults write -g NSToolbarFullScreenAnimationDuration -float 0
# Disable browser column animation speed
defaults write -g NSBrowserColumnAnimationSpeedMultiplier -float 0
# Remove the auto-hiding Dock delay
defaults write com.apple.dock autohide-time-modifier -float 0
defaults write com.apple.dock autohide-delay -float 0
# Disable Expose animation
defaults write com.apple.dock expose-animation-duration -float 0
# Disable various spring animations
defaults write com.apple.dock springboard-show-duration -float 0
defaults write com.apple.dock springboard-hide-duration -float 0
defaults write com.apple.dock springboard-page-duration -float 0
# Disable Finder animations
defaults write com.apple.finder DisableAllAnimations -bool true
# Disable send and reply animations in Mail
defaults write com.apple.Mail DisableReplyAnimations -bool true
defaults write com.apple.Mail DisableSendAnimations -bool true
# Set the default action when long pressing the Bluetooth menu item
defaults write com.apple.GameController bluetoothPrefsMenuLongPressAction -integer 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment