diff --git a/LICENSE b/LICENSE index f4b0917..15b927c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 Joshua Steele +Copyright (c) 2018 Joshua Steele Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 13b91c6..400c00d 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,13 @@ The purpose of this script is to provision a new machine running a fresh install of macOS. It installs and configures the software, dotfiles, and general preferences I use for web development — primarily [Ruby][ruby]/[Rails][rails] and [Node.js][nodejs]. The command line environment is based on Zsh (via [Oh-My-Zsh][omz]), [Vim][vim]/[Neovim][neovim] and [Tmux][tmux] running in [iTerm2][iterm2] or [Terminal.app][terminal]. -The [`bootstrap`][bootstrap] script is very specific to the Mac platform. Version 3.x has been successfully tested on the following versions of macOS: +The [`bootstrap`][bootstrap] script is very specific to the Mac platform. Version 4.x has been successfully tested on the following versions of macOS: -* High Sierra (10.13) +* Mojave (10.14) Previous versions of Mac Bootstrap have been successfully tested on the following versions of macOS: +* High Sierra (10.13) * Sierra (10.12) * El Capitan (10.11) @@ -17,17 +18,19 @@ Previous versions of Mac Bootstrap have been successfully tested on the followin ## Prerequisites -Make sure your software is up to date: +1. Make sure your software is up to date: + + sudo softwareupdate -i -a --restart - sudo softwareupdate -i -a --restart +1. Install Apple's command line tools: -Install Apple's command line tools: + xcode-select --install - xcode-select --install +1. Reboot, check for additional updates, then reinstall and reboot as needed. -Reboot, check for additional updates, then reinstall, reboot if needed. +1. Install preliminary Mac apps. These would be any MAS or other apps referenced by the macos-dock script and not handled by `brew cask`. (See `install/macos-dock`) -Sign in to the Mac App Store. If you don't do this before running the `bootstrap` script, [`mas-cli`][mas-cli] may have trouble installing apps. +**NOTE: MAS app installation was previously handled by the [`mas-cli`][mas-cli] utility. However, as of macOS Mojave, the signin functionality for `mas-cli` is broken. [View details here.](https://github.com/mas-cli/mas#-sign-in)** ## Installation @@ -50,7 +53,7 @@ WARNING: This script will ask for your admin password multiple times. You'll nee When you invoke `bootstrap`, here's what it does: -* Step 1: Run my adaptation of thoughtbot's [Laptop script][laptop]. This is a provisioning script which installs lots of goodies like Homebrew, asdf, postgres, etc. My version is now stored locally in this repo under [`install/laptop`][my-laptop]. Step 1 also installs a variety of packages via [Homebrew Bundle][brew-bundle], including several apps from the Mac App Store via [mas-cli][mas-cli]. +* Step 1: Run my adaptation of thoughtbot's [Laptop script][laptop]. This is a provisioning script which installs lots of goodies like Homebrew, asdf, postgres, etc. My version is now stored locally in this repo under [`install/laptop`][my-laptop]. Step 1 also installs a variety of packages via [Homebrew Bundle][brew-bundle]. * Step 2: Install [Oh-My-Zsh][omz]. * Step 3: Clone [My Dotfiles for macOS][dotfiles] and symlink them to `$HOME`. * Step 4: Install various [executable scripts][exe-scripts] (mostly for Tmux and Git) to `$HOME/bin`. @@ -66,7 +69,7 @@ NOTE: Previously, I used the `bootstrap` script to set up many of the standard d After running `bootstrap` there are still a few things that need to be done. * Restart your machine in order for some changes to take effect. -* Install remaining software from Mac App Store. +* Install remaining software from Mac App Store or other sources. * Install remaining Homebrew packages via [Brew Bundle][brew-bundle] with `brew bundle install`. * Set up iTerm2 and/or Terminal.app profile (see details below). * Launch Neovim and `:checkhealth`. @@ -103,7 +106,6 @@ These are my (current) primary macOS keyboard shortcuts: * Spotlight search: ⌘⇧Space * Switch input source: ⌃⇧Space * Fantastical: ⌥⌘Space -* Things: ⌃Space * iTerm2 hotkey window: ⌥Space * Remap Caps Lock to CTRL (anyone know a way to automate this?) @@ -117,7 +119,7 @@ No one else's development setup will ever be a perfect match for you. That said, 3) Review the 8 steps in [`bootstrap`][bootstrap] and make your own customizations. Here's an overview of what's going on: -* Step 1 (required): Take a look at [Laptop][laptop] and see what you might want to tweak. One of the biggest things to review is the `brew bundle` list of packages, casks, and MAS apps that will be installed. Customize as needed. Laptop also sets up some basics that are required by the bootstrap script later on. +* Step 1 (required): Take a look at [Laptop][laptop] and see what you might want to tweak. One of the biggest things to review is the `brew bundle` list of packages and casks that will be installed. Customize as needed. Laptop also sets up some basics that are required by the bootstrap script later on. * Step 2 (recommended): Use `oh-my-zsh`? * Step 3 (required): The dotfiles. Update the `$DOTFILES_*` variables (see [`bootstrap`][bootstrap] under "VARIABLE DECLARATIONS") to reference your dotfiles. As a starting point, you can [fork mine][dotfiles] and then point to your fork. * Step 4 (recommended): Install scripts to `~/bin`? @@ -187,7 +189,7 @@ Copyright © 2018 Joshua Steele. [MIT License](https://github.com/joshukrain [omz]: http://ohmyz.sh/ [rails]: https://rubyonrails.org/ [ruby]: https://www.ruby-lang.org/en -[screenshot]: https://s3.amazonaws.com/images.jsua.co/mac-bootstrap-welcome-05-26-2018.png +[screenshot]: https://s3.amazonaws.com/images.jsua.co/mac-bootstrap-welcome-10-21-2018.png [stratus3d]: http://stratus3d.com/blog/2015/02/28/sync-iterm2-profile-with-dotfiles-repository/ [terminal]: https://en.wikipedia.org/wiki/Terminal_(macOS) [tmux]: https://github.com/tmux/tmux/wiki diff --git a/bootstrap b/bootstrap index 120e212..14befd2 100755 --- a/bootstrap +++ b/bootstrap @@ -36,8 +36,8 @@ DEFAULT_DOTFILES_BRANCH="master" DEFAULT_COMPUTER_NAME="Joshua's Mac" DEFAULT_HOST_NAME="joshuas-mac" DEFAULT_TIME_ZONE="Europe/Kiev" -DEFAULT_NODEJS_VERSION="10.2.1" -DEFAULT_RUBY_VERSION="2.5.1" +DEFAULT_NODEJS_VERSION="8.12.0" +DEFAULT_RUBY_VERSION="2.5.3" ################################################################################ diff --git a/install/laptop b/install/laptop index 4a3f9dd..c863ee2 100644 --- a/install/laptop +++ b/install/laptop @@ -137,18 +137,15 @@ brew "git-quick-stats" brew "gmp" # Vim dependency brew "gpg" # asdf-nodejs dependency brew "htop" -brew "hub" brew "imagemagick" brew "libtool" # asdf dependency brew "libxslt" # asdf dependency brew "libyaml" # asdf dependency -brew "mas" -brew "neovim", args: ["HEAD"] +brew "neovim" brew "overmind" brew "pandoc" brew "perl" brew "pgcli" -brew "phantomjs" brew "postgresql", restart_service: true brew "python" brew "python3" @@ -171,29 +168,15 @@ brew "zsh" # homebrew-cask # https://github.com/caskroom/homebrew-cask -cask_args appdir: "/Applications" -cask "1password" -cask "dash" cask "dropbox" cask "fantastical" -cask "firefox" cask "google-chrome" cask "iterm2" -cask "postico" -cask "skype" - -# mas-cli -# https://github.com/mas-cli/mas -mas "Evernote", id: 406056744 -mas "Slack", id: 803453959 -mas "Spark", id: 1176895641 -mas "Things3", id: 904280696 -mas "Tweetbot", id: 557168941 EOF laptop_echo "Configuring asdf version manager..." if [ ! -d "$HOME/.asdf" ]; then - git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.4.3 + git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.6.0 append_to_zshrc "source $HOME/.asdf/asdf.sh" 1 fi @@ -238,16 +221,6 @@ number_of_cores=$(sysctl -n hw.ncpu) bundle config --global jobs $((number_of_cores - 1)) laptop_echo "Installing latest Node..." -PATH="$PATH:$ASDF_DIR/installs/nodejs/$ASDF_NODEJS_VERSION/bin" -cat << EOF > "$HOME"/.default-npm-packages -gulp-cli -neovim -pug -standard -stylelint -svgo -vue-cli -EOF bash "$HOME/.asdf/plugins/nodejs/bin/import-release-team-keyring" install_asdf_language "nodejs" "$ASDF_NODEJS_VERSION" echo "Node --> $(which node)" @@ -255,6 +228,14 @@ node -v echo "NPM --> $(which npm)" npm -v +npm install -g gulp-cli +npm install -g neovim +npm install -g pug +npm install -g standard +npm install -g stylelint +npm install -g svgo +npm install -g vue-cli + laptop_echo "Installing Python support for Neovim..." echo "Python 2 --> $(which python)" python --version diff --git a/install/macos-defaults b/install/macos-defaults index 7363a2a..d4f6e7f 100644 --- a/install/macos-defaults +++ b/install/macos-defaults @@ -23,7 +23,7 @@ sudo scutil --set LocalHostName "$HOST_NAME" sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "$HOST_NAME" # Set standby delay to 3 hours (default is 1 hour) -sudo pmset -a standbydelay 10800 +# sudo pmset -a standbydelay 10800 # Disable the sound effects on boot # sudo nvram SystemAudioVolume=" " @@ -35,7 +35,7 @@ sudo pmset -a standbydelay 10800 defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2 # Set scrollbar behavior -defaults write NSGlobalDomain AppleShowScrollBars -string "Automatic" +# defaults write NSGlobalDomain AppleShowScrollBars -string "Automatic" # Possible values: `WhenScrolling`, `Automatic`, `Always` # Expand save panel by default @@ -47,23 +47,23 @@ defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true # Automatically quit printer app once the print jobs complete -defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true +# defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true # Disable the “Are you sure you want to open this application?” dialog -defaults write com.apple.LaunchServices LSQuarantine -bool false +# defaults write com.apple.LaunchServices LSQuarantine -bool false # Display ASCII control characters using caret notation in standard text views # Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt` -defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true +# defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true # Disable Resume system-wide -defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false +# defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false # Disable automatic termination of inactive apps # defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true # Disable the crash reporter -defaults write com.apple.CrashReporter DialogType -string "none" +# defaults write com.apple.CrashReporter DialogType -string "none" # Set Help Viewer windows to non-floating mode defaults write com.apple.helpviewer DevMode -bool true @@ -73,10 +73,10 @@ defaults write com.apple.helpviewer DevMode -bool true sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName # Restart automatically if the computer freezes -sudo systemsetup -setrestartfreeze on +# sudo systemsetup -setrestartfreeze on # Never go into computer sleep mode -sudo systemsetup -setcomputersleep Off > /dev/null +# sudo systemsetup -setcomputersleep Off > /dev/null # Disable Notification Center and remove the menu bar icon # launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null @@ -109,14 +109,14 @@ defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 # defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true # Enable “natural” (Lion-style) scrolling -defaults write NSGlobalDomain com.apple.swipescrolldirection -bool true +# defaults write NSGlobalDomain com.apple.swipescrolldirection -bool true # Increase sound quality for Bluetooth headphones/headsets -defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 +# defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 # Enable full keyboard access for all controls # (e.g. enable Tab in modal dialogs) -defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 +# defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 # Use scroll gesture with the Ctrl (^) modifier key to zoom # defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true @@ -150,8 +150,8 @@ systemsetup -settimezone "$TIME_ZONE" > /dev/null ############################################################################### # 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 +# defaults write com.apple.screensaver askForPassword -int 1 +# defaults write com.apple.screensaver askForPasswordDelay -int 0 # Save screenshots to the desktop defaults write com.apple.screencapture location -string "${HOME}/Desktop" @@ -163,10 +163,10 @@ defaults write com.apple.screencapture type -string "png" defaults write com.apple.screencapture disable-shadow -bool true # Enable subpixel font rendering on non-Apple LCDs -defaults write NSGlobalDomain AppleFontSmoothing -int 2 +# defaults write NSGlobalDomain AppleFontSmoothing -int 2 # Enable HiDPI display modes (requires restart) -sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true +# sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true ############################################################################### # Finder # @@ -175,7 +175,7 @@ sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutio # Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons defaults write com.apple.finder QuitMenuItem -bool true -# Set the user directory as the default location for new Finder windows +# Set Dropbox directory as the default location for new Finder windows # More options here: https://github.com/mathiasbynens/dotfiles/blob/96edd4b57047f34ffbcbb708e1e4de3a2e469925/.macos#L233 defaults write com.apple.finder NewWindowTarget -string "PfLo" defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Dropbox/" @@ -226,9 +226,9 @@ defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true # defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true # Automatically open a new Finder window when a volume is mounted -defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true -defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true -defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true +# defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true +# defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true +# defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true # Use column view in all Finder windows by default # Four-letter codes for all view modes: `icnv`, `clmv`, `Flwv`, `Nlsv` @@ -238,7 +238,7 @@ defaults write com.apple.finder FXPreferredViewStyle -string "clmv" defaults write com.apple.finder WarnOnEmptyTrash -bool false # Enable AirDrop over Ethernet and on unsupported Macs running Lion -defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true +# defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true # Expand the following File Info panes: # “General”, “Open with”, and “Sharing & Permissions” @@ -252,25 +252,25 @@ defaults write com.apple.finder FXInfoPanesExpanded -dict \ ############################################################################### # Position dock on the left side of the screen -defaults write com.apple.dock orientation -string "left" +# defaults write com.apple.dock orientation -string "left" # Automatically hide and show the Dock -defaults write com.apple.dock autohide -bool true +# defaults write com.apple.dock autohide -bool true # Enable highlight hover effect for the grid view of a stack (Dock) -defaults write com.apple.dock mouse-over-hilite-stack -bool true +# defaults write com.apple.dock mouse-over-hilite-stack -bool true # Set the icon size of Dock items to 72 pixels -defaults write com.apple.dock tilesize -int 72 +# defaults write com.apple.dock tilesize -int 72 # Enable spring loading for all Dock items -defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true +# defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true # Show indicator lights for open applications in the Dock -defaults write com.apple.dock show-process-indicators -bool true +# defaults write com.apple.dock show-process-indicators -bool true # Speed up Mission Control animations -defaults write com.apple.dock expose-animation-duration -float 0.1 +# defaults write com.apple.dock expose-animation-duration -float 0.1 # Disable Dashboard defaults write com.apple.dashboard mcx-disabled -bool true @@ -315,61 +315,61 @@ defaults write com.apple.dock showhidden -bool true # defaults write com.apple.dock wvous-tr-corner -int 4 # defaults write com.apple.dock wvous-tr-modifier -int 0 # Bottom right screen corner → Display sleep -defaults write com.apple.dock wvous-br-corner -int 10 -defaults write com.apple.dock wvous-br-modifier -int 0 +# defaults write com.apple.dock wvous-br-corner -int 10 +# defaults write com.apple.dock wvous-br-modifier -int 0 ############################################################################### # 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 +# defaults write com.apple.Safari UniversalSearchEnabled -bool false +# defaults write com.apple.Safari SuppressSearchSuggestions -bool true # Press Tab to highlight each item on a web page -defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true +# defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true +# defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true # Show the full URL in the address bar (note: this still hides the scheme) -defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true +# defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true # Set Safari’s home page to `about:blank` for faster loading -defaults write com.apple.Safari HomePage -string "about:blank" +# defaults write com.apple.Safari HomePage -string "about:blank" # Prevent Safari from opening ‘safe’ files automatically after downloading -defaults write com.apple.Safari AutoOpenSafeDownloads -bool false +# defaults write com.apple.Safari AutoOpenSafeDownloads -bool false # Allow hitting the Backspace key to go to the previous page in history -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true +# defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true # Hide Safari’s bookmarks bar by default -defaults write com.apple.Safari ShowFavoritesBar -bool false +# defaults write com.apple.Safari ShowFavoritesBar -bool false # Hide Safari’s sidebar in Top Sites -defaults write com.apple.Safari ShowSidebarInTopSites -bool false +# defaults write com.apple.Safari ShowSidebarInTopSites -bool false # Disable Safari’s thumbnail cache for History and Top Sites -defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 +# defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 # Enable Safari’s debug menu -defaults write com.apple.Safari IncludeInternalDebugMenu -bool true +# defaults write com.apple.Safari IncludeInternalDebugMenu -bool true # Make Safari’s search banners default to Contains instead of Starts With -defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false +# defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false # 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 +# 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 +# defaults write NSGlobalDomain WebKitDeveloperExtras -bool true # Enable continuous spellchecking -defaults write com.apple.Safari WebContinuousSpellCheckingEnabled -bool true +# defaults write com.apple.Safari WebContinuousSpellCheckingEnabled -bool true # Disable auto-correct -defaults write com.apple.Safari WebAutomaticSpellingCorrectionEnabled -bool false +# defaults write com.apple.Safari WebAutomaticSpellingCorrectionEnabled -bool false # Disable AutoFill # defaults write com.apple.Safari AutoFillFromAddressBook -bool false @@ -378,39 +378,39 @@ defaults write com.apple.Safari WebAutomaticSpellingCorrectionEnabled -bool fals # defaults write com.apple.Safari AutoFillMiscellaneousForms -bool false # Warn about fraudulent websites -defaults write com.apple.Safari WarnAboutFraudulentWebsites -bool true +# defaults write com.apple.Safari WarnAboutFraudulentWebsites -bool true # Disable plug-ins -defaults write com.apple.Safari WebKitPluginsEnabled -bool false -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2PluginsEnabled -bool false +# defaults write com.apple.Safari WebKitPluginsEnabled -bool false +# defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2PluginsEnabled -bool false # Disable Java -defaults write com.apple.Safari WebKitJavaEnabled -bool false -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled -bool false +# defaults write com.apple.Safari WebKitJavaEnabled -bool false +# defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled -bool false # Block pop-up windows -defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically -bool false -defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool false +# defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically -bool false +# defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool false # Enable “Do Not Track” -defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true +# defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true # Update extensions automatically -defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool true +# defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool true ############################################################################### # Mail # ############################################################################### # Disable send and reply animations in Mail.app -defaults write com.apple.mail DisableReplyAnimations -bool true -defaults write com.apple.mail DisableSendAnimations -bool true +# defaults write com.apple.mail DisableReplyAnimations -bool true +# defaults write com.apple.mail DisableSendAnimations -bool true # Copy email addresses as `foo@example.com` instead of `Foo Bar ` in Mail.app defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false # Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app -defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\\U21a9" +# defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\\U21a9" # Display emails in threaded mode, sorted by date (oldest at the top) # defaults write com.apple.mail DraftsViewerAttributes -dict-add "DisplayInThreadedMode" -string "yes" @@ -418,7 +418,7 @@ defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\\U21a9" # defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortOrder" -string "received-date" # Disable inline attachments (just show the icons) -defaults write com.apple.mail DisableInlineAttachmentViewing -bool true +# defaults write com.apple.mail DisableInlineAttachmentViewing -bool true # Disable automatic spell checking # defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnabled" @@ -428,45 +428,45 @@ defaults write com.apple.mail DisableInlineAttachmentViewing -bool true ############################################################################### # Prevent Time Machine from prompting to use new hard drives as backup volume -defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true +# defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true ############################################################################### # Activity Monitor # ############################################################################### # Show the main window when launching Activity Monitor -defaults write com.apple.ActivityMonitor OpenMainWindow -bool true +# defaults write com.apple.ActivityMonitor OpenMainWindow -bool true # Visualize CPU usage in the Activity Monitor Dock icon -defaults write com.apple.ActivityMonitor IconType -int 5 +# defaults write com.apple.ActivityMonitor IconType -int 5 # Show all processes in Activity Monitor -defaults write com.apple.ActivityMonitor ShowCategory -int 0 +# defaults write com.apple.ActivityMonitor ShowCategory -int 0 # Sort Activity Monitor results by CPU usage -defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage" -defaults write com.apple.ActivityMonitor SortDirection -int 0 +# defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage" +# defaults write com.apple.ActivityMonitor SortDirection -int 0 ############################################################################### # Address Book, Dashboard, iCal, TextEdit, and Disk Utility # ############################################################################### # Enable the debug menu in Address Book -defaults write com.apple.addressbook ABShowDebugMenu -bool true +# defaults write com.apple.addressbook ABShowDebugMenu -bool true # Use plain text mode for new TextEdit documents -defaults write com.apple.TextEdit RichText -int 0 +# 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 +# defaults write com.apple.TextEdit PlainTextEncoding -int 4 +# defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 # 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 # Auto-play videos when opened with QuickTime Player -defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen -bool true +# defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen -bool true ############################################################################### # Mac App Store # @@ -479,7 +479,7 @@ defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen -bool true # defaults write com.apple.appstore ShowDebugMenu -bool true # Disable the automatic update check -defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool false +# defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool false # Check for software updates daily, not just once per week # defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 @@ -514,22 +514,22 @@ defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool false # defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticEmojiSubstitutionEnablediMessage" -bool false # Disable smart quotes as it’s annoying for messages that contain code -defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false +# defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false # Disable continuous spell checking -defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false +# defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false ############################################################################### # Google Chrome & Google Chrome Canary # ############################################################################### # Disable the all too sensitive backswipe on trackpads -defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false -defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -bool false +# defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false +# defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -bool false # Disable the all too sensitive backswipe on Magic Mouse -defaults write com.google.Chrome AppleEnableMouseSwipeNavigateWithScrolls -bool false -defaults write com.google.Chrome.canary AppleEnableMouseSwipeNavigateWithScrolls -bool false +# defaults write com.google.Chrome AppleEnableMouseSwipeNavigateWithScrolls -bool false +# defaults write com.google.Chrome.canary AppleEnableMouseSwipeNavigateWithScrolls -bool false # Use the system-native print preview dialog defaults write com.google.Chrome DisablePrintPreview -bool true @@ -544,12 +544,12 @@ defaults write com.google.Chrome.canary PMPrintingExpandedStateForPrint2 -bool t ############################################################################### # Expand the print dialog by default -defaults write com.operasoftware.Opera PMPrintingExpandedStateForPrint2 -boolean true -defaults write com.operasoftware.OperaDeveloper PMPrintingExpandedStateForPrint2 -boolean true +# defaults write com.operasoftware.Opera PMPrintingExpandedStateForPrint2 -boolean true +# defaults write com.operasoftware.OperaDeveloper PMPrintingExpandedStateForPrint2 -boolean true ############################################################################### # Extras ############################################################################### # Activate audible chime when power cable is plugged in. -defaults write com.apple.PowerChime ChimeOnAllHardware -bool true; open /System/Library/CoreServices/PowerChime.app +# defaults write com.apple.PowerChime ChimeOnAllHardware -bool true; open /System/Library/CoreServices/PowerChime.app diff --git a/install/macos-dock b/install/macos-dock index 88889eb..c034a04 100644 --- a/install/macos-dock +++ b/install/macos-dock @@ -1,23 +1,19 @@ #!/usr/bin/env bash dockutil --no-restart --remove all -# dockutil --no-restart --add "/Applications/Launchpad.app" -# dockutil --no-restart --add "/Applications/Google Chrome.app" -# dockutil --no-restart --add "/Applications/Spark.app" -# dockutil --no-restart --add "/Applications/Fantastical 2.app" -# dockutil --no-restart --add "/Applications/Messages.app" -# dockutil --no-restart --add "/Applications/Notes.app" -# dockutil --no-restart --add "/Applications/Things3.app" -# dockutil --no-restart --add "/Applications/Evernote.app" -# dockutil --no-restart --add "/Applications/Tweetbot.app" -# dockutil --no-restart --add "/Applications/iTunes.app" -# dockutil --no-restart --add "/Applications/Skype.app" -# dockutil --no-restart --add "/Applications/Slack.app" -# dockutil --no-restart --add "/Applications/1Password.app" -# dockutil --no-restart --add "/Applications/Postico.app" -# dockutil --no-restart --add "/Applications/iTerm.app" -# dockutil --no-restart --add "/Applications/Dash.app" -# dockutil --no-restart --add "/Applications/System Preferences.app" +dockutil --no-restart --add "/Applications/Launchpad.app" # Default app +dockutil --no-restart --add "/Applications/Google Chrome.app" # Cask +dockutil --no-restart --add "/Applications/Spark.app" # MAS +dockutil --no-restart --add "/Applications/Fantastical 2.app" # Cask +dockutil --no-restart --add "/Applications/Messages.app" # Default app +dockutil --no-restart --add "/Applications/Reminders.app" # Default app +dockutil --no-restart --add "/Applications/Notes.app" # Default app +dockutil --no-restart --add "/Applications/Evernote.app" # MAS +dockutil --no-restart --add "/Applications/iTunes.app" #Default app +dockutil --no-restart --add "/Applications/Slack.app" # MAS +dockutil --no-restart --add "/Applications/1Password 7.app" # Custom download +dockutil --no-restart --add "/Applications/iTerm.app" # Cask +dockutil --no-restart --add "/Applications/System Preferences.app" # Default app killall Dock