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

Mac Setup Memo

だいたい8分で読めます

I set up my Mac. As I'll likely do it again soon, I'm leaving a memo. While it's mostly personal and may not be very helpful, I'm publishing it anyway.

System

First, open App Store and update the system

Language & Region

Set to US English only

Display

  • Choose Scaled under Resolution and set to maximum (if you often connect to a display, smaller might be fine)
  • 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

  • Whether to do this with Karabiner is a matter of preference

    • Uncheck Shortcuts → Input Sources (to free up Ctrl+Space)
    • Set key repeat with command. Reflects after logout
$ 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

  • Size: Make it smaller
  • Position to right
  • Remove unnecessary default icons

Taskbar

  • Right-click the power icon, Show Percentage

Applications

Browser

Install Chrome using Safari. Install Firefox if needed

Input/Output

Install Google Japanese Input. Then, in Show keyboard settings, leave only these:

  • U.S.
  • Hiragana (Google)

Keyboard

Install Karabiner Elements and assign left and right command keys to switch. For details, refer to the article below

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

brew

To install apps, first install brew. Refer to the official site

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 useful 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

  • Preferences -> Profiles -> Shell -> Set When the shell exits to Close the window

iTerm2

  • $ brew cask install iterm2
  • Adjust settings in iTerm2 -> Preferences -> Profiles
    • Window
      • Transparency: Around the middle
      • Style: Full-Width Top of Screen
    • Colors
      • Set Color Presets... to Pastel (default is blue directories on black background)
    • Keys
      • Hotkey window: check A hotkey ...
      • 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

Just global setting

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

Other applications

Install the following. Settings omitted

Share