ぷるぷるした直方体

エンジニアの雑記です。My opinions are my ownというやつです

Macのセットアップメモ

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を入れて左右コマンドを切り替えに割り当て。詳しくは下記記事を参照

beadored.com

brew

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

brew.sh

zsh

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

preztoを入れる。下記参照

github.com

便利なコマンドを追加

$ 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:

qiita.com

ターミナル関連

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 hoge@users.noreply.github.com

その他のアプリ

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