header source
my icon
esplo.net
ぷるぷるした直方体
Cover Image for Mac Setup Memo

Mac Setup Memo

about10mins to read

I've set up my Mac, and since I'll be doing it again soon, I'll leave a memo. Although it's mostly personal, I'll make it public.

System

First, open the App Store and update the system.

Language & Region

Set only US English.

Display

  • Select Scaled in Resolution and set it to the maximum (or smaller if you often connect to an external display).
  • Set Night Shift to Sunset to Sunrise.

Trackpad

Check Tap to click.

Keyboard

  • Check Use F1, F2....
  • In modifier keys, set Caps Lock to Control.
  • You can also use Karabiner to do this.
    • Uncheck Shortcuts → Input Sources to release Ctrl+Space.
    • Set key repeat using the command. It will take effect after logging out.
$ defaults write -g KeyRepeat -int 2
$ defaults write -g InitialKeyRepeat -int 15

Text

Uncheck the following:

  • Correct spelling automatically
  • Capitalize words automatically
  • Add period with double-space
  • Use smart quotes and dashes

Dock

  • Make the size smaller.
  • Move the position to the right.
  • Remove unnecessary default icons.

Taskbar

  • Right-click the power icon and select Show Percentage.

Applications

Browser

Use Safari and install Chrome. You can also install Firefox if needed.

Input/Output

Install Google Japanese input. Then, in Show keyboard settings, only keep the following:

  • U.S.
  • Hiragana (Google)

Keyboard

Install Karabiner Elements and assign the left and right command keys to switch. Refer to the following article for details:

https://beadored.com/the-original-karabiner-elements-command-switching-eisuu-kana/

brew

Install brew to install applications. Refer to the official website:

https://brew.sh

zsh

$ brew install zsh
$ sudo sh -c "echo $(which zsh) >> /etc/shells"
$ chsh -s $(which zsh)

Install prezto. Refer to the following:

https://github.com/sorin-ionescu/prezto

Add convenient commands:

$ brew install autojump
$ brew install peco

Add the following to ~/.zshrc:

setopt auto_cd
function chpwd() { ls }
[[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh

function peco-history-selection() {
    BUFFER=`history -n 1 | tail -r  | awk '!a[$0]++' | peco`
    CURSOR=$#BUFFER
    zle reset-prompt
}

zle -N peco-history-selection
bindkey '^R' peco-history-selection

ref:

https://qiita.com/shepabashi/items/f2bc2be37a31df49bca5

Terminal

  • In Preferences -> Profiles -> Shell, set When the shell exits to Close the window.

iTerm2

  • $ brew cask install iterm2
  • In iTerm2 -> Preferences -> Profiles, set the following:
    • Window
      • Transparency: Middle
      • Style: Full-Width Top of Screen
    • Colors
      • Set Color Presets... to Pastel (the default is a black background with blue directories)
    • Keys
      • Check Hotkey window and uncheck Animate showing and hiding
  • Add iTerm to Setting -> Users & Groups -> Login Items

Finder

  • Show hidden files: $ defaults write com.apple.finder AppleShowAllFiles TRUE
  • Add /tmp to favorites
  • Remove unnecessary items from favorites

Git

Only set global settings:

$ git config --global user.name "Hoge hoge"
$ git config --global user.email [email protected]

Other Applications

Install the following applications. Settings are omitted:

Share