├── .editorconfig ├── .gitignore_global ├── .vimrc ├── .aliases ├── README.md ├── LICENSE.md ├── .gitconfig ├── .zshrc └── .macos /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /.gitignore_global: -------------------------------------------------------------------------------- 1 | # Mac 2 | .DS_Store 3 | 4 | # npm 5 | npm-debug.log 6 | 7 | # yarn 8 | yarn-error.log 9 | 10 | # VIM 11 | *.un~ 12 | Session.vim 13 | .netrwhist 14 | *~ 15 | *.swp 16 | .lvimrc 17 | 18 | # localhistory 19 | .history 20 | 21 | # git 22 | *.patch 23 | -------------------------------------------------------------------------------- /.vimrc: -------------------------------------------------------------------------------- 1 | " Helps force plugins to load correctly when it is turned back on below 2 | filetype off 3 | 4 | " Encoding 5 | set encoding=utf-8 6 | 7 | " Syntax highlight 8 | syntax on 9 | 10 | " For plugins to load correctly 11 | filetype plugin indent on 12 | 13 | " Whitespace 14 | set wrap 15 | set textwidth=80 16 | set tabstop=2 17 | set softtabstop=2 18 | 19 | " Show file stats 20 | set ruler 21 | 22 | " Security 23 | set modelines=0 24 | -------------------------------------------------------------------------------- /.aliases: -------------------------------------------------------------------------------- 1 | # Aliases 2 | 3 | # Yarn Workspace 4 | alias yw="yarn workspace" 5 | 6 | # Lock the screen (when going AFK) 7 | alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend" 8 | 9 | # Disable Spotlight 10 | alias spotoff="sudo mdutil -a -i off" 11 | # Enable Spotlight 12 | alias spoton="sudo mdutil -a -i on" 13 | 14 | # IP addresses 15 | alias ip="dig +short myip.opendns.com @resolver1.opendns.com" 16 | alias localip="ipconfig getifaddr en0" 17 | 18 | # Easier navigation: .., ..., ...., ..... 19 | alias ..="cd .." 20 | alias ...="cd ../.." 21 | alias ....="cd ../../.." 22 | alias .....="cd ../../../.." 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dotfiles 2 | 3 | > Warning: If you want to give these dotfiles a try, you should first review the code and remove things you don’t want or need. Use at your own risk! I also recommend you take a look at [Mathias’s dotfiles](https://github.com/mathiasbynens/dotfiles) repository; it contains more macOS system modifications. 4 | 5 | Personal dotfiles for macOS. 6 | 7 | ## Installation 8 | 9 | To install everything, just run the following command. It will clone the repository and get everything ready =D 10 | 11 | ```sh 12 | curl https://raw.githubusercontent.com/jpedroschmitz/dotfiles/HEAD/.macos | bash 13 | ``` 14 | 15 | ## Thanks to... 16 | 17 | - [Mathias](https://github.com/mathiasbynens/dotfiles) 18 | - [Kent C. Dodds](https://github.com/kentcdodds/dotfiles) 19 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 João Pedro Schmitz 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = 3 | email = 4 | signingkey = 5 | 6 | [core] 7 | editor = vim 8 | excludesfile = ~/.gitignore_global 9 | 10 | [color "status"] 11 | added = green 12 | changed = yellow 13 | untracked = red 14 | 15 | [color "branch"] 16 | current = white 17 | remote = red 18 | 19 | [color "diff"] 20 | meta = yellow 21 | old = red 22 | new = green 23 | 24 | [alias] 25 | ci = commit 26 | co = checkout 27 | cm = checkout main 28 | cb = checkout -b 29 | st = status 30 | sf = show --name-only 31 | lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30 32 | incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u}) 33 | outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..) 34 | unstage = reset HEAD -- 35 | undo = checkout -- 36 | rollback = reset --soft HEAD~1 37 | 38 | [init] 39 | defaultBranch = main 40 | 41 | [pull] 42 | rebase = true 43 | 44 | [format] 45 | pretty = format:%C(auto,yellow)%h%C(auto,magenta)% G? %C(auto,blue)%>(25,trunc)%ad %C(auto,green)%<(15,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D 46 | 47 | [log] 48 | date = iso8601 49 | 50 | [push] 51 | default = current 52 | 53 | [branch] 54 | # Show most recently changed branches first. 55 | sort = -committerdate 56 | 57 | [commit] 58 | gpgsign = true 59 | 60 | [filter "lfs"] 61 | clean = git-lfs clean -- %f 62 | smudge = git-lfs smudge -- %f 63 | process = git-lfs filter-process 64 | required = true 65 | -------------------------------------------------------------------------------- /.zshrc: -------------------------------------------------------------------------------- 1 | export PATH="/usr/local/bin:$PATH" 2 | export PATH="/usr/local/sbin:$PATH" 3 | export ZSH="/Users/joaopedro/.oh-my-zsh" 4 | 5 | plugins=(git) 6 | 7 | ### Added by Zinit's installer 8 | if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then 9 | print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f" 10 | command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit" 11 | command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \ 12 | print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \ 13 | print -P "%F{160}▓▒░ The clone has failed.%f%b" 14 | fi 15 | 16 | source "$HOME/.zinit/bin/zinit.zsh" 17 | autoload -Uz _zinit 18 | (( ${+_comps} )) && _comps[zinit]=_zinit 19 | 20 | 21 | # Load a few important annexes, without Turbo 22 | # (this is currently required for annexes) 23 | zinit light-mode for \ 24 | zinit-zsh/z-a-rust \ 25 | zinit-zsh/z-a-as-monitor \ 26 | zinit-zsh/z-a-patch-dl \ 27 | zinit-zsh/z-a-bin-gem-node 28 | 29 | ### End of Zinit's installer chunk 30 | 31 | pasteinit() { 32 | OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]} 33 | zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`? 34 | } 35 | 36 | pastefinish() { 37 | zle -N self-insert $OLD_SELF_INSERT 38 | } 39 | 40 | zstyle :bracketed-paste-magic paste-init pasteinit 41 | zstyle :bracketed-paste-magic paste-finish pastefinish 42 | 43 | ZSH_THEME="spaceship" 44 | SPACESHIP_PROMPT_ORDER=( 45 | user # Username section 46 | dir # Current directory section 47 | host # Hostname section 48 | git # Git section (git_branch + git_status) 49 | hg # Mercurial section (hg_branch + hg_status) 50 | exec_time # Execution time 51 | line_sep # Line break 52 | vi_mode # Vi-mode indicator 53 | jobs # Background jobs indicator 54 | exit_code # Exit code section 55 | char # Prompt character 56 | ) 57 | SPACESHIP_USER_SHOW=always 58 | SPACESHIP_PROMPT_ADD_NEWLINE=false 59 | SPACESHIP_CHAR_SYMBOL="❯" 60 | SPACESHIP_CHAR_SUFFIX=" " 61 | 62 | zinit light zsh-users/zsh-completions 63 | zinit light zsh-users/zsh-autosuggestions 64 | zinit light zdharma/fast-syntax-highlighting 65 | zinit light zsh-users/zsh-history-substring-search 66 | 67 | alias code="/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code" 68 | 69 | source $HOME/.aliases 70 | 71 | eval $(/opt/homebrew/bin/brew shellenv) 72 | 73 | # pnpm 74 | export PNPM_HOME="/Users/joaopedro/Library/pnpm" 75 | export PATH="$PNPM_HOME:$PATH" 76 | # pnpm end 77 | 78 | export GPG_TTY=$(tty) 79 | -------------------------------------------------------------------------------- /.macos: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Close any open System Preferences panes, to prevent them from overriding 4 | # settings we’re about to change 5 | osascript -e 'tell application "System Preferences" to quit' 6 | 7 | # Ask for the administrator password upfront 8 | sudo -v 9 | 10 | # Keep-alive: update existing `sudo` time stamp until `.macos` has finished 11 | while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & 12 | 13 | # -------------- 14 | 15 | echo "Hello $(whoami)! Let's get you set up!" 16 | 17 | # -------------- 18 | 19 | echo "cloning dotfiles" 20 | git clone git@github.com:jpedroschmitz/dotfiles.git "${HOME}/dotfiles" 21 | cp "${HOME}/dotfiles/.vimrc" "${HOME}/.vimrc" 22 | 23 | # -------------- 24 | 25 | echo "mkdir -p ${HOME}/code" 26 | mkdir -p "${HOME}/code" 27 | 28 | # -------------- 29 | 30 | echo "Installing Homebrew" 31 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 32 | 33 | # -------------- 34 | 35 | echo "Installing zsh and Oh My Zsh" 36 | 37 | # Install zsh 38 | brew install zsh 39 | # Set as default 40 | chsh -s /usr/local/bin/zsh 41 | # Copy config file 42 | cp "${HOME}/dotfiles/.zshrc" "${HOME}/.zshrc" 43 | 44 | # Install Oh My Zsh 45 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" 46 | # Install Spaceship 47 | git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" 48 | ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme" 49 | # Install ZInit 50 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/zdharma/zinit/master/doc/install.sh)" 51 | 52 | # -------------- 53 | 54 | echo "Installing asdf" 55 | brew install asdf 56 | 57 | echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ${ZDOTDIR:-~}/.zshrc 58 | 59 | # -------------- 60 | 61 | echo "Installing lts Node.js with asdf" 62 | 63 | brew install gpg 64 | asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git 65 | asdf install nodejs latest 66 | asdf global nodejs latest 67 | 68 | echo "node --version: $(node --version)" 69 | echo "npm --version: $(npm --version)" 70 | 71 | # -------------- 72 | 73 | echo "Installing yarn" 74 | npm install --global yarn 75 | 76 | echo "yarn --version: $(yarn --version)" 77 | 78 | # -------------- 79 | 80 | echo "Installing pnpm" 81 | brew install pnpm 82 | 83 | echo "pnpm --version: $(pnpm --version)" 84 | 85 | # -------------- 86 | 87 | echo "Installing a few cli's" 88 | brew install gh gnupg 89 | 90 | # -------------- 91 | 92 | echo "Install more recent versions of some macOS tools" 93 | brew install vim 94 | brew install php 95 | brew install openssh 96 | 97 | # -------------- 98 | 99 | echo "Installing apps with brew --cask" 100 | brew install --cask raycast google-chrome firefox zed warp adobe-creative-cloud \ 101 | google-drive there arc visual-studio-code 1password tunnelbear \ 102 | spotify postico shureplus-motiv sequel-ace hyper insomnia grammarly \ 103 | linear-linear another-redis-desktop-manager monitorcontrol logitech-g-hub \ 104 | github elgato-control-center drata-agent docker cron colorsnapper cleanshot 105 | 106 | # -------------- 107 | 108 | echo "Installing Fira Code and JetBrains Mono" 109 | brew tap homebrew/cask-fonts 110 | brew install --cask font-fira-code font-jetbrains-mono 111 | 112 | # -------------- 113 | 114 | echo "Remove outdated versions from the cellar" 115 | brew cleanup 116 | 117 | # -------------- 118 | 119 | echo "Installing VSCode extensions" 120 | code --install-extension shan.code-settings-sync 121 | 122 | # -------------- 123 | 124 | echo "Generating a new SSH key for GitHub" 125 | ssh-keygen -t ed25519 -C "jpedroschmitz@hotmail.com" -f ~/.ssh/id_ed25519 126 | eval "$(ssh-agent -s)" 127 | touch ~/.ssh/config 128 | echo "Host *\n AddKeysToAgent yes\n UseKeychain yes\n IdentityFile ~/.ssh/id_ed25519" | tee ~/.ssh/config 129 | ssh-add -K ~/.ssh/id_ed25519 130 | echo "run 'pbcopy < ~/.ssh/id_ed25519.pub' and paste that into GitHub" 131 | 132 | cp "${HOME}/dotfiles/.gitignore_global" "${HOME}/.gitignore_global" 133 | cp "${HOME}/dotfiles/.gitconfig" "${HOME}/.gitconfig" 134 | 135 | # -------------- 136 | 137 | echo "MacOS System modifications:" 138 | 139 | # Disable the sound effects on boot 140 | sudo nvram SystemAudioVolume=" " 141 | 142 | # Disable the “Are you sure you want to open this application?” dialog 143 | defaults write com.apple.LaunchServices LSQuarantine -bool false 144 | 145 | # Disable the crash reporter 146 | defaults write com.apple.CrashReporter DialogType -string "none" 147 | 148 | # Disable automatic capitalization as it’s annoying when typing code 149 | defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false 150 | 151 | # Disable smart dashes as they’re annoying when typing code 152 | defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false 153 | 154 | # Disable automatic period substitution as it’s annoying when typing code 155 | defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false 156 | 157 | # Disable smart quotes as they’re annoying when typing code 158 | defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false 159 | 160 | # Disable auto-correct 161 | defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false 162 | 163 | ############################################################################### 164 | # Screen # 165 | ############################################################################### 166 | 167 | # Hide desktop apps 168 | write com.apple.finder CreateDesktop false 169 | 170 | # Require password immediately after sleep or screen saver begins 171 | defaults write com.apple.screensaver askForPassword -int 1 172 | defaults write com.apple.screensaver askForPasswordDelay -int 0 173 | 174 | # Save screenshots to the desktop 175 | defaults write com.apple.screencapture location -string "${HOME}/Desktop" 176 | 177 | # Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF) 178 | defaults write com.apple.screencapture type -string "png" 179 | 180 | ############################################################################### 181 | # Trackpad, mouse, keyboard, Bluetooth accessories, and input # 182 | ############################################################################### 183 | 184 | # Increase sound quality for Bluetooth headphones/headsets 185 | defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 186 | 187 | # Set a blazingly fast keyboard repeat rate 188 | defaults write NSGlobalDomain KeyRepeat -int 1 189 | defaults write NSGlobalDomain InitialKeyRepeat -int 10 190 | 191 | # Set the timezone; see `sudo systemsetup -listtimezones` for other values 192 | sudo systemsetup -settimezone "America/Sao_Paulo" > /dev/null 193 | 194 | ############################################################################### 195 | # Energy saving # 196 | ############################################################################### 197 | 198 | # Sleep the display after 15 minutes 199 | sudo pmset -a displaysleep 15 200 | 201 | # Disable machine sleep while charging 202 | sudo pmset -c sleep 0 203 | 204 | # Never go into computer sleep mode 205 | sudo systemsetup -setcomputersleep Off > /dev/null 206 | 207 | ############################################################################### 208 | # Finder # 209 | ############################################################################### 210 | 211 | # Show icons for hard drives, servers, and removable media on the desktop 212 | defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true 213 | defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false 214 | defaults write com.apple.finder ShowMountedServersOnDesktop -bool false 215 | defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true 216 | 217 | # Finder: show all filename extensions 218 | defaults write NSGlobalDomain AppleShowAllExtensions -bool true 219 | 220 | # Finder: show status bar 221 | defaults write com.apple.finder ShowStatusBar -bool true 222 | 223 | # Finder: show path bar 224 | defaults write com.apple.finder ShowPathbar -bool true 225 | 226 | # Keep folders on top when sorting by name 227 | defaults write com.apple.finder _FXSortFoldersFirst -bool true 228 | 229 | # When performing a search, search the current folder by default 230 | defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" 231 | 232 | # Disable the warning when changing a file extension 233 | defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false 234 | 235 | # Avoid creating .DS_Store files on network or USB volumes 236 | defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true 237 | defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true 238 | 239 | # Automatically open a new Finder window when a volume is mounted 240 | defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true 241 | defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true 242 | defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true 243 | 244 | # Use column view in all Finder windows by default 245 | # Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv`, `Nlsv` 246 | defaults write com.apple.finder FXPreferredViewStyle -string "clmv" 247 | 248 | # Disable the warning before emptying the Trash 249 | defaults write com.apple.finder WarnOnEmptyTrash -bool false 250 | 251 | # Show the ~/Library folder 252 | chflags nohidden ~/Library 253 | 254 | # Show the /Volumes folder 255 | sudo chflags nohidden /Volumes 256 | 257 | # Expand the following File Info panes: 258 | # “General”, “Open with”, and “Sharing & Permissions” 259 | defaults write com.apple.finder FXInfoPanesExpanded -dict \ 260 | General -bool true \ 261 | OpenWith -bool true \ 262 | Privileges -bool true 263 | 264 | ############################################################################### 265 | # Dock, Dashboard, and hot corners # 266 | ############################################################################### 267 | 268 | # Enable highlight hover effect for the grid view of a stack (Dock) 269 | defaults write com.apple.dock mouse-over-hilite-stack -bool true 270 | 271 | # Set the icon size of Dock items to 64 pixels 272 | defaults write com.apple.dock tilesize -int 64 273 | 274 | # Change minimize/maximize window effect 275 | defaults write com.apple.dock mineffect -string "scale" 276 | 277 | # Minimize windows into their application’s icon 278 | defaults write com.apple.dock minimize-to-application -bool true 279 | 280 | # Enable spring loading for all Dock items 281 | defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true 282 | 283 | # Show indicator lights for open applications in the Dock 284 | defaults write com.apple.dock show-process-indicators -bool true 285 | 286 | # Don’t animate opening applications from the Dock 287 | defaults write com.apple.dock launchanim -bool false 288 | 289 | # Automatically hide and show the Dock 290 | defaults write com.apple.dock autohide -bool true 291 | 292 | # Make dock appear faster 293 | defaults write com.apple.dock autohide-delay -float 0 294 | 295 | ############################################################################### 296 | # Safari & WebKit # 297 | ############################################################################### 298 | 299 | # Privacy: don’t send search queries to Apple 300 | defaults write com.apple.Safari UniversalSearchEnabled -bool false 301 | defaults write com.apple.Safari SuppressSearchSuggestions -bool true 302 | 303 | # Press Tab to highlight each item on a web page 304 | defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true 305 | defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true 306 | 307 | # Show the full URL in the address bar (note: this still hides the scheme) 308 | defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true 309 | 310 | # Set Safari’s home page to `about:blank` for faster loading 311 | defaults write com.apple.Safari HomePage -string "about:blank" 312 | 313 | # Prevent Safari from opening ‘safe’ files automatically after downloading 314 | defaults write com.apple.Safari AutoOpenSafeDownloads -bool false 315 | 316 | # Allow hitting the Backspace key to go to the previous page in history 317 | defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true 318 | 319 | # Hide Safari’s bookmarks bar by default 320 | defaults write com.apple.Safari ShowFavoritesBar -bool false 321 | 322 | # Hide Safari’s sidebar in Top Sites 323 | defaults write com.apple.Safari ShowSidebarInTopSites -bool false 324 | 325 | # Disable Safari’s thumbnail cache for History and Top Sites 326 | defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 327 | 328 | # Enable Safari’s debug menu 329 | defaults write com.apple.Safari IncludeInternalDebugMenu -bool true 330 | 331 | # Enable the Develop menu and the Web Inspector in Safari 332 | defaults write com.apple.Safari IncludeDevelopMenu -bool true 333 | defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true 334 | defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true 335 | 336 | # Enable continuous spellchecking 337 | defaults write com.apple.Safari WebContinuousSpellCheckingEnabled -bool true 338 | # Disable auto-correct 339 | defaults write com.apple.Safari WebAutomaticSpellingCorrectionEnabled -bool false 340 | 341 | # Warn about fraudulent websites 342 | defaults write com.apple.Safari WarnAboutFraudulentWebsites -bool true 343 | 344 | # Disable plug-ins 345 | defaults write com.apple.Safari WebKitPluginsEnabled -bool false 346 | defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2PluginsEnabled -bool false 347 | 348 | # Disable Java 349 | defaults write com.apple.Safari WebKitJavaEnabled -bool false 350 | defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled -bool false 351 | 352 | # Enable “Do Not Track” 353 | defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true 354 | 355 | # Update extensions automatically 356 | defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool true 357 | 358 | ############################################################################### 359 | # Mail # 360 | ############################################################################### 361 | 362 | # Copy email addresses as `foo@example.com` instead of `Foo Bar ` in Mail.app 363 | defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false 364 | 365 | ############################################################################### 366 | # Terminal & iTerm 2 # 367 | ############################################################################### 368 | 369 | # Only use UTF-8 in Terminal.app 370 | defaults write com.apple.terminal StringEncodings -array 4 371 | 372 | # Enable Secure Keyboard Entry in Terminal.app 373 | # See: https://security.stackexchange.com/a/47786/8918 374 | defaults write com.apple.terminal SecureKeyboardEntry -bool true 375 | 376 | # Disable the annoying line marks 377 | defaults write com.apple.Terminal ShowLineMarks -int 0 378 | 379 | # Don’t display the annoying prompt when quitting iTerm 380 | defaults write com.googlecode.iterm2 PromptOnQuit -bool false 381 | 382 | ############################################################################### 383 | # Activity Monitor # 384 | ############################################################################### 385 | 386 | # Show the main window when launching Activity Monitor 387 | defaults write com.apple.ActivityMonitor OpenMainWindow -bool true 388 | 389 | # Show all processes in Activity Monitor 390 | defaults write com.apple.ActivityMonitor ShowCategory -int 0 391 | 392 | # Sort Activity Monitor results by CPU usage 393 | defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage" 394 | defaults write com.apple.ActivityMonitor SortDirection -int 0 395 | 396 | ############################################################################### 397 | # Address Book, Dashboard, iCal, TextEdit, and Disk Utility # 398 | ############################################################################### 399 | 400 | # Use plain text mode for new TextEdit documents 401 | defaults write com.apple.TextEdit RichText -int 0 402 | 403 | # Open and save files as UTF-8 in TextEdit 404 | defaults write com.apple.TextEdit PlainTextEncoding -int 4 405 | defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 406 | 407 | # Auto-play videos when opened with QuickTime Player 408 | defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen -bool true 409 | 410 | ############################################################################### 411 | # Mac App Store # 412 | ############################################################################### 413 | 414 | # Enable the WebKit Developer Tools in the Mac App Store 415 | defaults write com.apple.appstore WebKitDeveloperExtras -bool true 416 | 417 | # Disallow the App Store to reboot machine on macOS updates 418 | defaults write com.apple.commerce AutoUpdateRestartRequired -bool false 419 | 420 | ############################################################################### 421 | # Photos # 422 | ############################################################################### 423 | 424 | # Prevent Photos from opening automatically when devices are plugged in 425 | defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true 426 | 427 | ############################################################################### 428 | # Keyboard # 429 | ############################################################################### 430 | defaults write -g ApplePressAndHoldEnabled -bool false 431 | # https://apple.stackexchange.com/a/83923 432 | defaults write -g InitialKeyRepeat -int 10 433 | defaults write -g KeyRepeat -int 1 434 | 435 | ############################################################################### 436 | # Kill affected applications # 437 | ############################################################################### 438 | 439 | for app in "Activity Monitor" \ 440 | "Address Book" \ 441 | "Calendar" \ 442 | "cfprefsd" \ 443 | "Contacts" \ 444 | "Dock" \ 445 | "Finder" \ 446 | "Mail" \ 447 | "Messages" \ 448 | "Photos" \ 449 | "Safari" \ 450 | "SystemUIServer" \ 451 | "iCal"; do 452 | killall "${app}" &> /dev/null 453 | done 454 | echo "Done. Note that some of these changes require a logout/restart to take effect." 455 | 456 | # -------------- 457 | 458 | printf "TODO:\n\ 459 | Install: \n\ 460 | Pandan (App Store) \n\ 461 | Add Plausible localStorage flag for my website on browsers (https://plausible.io/docs/excluding) 462 | Adobe Lightroom 463 | \n\ 464 | Restart Terminal.app\n\ 465 | Login to literally everything \n\ 466 | Configure Mail.app \n\ 467 | Sync VSCode extensions \n\ 468 | Configure Epson Printer \n\ 469 | Configure GPG Keys \n\ 470 | gpg --import gpg-pub.asc 471 | gpg --import gpg-sc.asc 472 | Install extensions: \n\ 473 | Wappalyzer (https://chrome.google.com/webstore/detail/wappalyzer/gppongmhjkpfnbhagpmjfkannfbllamg) 474 | GraphQL Network Inspector (https://chrome.google.com/webstore/detail/graphql-network-inspector/ndlbedplllcgconngcnfmkadhokfaaln) 475 | META SEO inspector (https://chrome.google.com/webstore/detail/meta-seo-inspector/ibkclpciafdglkjkcibmohobjkcfkaef) 476 | React Developer Tools (https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi) 477 | Grammarly (https://chrome.google.com/webstore/detail/grammarly-for-chrome/kbfnbcaeplbcioakkpcpgfkobkghlhen) 478 | Méliuz: Cashback e cupons em suas compras (https://chrome.google.com/webstore/detail/m%C3%A9liuz-cashback-e-cupons/jdcfmebflppkljibgpdlboifpcaalolg) 479 | 1Password (https://chrome.google.com/webstore/detail/1password-%E2%80%93-password-mana/aeblfdkhhhdcdjpifhhbdiojplfjncoa) 480 | Refined GitHub (https://chrome.google.com/webstore/detail/refined-github/hlepfoohegkhhmjieoechaddaejaokhf) 481 | WA Web Plus for WhatsApp (https://chrome.google.com/webstore/detail/wa-web-plus-for-whatsapp/ekcgkejcjdcmonfpmnljobemcbpnkamh) 482 | Restart macOS 483 | " 484 | --------------------------------------------------------------------------------