/dotfiles

dotfiles to provision a new macOS with cosy dev setups

Primary LanguageShell

dotfiles

GitHub CI

This is a dotfiles project which may be used to provision a new macOS with cosy dev setups. And it is tested with GitHub Actions CI. The checkbox denotes whether it is done by bootstrap.

Inspired by KrauseFx/new-mac.

For Arch Linux, please refer to crispgm/arch-linux-dotfiles.

Bootstrap

$ xcode-select --install # or download here <https://developer.apple.com/download/more/>
$ git clone --recursive https://github.com/crispgm/dotfiles.git
# Login to AppStore with Apple ID, since there are MAS apps in Brewfile
$ cd dotfiles
$ ./bootstrap

Dev Setups

Terminal & Shell

  • Setup Hostname sudo scutil --set HostName david-macbook
  • Install Homebrew
  • Install softwares and fonts from Brewfile with brew bundle. HINT: Login to AppStore at first. Some of the applications from Mac App Store may need purchase.
  • Install nord theme for iTerm2
  • Install zsh and oh-my-zsh
  • Setup shell login promtp with motd: ASCII art is generated with http://patorjk.com/software/taag/
  • Setup .bash_profile .bashrc .zshrc
  • Setup NeoVim

Git

  • Git global config
  • Git work config

Ruby

  • Setup .gemrc
  • Setup bundler's mirror: bundle config mirror.https://rubygems.org https://gems.ruby-china.com if you locate in China mainland

Sublime Text

  • Create subl in Terminal: sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl ~/Applications/subl
  • Migrate .sublime-settings
  • Install PackageControl
  • PackageControl: Install Nord, syntax-highlighting-for-sass, and SublimeLinter

VSCode

  • Create code in Terminal: sudo ln -s /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code ~/Applications/code
  • Install Setting Sync extensions and then sync settings

Shadowsocks

File Sync

  • Install your favorite file sync service (e.g. Dropbox, Google Drive, One Drive ... I prefer Dropbox because it works with Alfred)
  • Setup syncing folder for apps (e.g. Alfred, Dash ...)

macOS Setups

Trackpad

  • Tap to click
  • Seconary click: Click in bottom right corner

Time

  • Set time zone automatically using current location
  • Use a 24-hour clock and show date

Finder

  • New Finder show Desktop
  • Remove labels and clean up Sidebar

Dock

  • Change to the size you like
  • Cancel: Show recent application in Dock
  • Downloads: View content as Grid
  • Add blank seperator: defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}

Siri

  • Disable Siri system wide and remove Siri button from Touch Bar

Optional Setups

Karabiner

  • Setup karabiner.json

Related Blog

我是如何初始化 Mac 环境的