Mac 設置

緣起

最近又遇到需要轉換開發環境 (Windows OS -> Mac OS)的情況。
再次整理出,如何讓兩者操作上盡量接近的方法。

Windows 版本可參考 Windows設置


Homebrew

對應到 Windows 的 Scoop。

Install Homebrew

1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install formulas

1
brew install git vim jq

Install casks

1
2
3
4
5
6
brew install --cask iterm2
brew install --cask raycast
brew install --cask karabiner-elements
brew install --cask macshot
brew install --cask font-meslo-lg-nerd-font
brew install --cask dbeaver-community

Karabiner-Elements

對應到 Windows 的 PowerToys 修改對應鍵的功能。

Before After Reason
Caps Lock F18 CapsLock 很少需要,但誤觸時會有點煩。
Cmd + T (Slack) Cmd + P 類似 IDE 中的開啟檔案功能
Cmd + E (Teams) Cmd + P 同上
Shift + Cmd + F (Rambox) Cmd + P 同上

karabiner.json

1
2
"from": { "key_code": "p", "modifiers": { "mandatory": ["command"] } },
"to": [{ "key_code": "t", "modifiers": ["command"] }]

Raycast

對應到 Windows 的 Wox。

1
brew install --cask raycast

macshot

對應到 Windows 的 Snipaste 與 ShareX。

1
brew install --cask macshot
  • 停用系統內建快捷鍵

System Settings -> Keyboard -> Keyboard Shortcuts -> Screenshots
取消勾選。

  • macshot 設定
Shortcut Usage
Shift + Cmd + 4 螢幕截圖
Shift + Cmd + 5 OCR 文字擷取

iTerm2

對應到 Windows 的 Windows PowerShell7。

1
brew install --cask iterm2
1
brew install --cask font-meslo-lg-nerd-font

裝完到 iTerm2 → Settings → Profiles → Text → Font 修改成 Meslo 的 Nerd Font。


ʕ •ᴥ•ʔ:這次也整理了相關的 settings,相信下次 migrate 到 mac 會更順利。

Share