Create Installation Disk

  • Download OS from AppStore and after that run below command in Terminal.
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/Disk --nointeraction
  • Reboot and Holding down OPTION(ALT).

Installation

  • Easy, next next next.

Install Apps, Utils, Libs

sudo xcode-select --install
ruby -e "$(curl -L https://github.com/Homebrew/install/raw/master/install)"
brew analytics off
sudo sh -c 'easy_install pip;pip install docker-py'
brew install libxslt libxml2 ffmpeg ImageMagick python ansible dtrx wget git tig htop zsh npm
sh -c "$(curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh)"
brew cask install virtualbox vagrant vlc iterm2 atom google-chrome
apm install atom-beautify file-icons project-manager markdown-writer markdown-pdf pdf-view
vagrant plugin install vagrant-hostsupdater
# As Start: Wipe all (default) app icons from the Dock
defaults write com.apple.dock persistent-apps -array

Configure System & User

# General
  # Set Appearance to Dark
  defaults write NSGlobalDomain AppleInterfaceStyle -string "Dark"
  # Ask to keep changes when closing documents
  defaults write NSGlobalDomain NSCloseAlwaysConfirmsChanges 0
  # Close windows when quitting an app
  defaults write NSGlobalDomain NSQuitAlwaysKeepsWindows 0
  # TODO, MANUAL: Allow Handoff between this Mac and your iCloud devices
# None: Desktop & Screen Saver
# Dock
  # Size
  defaults write com.apple.dock tilesize -int 36
  # Position on screen
  defaults write com.apple.dock orientation -string "left"
  # Minimise windows using
  defaults write com.apple.dock mineffect -string "scale"
  # Minimise windows into application icon
  defaults write com.apple.dock minimize-to-application -bool true
  # Animate opening applications
  defaults write com.apple.dock launchanim -bool true
  # Automatically hide and show the Dock
  defaults write com.apple.dock autohide -bool true
  # Show indicators for open applications
  defaults write com.apple.dock show-process-indicators -bool true
  # Show recent applications in Dock
  defaults write com.apple.dock show-recents -bool false
# Mission Control
  # Disable Dashboard
  defaults write com.apple.dashboard mcx-disabled -bool true
  # Don’t show Dashboard as a Space
  defaults write com.apple.dock dashboard-in-overlay -bool true
  # Don’t automatically rearrange Spaces based on most recent use
  defaults write com.apple.dock mru-spaces -bool false
# TODO: Language & Region
# TODO: Security & Privacy
  # General
    # Require password immediately after sleep or screen saver begins
    defaults write com.apple.screensaver askForPassword -int 1
    defaults write com.apple.screensaver askForPasswordDelay -int 0
  # TODO: FileVault
  # TODO: Firewall
# Spotlight
  # Change indexing order and disable some search results
  defaults write com.apple.spotlight orderedItems -array \
  	'{"enabled" = 1;"name" = "APPLICATIONS";}' \
  	'{"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}' \
  	'{"enabled" = 0;"name" = "MENU_CONVERSION";}' \
  	'{"enabled" = 0;"name" = "MENU_EXPRESSION";}' \
  	'{"enabled" = 0;"name" = "MENU_DEFINITION";}' \
  	'{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \
  	'{"enabled" = 0;"name" = "DOCUMENTS";}' \
  	'{"enabled" = 0;"name" = "DIRECTORIES";}' \
  	'{"enabled" = 0;"name" = "PRESENTATIONS";}' \
  	'{"enabled" = 0;"name" = "SPREADSHEETS";}' \
  	'{"enabled" = 0;"name" = "PDF";}' \
  	'{"enabled" = 0;"name" = "MESSAGES";}' \
  	'{"enabled" = 0;"name" = "CONTACT";}' \
  	'{"enabled" = 0;"name" = "EVENT_TODO";}' \
  	'{"enabled" = 0;"name" = "IMAGES";}' \
  	'{"enabled" = 0;"name" = "BOOKMARKS";}' \
  	'{"enabled" = 0;"name" = "MUSIC";}' \
  	'{"enabled" = 0;"name" = "MOVIES";}' \
  	'{"enabled" = 0;"name" = "FONTS";}' \
  	'{"enabled" = 0;"name" = "MENU_OTHER";}'
# None: Notifications
############### New Row
# None: Displays
# TODO: Energy Saver
# TODO: Keyboard
# None: Mouse
# Trackpad
  # Trackpad: enable tap to click for this user and for the login screen
  defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
  defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
  defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
# None: Printers & Scanners, Sound, Startup Disk
###############
# TODO: iCloud
# TODO: Internet Accounts
# None: Software Update, Network
# Bluetooth
  # Show Bluetooth in the menu bar
  defaults write com.apple.systemuiserver "NSStatusItem Visible com.apple.menuextra.bluetooth" -int 0
# None: Extensions, Sharing
############### New Row
# TODO: Users & Groups
# None: Parental Controls, Siri, Date & Time, Time Machine
# Accessibility
  # Mouse & Trackpad -> Trackpad Options -> Enable Dragging
  defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad DragLock -bool true
  defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Dragging -bool true
###############
# Other
  # TODO: Setup Right Sidebar.
  # Hide Siri from menu
  defaults write com.apple.Siri StatusMenuVisible -bool false
  # Show battery percentage
  defaults write com.apple.menuextra.battery ShowPercent -string "YES"
  # Disable auto-correct
  defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
  # Prevent Photos from opening automatically when devices are plugged in
  defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true
  # Save to disk (not to iCloud) by default
  defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false
  # Disable the “Are you sure you want to open this application?” dialog
  defaults write com.apple.LaunchServices LSQuarantine -bool false
  # Never go into computer sleep mode
  sudo systemsetup -setcomputersleep Off > /dev/null

Configure Applications

# Atom.io
  defaults write com.github.atom NSFullScreenMenuItemEverywhere -bool false
  defaults write com.github.atom NSNavLastRootDirectory -string "~/Documents"
# Google Chrome
  # Disable the all too sensitive backswipe on trackpads
  defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false
  # Disable the all too sensitive backswipe on Magic Mouse
  defaults write com.google.Chrome AppleEnableMouseSwipeNavigateWithScrolls -bool false
  # Use the system-native print preview dialog
  defaults write com.google.Chrome DisablePrintPreview -bool true
  # Expand the print dialog by default
  defaults write com.google.Chrome PMPrintingExpandedStateForPrint2 -bool true
# iTerm2
  # * **iTerm2:** Appearance: [x] Show...only one tab. Profiles: Unlimited scroll back.
  defaults write com.googlecode.iterm2 HideTab -bool false
# Finder
# * **Finder:** New finder: "home". Sidebar: Show "home", Disable Tags.
  # Set Desktop as the default location for new Finder windows
  # For other paths, use `PfLo` and `file:///full/path/here/`
  defaults write com.apple.finder NewWindowTarget -string "PfDe"
  defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/"
  # Show icons for hard drives, servers, and removable media on the desktop
  defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool false
  defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false
  defaults write com.apple.finder ShowMountedServersOnDesktop -bool false
  defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool false
  # Keep folders on top when sorting by name
  defaults write com.apple.finder _FXSortFoldersFirst -bool true
  # When performing a search, search the current folder by default
  defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
  # Disable the warning when changing a file extension
  defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
  # Use list view in all Finder windows by default
  # Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`
  defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv"
  # Disable the warning before emptying the Trash
  defaults write com.apple.finder WarnOnEmptyTrash -bool false
# MicroSnitch
  defaults write at.obdev.MicroSnitch OpenAtLogin -bool true
# Atom: Settings, Packages, Tree, Hide Ignored Named. (.localized)
# Safari & WebKit
  # Privacy: don’t send search queries to Apple
  defaults write com.apple.Safari UniversalSearchEnabled -bool false
  defaults write com.apple.Safari SuppressSearchSuggestions -bool true
  # Remove useless icons from Safari’s bookmarks bar
  defaults write com.apple.Safari ProxiesInBookmarksBar "()"
  # Enable the Develop menu and the Web Inspector in Safari
  defaults write com.apple.Safari IncludeDevelopMenu -bool true
  defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
  defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true
  # Add a context menu item for showing the Web Inspector in web views
  defaults write NSGlobalDomain WebKitDeveloperExtras -bool true
  # Enable continuous spellchecking
  defaults write com.apple.Safari WebContinuousSpellCheckingEnabled -bool true
  # Disable auto-correct
  defaults write com.apple.Safari WebAutomaticSpellingCorrectionEnabled -bool false
# Terminal
  # Enable Secure Keyboard Entry in Terminal.app
  # See: https://security.stackexchange.com/a/47786/8918
  defaults write com.apple.terminal SecureKeyboardEntry -bool true
  # Disable the annoying line marks
  defaults write com.apple.Terminal ShowLineMarks -int 0
# iTerm 2
  # Don’t display the annoying prompt when quitting iTerm
  defaults write com.googlecode.iterm2 PromptOnQuit -bool false
# Time Machine
  # Prevent Time Machine from prompting to use new hard drives as backup volume
  defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true
# TextEdit
  # Use plain text mode for new TextEdit documents
  defaults write com.apple.TextEdit RichText -int 0
  # Open and save files as UTF-8 in TextEdit
  defaults write com.apple.TextEdit PlainTextEncoding -int 4
  defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4
# AppStore
  # Enable the automatic update check
  defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true
  # Check for software updates daily, not just once per week
  defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
  # Download newly available updates in background
  defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1
  # Install System data files & security updates
  defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1
  # Automatically download apps purchased on other Macs
  defaults write com.apple.SoftwareUpdate ConfigDataInstall -int 1
  # Turn on app auto-update
  defaults write com.apple.commerce AutoUpdate -bool true

Configure from GUI

  • Reboot before doing next steps…
  • Tab Updates AppStore, plus click on your name to install the already purchased Apps.
  • Dock: iTerm2, Chrome (uBlock, Mailvelope), Atom, Notes, LSnitch, AppCleaner.
  • Language & Region: Keyboard Preferences - Input Sources: Click + | Romanian Standard.
  • require password.
  • spotlight index.
  • show blueetooth in bar.
  • disable guest user.

Optional Config Changes

# Save configs: `defaults read > 1.configbk`.
# Change Config from GUI.
# Save & Check what configs changed: `defaults read > 2.configbk; diff 1.configbk 2.configbk`.