Macのセットアップメモ

2018-05-08

Macのセットアップをしました。また近いうちにやることになりそうですので、メモを残しておきます。 個人的なものが多く、あまり参考にはならないかと思いますが、一応公開します。

システム

まずは App Store を開いてシステムアップデート

Language & Region

US English のみにする

Display

  • Resolution でScaledを選び、最大に (ディスプレイに繋ぐことが多いなら小さくても良い)
  • Night Shift をSunset to Sunrise

Trackpad

Tap to click をチェック

keyboard

  • Use F1, F2... をチェック

  • modifier keysCaps LockControl

  • Karabinerでやるかは好みで

    • Shortcuts → Input Sources でチェックを外す(Ctrl+Spaceを解放する)
    • キーリピートはコマンドで。ログアウト後反映
$ defaults write -g KeyRepeat -int 2
$ defaults write -g InitialKeyRepeat -int 15

Text

チェックを外す

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

Dock

  • Size: 小さめにする
  • 位置を右に
  • デフォルトの要らないアイコンを消す

Taskbar

  • 電源アイコンを右クリック、 Show Percentage

アプリケーション

ブラウザ

Safariを使ってChromeをインストール。必要に応じてFirefoxも入れる

入出力

Google日本語入力を入れる。その後、 Show keyboard settings で下記だけ残す

  • U.S.
  • Hiragana (Google)

キーボード

Karabiner Elementsを入れて左右コマンドを切り替えに割り当て。詳しくは下記記事を参照

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

brew

アプリを入れるため、まずはbrewを入れる。公式サイト参照

https://brew.sh

zsh

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

preztoを入れる。下記参照

便利なコマンドを追加

$ brew install autojump
$ brew install peco

↓を ~/.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 -> When the shell exitsClose the window にする

iTerm2

  • $ brew cask install iterm2
  • iTerm2 -> Preferences -> Profiles の設定をいじる
    • Window
      • Transparency: 真ん中らへん
      • Style: Full-Width Top of Screen
    • Colors
      • Color Presets… をPastelに (デフォルトでは黒背景にディレクトリが青なので)
    • Keys
      • Hotkey window: check A hotkey ...
      • uncheck: Animate showing and hiding
  • Setting -> Users & Groups -> Login Items にiTermを追加

Finder

  • 隠しファイルを表示 $ defaults write com.apple.finder AppleShowAllFiles TRUE
  • /tmp をお気に入りに追加
  • お気に入りからいらないものを削除

Git

global settingだけ

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

その他のアプリ

下記をインストール。設定略

development

Docker Multistage Buildのユースケース

渋谷三丁目付近のランチ おすすめ(や変な)店・レビュー

comments powered by Disqus