TODO: Ansible playbooks to setup a mac from scratch
Apple menu > System Preferences… > Software Update
- Security & Privacy > General > "Require password immediately after sleep or screen saver begins"
- Security & Privacy > Firewall > Turn on, then Options > check "Stealth mode"
- Security & Privacy > Privacy > Analytics > uncheck "Share Mac Analytics"
- Trackpad > check "Tap to click"
- Trackpad > uncheck "Scroll direction natural"
- Dock > check "Automatically hide and show the Dock"
- Dock > "Prefer tabs when opening new documents" > choose "Always"
- Battery > check "Optimize video streaming while on battery"
- Install Homebrew
- Brew installs:
ansible
,bandwhich
,docker
,docker-machine
,ghc
,go
,git
,haskell-stack
,htop
,imagemagick
,nano
,ncdu
,node
,sshpass
,starship
,yarn
,zsh
- Cask installs:
appcleaner
,background-music
,ccleaner
,dbeaver-community
,flux
,font-firacode-nerd-font
,google-chrome
,iterm2
,itsycal
,kap
,keepingyouawake
,notion
,omnidisksweeper
,qlmarkdown
,smcfancontrol
,usage
,virtualbox
,visual-studio-code
- Aliases in
~/.zshrc
:
alias du="ncdu --color dark -rr -x --exclude .git"
brew install --cask iterm2
brew tap homebrew/cask-fonts
brew install --cask font-firacode-nerd-font
nano ~/Desktop/Nord.itermcolors # copy/paste https://github.com/arcticicestudio/nord-iterm2/blob/develop/src/xml/Nord.itermcolors, can be deleted afterwards
- General > Closing > uncheck all
- Appearance > Panes > uncheck "Show per-pane title bar"
- Appearance > Dimming > check "Dim inactive split panes"
- Profiles > General > "Working Directory: Advanced conf" > Edit > "New Split Panes: Reuse previous session's directory"
- Profiles > Terminal > check "unlimited scrollback"
- Profiles > Colors > Color Presets… > Import >
~/Desktop/Nord.itermcolors
> Color Presets… > "Nord" - Profiles > Text > Check "Vertical Bar" + check "Blinking Cursor"
- Profiles > Text > Select "FiraCode Nerd Font Mono" + "Regular" + size 14 > check "Use Ligatures"
- Profiles > Keys > Key Mappings > Presets… > "Natural Text Editing"
- https://iterm2.com
- https://github.com/arcticicestudio/nord-iterm2
- https://github.com/ryanoasis/nerd-fonts
- Create a config file
nano ~/.zshrc
- Enable ZSH options:
setopt autocd
- Enable Homebrew completions
- Install ZSH Completions:
brew install zsh-completions
- Install ZSH Autosuggestions:
brew install zsh-autosuggestions
- Install ZSH Syntax Highlighting:
brew install zsh-syntax-highlighting
- (still needed?) Fix ZSH Autosuggestions copy/pasting lag in
~/.zshrc
:
# This speeds up pasting w/ autosuggest
# https://github.com/zsh-users/zsh-autosuggestions/issues/238#issuecomment-389324292
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
}
pastefinish() {
zle -N self-insert $OLD_SELF_INSERT
}
zstyle :bracketed-paste-magic paste-init pasteinit
zstyle :bracketed-paste-magic paste-finish pastefinish
brew install starship
Add eval "$(starship init zsh)"
at the end of ~/.zshrc
.
Create a config file: touch ~/.config/starship.toml
[aws]
symbol = " "
disabled = true
[battery]
disabled = true
full_symbol = " "
charging_symbol = " "
discharging_symbol = " "
[cmd_duration]
style = "yellow"
format = "[$duration]($style) "
[conda]
symbol = " "
[directory]
style = "bold blue"
[docker_context]
symbol = " "
[elixir]
symbol = " "
[elm]
symbol = " "
[env_var]
variable = "ENV"
style = "dimmed blue"
format = "ENV=[$env_value]($style) "
[git_branch]
symbol = " "
style = "dimmed white"
[git_status]
style = "dimmed white"
ahead = "⇡${count}"
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
behind = "⇣${count}"
[golang]
symbol = " "
[hg_branch]
symbol = " "
[java]
symbol = " "
[julia]
symbol = " "
[nix_shell]
symbol = " "
[package]
symbol = " "
[php]
symbol = " "
[python]
symbol = " "
style = "yellow"
[ruby]
symbol = " "
[rust]
symbol = " "
brew install nano nanorc
echo 'include "/opt/homebrew/Cellar/nanorc/*/share/nanorc/*.nanorc"' >> ~/.nanorc
- Auto Close Tag
- Auto Rename Tag
- Bracket Pair Colorize
- Debugger For Chrome
- Flow Language Support
- Git History
- Latest TypeScript and JavaScript Grammar
- Monokai Pro
- NPM Intellisense
- Path Intellisense
- Prettier
- TODO Highlight
- vscode-styled-components
{
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.fontSize": 15,
"editor.minimap.renderCharacters": false,
"editor.renderIndentGuides": true,
"editor.tabSize": 2,
"extensions.ignoreRecommendations": false,
"files.trimTrailingWhitespace": true,
"git.autofetch": true,
"workbench.colorTheme": "Monokai Pro (Filter Machine)",
"workbench.editor.tabSizing": "shrink",
"workbench.iconTheme": "Monokai Pro (Filter Machine) Icons",
"window.zoomLevel": 1,
}
- View > Show Path Bar + Show Status Bar
- Toolbar > Add
Get Info
+ RemoveArrange
,Action
,Share
andEdit tags
- View > Show View Options > Big Icon Size + Text Size
14px
+ checkCalculate all sizes
> Use as Defaults - Preferences: General > New Finder:
Downloads
- Preferences: Advanced > uncheck
Show warnings
+ checkRemove items from the trash
&Keep folders on top
Before: Click on the date in menu bar > Open Date & Time Preferences > Clock > uncheck "Show date and time in menu bar"
- General > check "Launch at login" + first day of week: Monday
- Appearance > Format: "E d MMM H:mm" + check "Hide icon"
On a mac with a broken keyboard, install https://github.com/aahung/Unshaky.