应用和插件

在 macOS 中安装应用的方式大概可以分为三类:

  1. Homebrew
  2. App Store(官方商城);
  3. 自行下载安装包;

个人偏好优先从 Homebrew 安装,除了部分工作需要,但又担心会滥用权限的应用除外(比如大部分国产应用);不过在安装 Homebrew 之前需要先安装 Xcode:

# 安装 Xcode comemand line tools,无需安装 Xcode
xcode-select --install

Homebrew

等 Xcode 安装完成后,便可以开始安装 Homebrew:

# 使用国内源安装 `Homebrew`
git clone --depth=1 https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/install.git brew-install
/bin/bash brew-install/install.sh
rm -rf brew-install

安装完成后,可以先更换源为国内的,速度更快:

# 自动设置国内源
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
for tap in core cask{,-fonts,-drivers,-versions} command-not-found; do
    brew tap --custom-remote --force-auto-update "homebrew/${tap}" "https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-${tap}.git"
done
brew update
 
 
$ cd "$(brew --repo)"
$ git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
 
# 替换homebrew-core.git
$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
$ git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

开始安装需要的软件:

终端

brew install tmux nvim bat  neofetch  powerlevel10k  trash e2fsprogs trash

cask

brew cask install iterm2 dropbox iina hammerspoon karabiner-elements visual-studio-code

App Store

安装顺序

  1. homebrew
  2. iterm
  3. ohmyzsh
  4. p10k

TABLE status, description, tags, file.type
FROM "docs/apps"
SORT end

参考