Last active
November 10, 2021 20:17
-
-
Save motoishmz/9d59fe31a70b1028de6b94fcb856923d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Tested on: | |
# macOS Catalina - Version 10.15.2 | |
# | |
# !!!: # Reboot after running this script, or uncomment the last line | |
# | |
# ``` | |
# How to disable SIP (System Integrity Protection) | |
# 1. Boot macOS with pressing Cmd+R | |
# 2. Launch Terminal.app | |
# | |
# $ csrutil disable | |
# $ reboot | |
# ``` | |
### Catalina | |
echo "Ignore OS auto update" | |
sudo softwareupdate --ignore "macOS Catalina" | |
# sudo softwareupdate --reset-ignored # Just in case if you want to clear ignored-app list | |
### Desktop & Screen Saver | |
# Desktop Background | |
echo "Set Desktop Background to Black" | |
osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/System/Library/Desktop Pictures/Solid Colors/Black.png"' | |
# Screen Saver | |
echo "Disable screensaver" | |
defaults write com.apple.screensaver idleTime -int 0 | |
defaults -currentHost write com.apple.screensaver idleTime -int 0 | |
# Dock | |
echo "Set Auto Hide Dock" | |
defaults write com.apple.dock autohide -bool true && killall Dock | |
echo "Empty Dock" | |
cd ~/Library/Preferences | |
cp -a ~/Library/Preferences/com.apple.dock.plist ~/Library/Preferences/com.apple.dock.plist.bak | |
defaults delete com.apple.dock persistent-apps | |
killall Dock | |
### !!!:Mission Control | |
echo "Set `Displays have separate Spaces` to False" | |
defaults write com.apple.spaces spans-displays -bool FALSE | |
### !!!:Notifications (Needs SIP disabled...) | |
echo "Disable Notification center" | |
launchctl unload /System/Library/LaunchAgents/com.apple.notificationcenterui.plist | |
### Energy Saver | |
echo "Disable system sleep" | |
sudo pmset sleep 0 | |
echo "Disable display sleep" | |
sudo pmset displaysleep 0 | |
echo "Enable wake on ethernet" | |
sudo pmset womp 1 | |
echo "Disable Power Nap" | |
sudo pmset powernap 0 | |
echo "Show Battery Percentage" | |
currentUser=`ls -l /dev/console | cut -d " " -f4` | |
sudo -u $currentUser defaults write com.apple.menuextra.battery ShowPercent YES | |
sudo -u $currentUser killall SystemUIServer | |
### Mouse | |
echo "Enable right click" | |
defaults write com.apple.driver.AppleBluetoothMultitouch.mouse MouseButtonMode -string 'TwoButton' | |
defaults write com.apple.driver.AppleHIDMouse Button2 -int 2 | |
### App Store | |
echo "Disable: SystemPreferences -> AppStore -> Automatically check for updates" | |
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate AutomaticCheckEnabled -bool FALSE | |
### Utilities | |
echo "Show ~/Library folder" | |
chflags nohidden ~/Library && xattr -d com.apple.FinderInfo ~/Library | |
echo "Avoid creating .DS_Store files on network volumes" | |
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE | |
echo "Disable the warning when changing a file extension" | |
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool FALSE | |
echo "Disable crash working on application start." | |
defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows -bool FALSE | |
echo "Disable resume on start" | |
defaults write -g ApplePersistenceIgnoreState YES | |
echo "Disable crash reporter" | |
defaults write com.apple.CrashReporter DialogType none | |
defaults write com.apple.CrashReporter UseUNC 1 | |
echo "Disable AppNap" | |
defaults write NSGlobalDomain NSAppSleepDisabled -bool YES | |
### !!!:Optional - Internet required | |
# Install Homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# dockutil | |
brew install dockutil | |
dockutil --add '/System/Applications/Utilities/Terminal.app' | |
dockutil --add '/System/Applications/Utilities/Activity Monitor.app' | |
### Reboot | |
# sudo reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment