# 从头开始配置 Mac 流程指南

## 1. 配置终端 VPN

下载一个 VPN，根据 proxy 端口写入 `~/.zshrc`，配置终端 VPN（不使用 VPN 可能会影响部分软件的下载和使用）。

```bash
echo "alias proxy_off='unset http_proxy; unset https_proxy; unset all_proxy'" >> ~/.zshrc
echo "alias proxy_on='export https_proxy=http://127.0.0.1:[your port];export http_proxy=http://127.0.0.1:[your port];export all_proxy=socks5://127.0.0.1:[your port]'" >> ~/.zshrc
source ~/.zshrc
proxy_on
```

## 2. 安装 Homebrew

```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# 添加 homebrew 到 $PATH
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
source ~/.zprofile
```

## 3. 配置 Git

```bash
# 这是 git 记录你做的更改时用的名字和邮件
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
# 默认编辑器
git config --global core.editor [your editor]
# 默认 branch 名
git config --global init.defaultBranch main

# 查看所有配置
git config --list
```

## 4. 安装 NeoVim 与 LazyVim

> **注**：这里不使用 Vim 编辑代码，而是用来编辑一些配置文档。

```bash
# 下载 neovim
brew install neovim
# 配置 lazyvim
git clone https://github.com/LazyVim/starter ~/.config/nvim
rm -rf ~/.config/nvim/.git
```

## 5. Wezterm 及其配置、优化与美化

### 下载 Wezterm 与创建配置文件

```bash
# 下载 Wezterm
brew install --cask wezterm
# 创建配置文件，Wezterm 的配置文件按照官方推荐放置在 `~/.config/wezterm/wezterm.lua`
# 一些其他教程也会放在 `~/.wezterm.lua`
mkdir ~/.config/wezterm
touch ~/.config/wezterm/wezterm.lua
```

### 安装 Nerd 字体

在配置之前，首先下载在 Wezterm 中想要的字体。你可以浏览 [Nerd Fonts Gallery](https://www.nerdfonts.com/font-downloads) 选择，然后通过 Homebrew 下载。以 `FiraMono Nerd Font` 为例：

```bash
# 先找到字体对应包的名称
brew search fira
# 选择想要的字体下载
brew install font-fira-mono-nerd-font

# 然后用你的编辑器打开配置文件（此处使用 NeoVim）
nvim ~/.config/wezterm/wezterm.lua
```

### 写入 Wezterm 配置文件

```lua
-- This config strongly refers to Josean Martinez's
-- You can find the tutorial video on https://www.youtube.com/watch?v=TTgQV21X0SQ
-- Here is his even more detailed blog: https://www.josean.com/posts/how-to-setup-wezterm-terminal
local wezterm = require("wezterm")
local config = wezterm.config_builder()

config.automatically_reload_config = true
config.window_close_confirmation = "NeverPrompt"
config.window_decorations = "RESIZE"
config.enable_tab_bar = true
config.default_cursor_style = "BlinkingBar"
config.color_scheme = "Nord (Gogh)"
config.font_size = 24
config.font = wezterm.font("[Your Font Here]", { weight = "Regular", stretch = "Normal", style = "Normal" })

config.background = {
	{
		source = {
			File = wezterm.home_dir .. "[path to your background image]",
		},
		hsb = {
			hue = 1.0,
			saturation = 1.02,
			brightness = 0.25,
		},
	},
	{
		source = {
			Color = "#282c35",
		},
		opacity = 0.55,
	},
}

config.window_padding = {
	top = 0,
	bottom = 0,
	left = 3,
	right = 3,
}

config.default_prog = { "/bin/zsh", "-l" }

config.enable_scroll_bar = true
config.scrollback_lines = 10000

config.harfbuzz_features = { "calt=0", "clig=0", "liga=0" }

config.adjust_window_size_when_changing_font_size = false
config.font_size = 14.0

config.inactive_pane_hsb = {
	saturation = 0.9,
	brightness = 0.7,
}

# 快捷键设置
config.keys = {
	{ key = "v", mods = "CTRL|SHIFT", action = wezterm.action.PasteFrom("Clipboard") }, -- copy
	{ key = "c", mods = "CTRL|SHIFT", action = wezterm.action.CopyTo("Clipboard") }, -- paste
	{ key = "Enter", mods = "ALT", action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }) }, -- horizontal split
	{ key = "Enter", mods = "CTRL|ALT", action = wezterm.action.SplitVertical({ domain = "CurrentPaneDomain" }) }, -- vertical split
	{ key = "h", mods = "CTRL|ALT", action = wezterm.action.ActivatePaneDirection("Left") }, -- activate left window
	{ key = "l", mods = "CTRL|ALT", action = wezterm.action.ActivatePaneDirection("Right") }, -- activate right window
	{ key = "k", mods = "CTRL|ALT", action = wezterm.action.ActivatePaneDirection("Up") }, -- activate upper window
	{ key = "j", mods = "CTRL|ALT", action = wezterm.action.ActivatePaneDirection("Down") }, -- activate bottom window
	{ key = "n", mods = "CTRL|SHIFT", action = wezterm.action.SpawnTab("CurrentPaneDomain") }, -- open new tab
	{ key = "Tab", mods = "CTRL", action = wezterm.action.ActivateTabRelative(1) }, -- activate tab left
	{ key = "Tab", mods = "CTRL|SHIFT", action = wezterm.action.ActivateTabRelative(-1) }, -- activate tab right
	{ key = "x", mods = "CTRL|SHIFT", action = wezterm.action.CloseCurrentPane({ confirm = false }) }, -- close current tab
}

config.initial_cols = 120
config.initial_rows = 32

return config
```

### 终端主题美化 (Starship)

使用 [Starship](https://starship.rs/) 美化终端主题，此处选择 [Gruvbox Rainbow Preset](https://starship.rs/presets/gruvbox-rainbow)。

```bash
# 先下载 starship
brew install starship
# 将 starship 配置到终端
echo "# starship" >> ~/.zshrc
echo 'eval "$(starship init zsh)"' >> ~/.zshrc
source ~/.zshrc
# 按照网站预设的指引安装配置文件
starship preset gruvbox-rainbow -o ~/.config/starship.toml
```

### 终端体验增强插件

```bash
# 自动建议
brew install zsh-autosuggestions
echo "source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
source ~/.zshrc

# 语法高亮
brew install zsh-syntax-highlighting
echo "source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
source ~/.zshrc

# 增强补全
brew install zsh-completions
# 需要将下面这段脚本写入 `~/.zshrc`
# if type brew &>/dev/null; then
#   FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
#   autoload -Uz compinit
#   compinit
# fi
source ~/.zshrc
rm -f ~/.zcompdump; compinit

# eza：更好的 ls
brew install eza
# Optional：用 eza 替代 ls
# echo "# Eza: replace ls with eza" >> ~/.zshrc
# echo "alias ls='eza --icons=always --oneline --grid'" >> ~/.zshrc

# zoxide：更好的 cd
brew install zoxide
# zoxide 同时依赖 fzf，因此也需要下载
brew install fzf
# 添加 fzf 的补全功能
source <(fzf --zsh)
# Optional: 默认的 zoxide 使用命令 z，如果你想完全替代 cd，运行下面的代码
# echo 'eval "$(zoxide init zsh --cmd cd)"' >> ~/.zshrc
# source ~/.zshrc

# bat：更好的 cat
brew install bat
# Optional: 用 bat 代替 cat
# echo "# bat: better cat\nalias cat='bat'\n" >> ~/.zshrc

# ripgrep：现代化的 grep
brew install ripgrep
# 由于 ripgrep 和原生 grep 参数差异较大，因此单独 alias 而不是直接替代
# 而且 rg 比 grep 更好输入

# fd：现代化的 find
brew install fd
```

## 6. 使用 `GNU Stow` 统一管理配置文件

```bash
brew install stow
mkdir -p ~/.dotfiles
```

将现有配置移动到 `~/.dotfiles` 目录下：

```bash
mkdir -p ~/.dotfiles/zsh
mv ~/.zshrc ~/.dotfiles/zsh/

mkdir -p ~/.dotfiles/git
mv ~/.gitconfig ~/.dotfiles/git/

mkdir -p ~/.dotfiles/nvim/.config
mv ~/.config/nvim ~/.dotfiles/nvim/.config/

mkdir -p ~/.dotfiles/wezterm/.config
mv ~/.config/wezterm ~/.dotfiles/wezterm/.config/

mkdir -p ~/.dotfiles/starship/.config
mv ~/.config/starship.toml ~/.dotfiles/starship/.config/
```

使用 stow 命令创建软链接：

```bash
# 显示传入 -d：原配置文件地址 和 -t：目标目录 来构建配置文件
stow -d ~/.dotfiles -t ~ git nvim wezterm starship zsh
# 之后不需要某一个配置文件后，执行 `stow -D sth` 即可
# 如果配置有更新，可以直接对两处的文件进行修改
# 这是因为 Stow 建立的是软链接，构建的 `~/.zshrc` 实际上是指向 `~/.dotfiles/zsh` 的一个`快捷方式`
```

## 7. 配置编程环境

### Python for Data Science (Miniforge)

使用开源社区维护的 `Miniforge` 配置 AI 相关工作流。

```bash
# 使用 Homebrew 下载
brew install --cask miniforge
# Conda 默认会在每次打开终端时自动激活 (base) 的环境，这会拖慢终端启动速度并污染全局环境变量
# 接下来我们会关闭这个设置
conda init zsh
conda config --set auto_activate false
# 创建基础的 Data Science Python 环境
conda create -n ds-base-py311 python=3.11 pandas numpy matplotlib jupyterlab
```

### 其他开发环境：Python, Node.js, Golang (mise)

使用 `mise` 统一管理不同语言版本。

```bash
# 使用 homebrew 安装 mise
brew install mise
# 配置 mise 到 zsh
echo '# mise\neval "$(mise activate zsh)"' >> ~/.zshrc
source ~/.zshrc

# Node.js
mise use --global node@20
node -v
npm -v

# Golang
mise use --global go@latest
# 额外配置 go 语言以适配方便的依赖下载
echo '# Golang\nexport PATH="$HOME/go/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
go version

# Python
mise use --global python@3.12 python@3.11
```

## 8. VS Code 配置

### 安装与应用 Stow 管理

```bash
brew install --cask visual-studio-code
# 使用 stow 来管理 VS Code 的配置
mkdir -p ~/.dotfiles/vscode/Library/Application\ Support/Code/User
cd ~/.dotfiles/vscode/Library/Application\ Support/Code/User
touch settings.json keybindings.json
mkdir snippets/
# 在 VS Code 自动生成配置文件前，使用 stow 链接。如果已生成需先删除：
# rm -rf ~/Library/Application\ Support/Code/User/settings.json
# rm -rf ~/Library/Application\ Support/Code/User/keybindings.json
stow -d ~/.dotfiles -t ~ vscode
```

### 插件管理脚本

```bash
touch ~/.dotfiles/vscode/extensions.txt
touch ~/.dotfiles/install_vscode_extensions.sh
# 将脚本转换为可执行状态
chmod +x ~/.dotfiles/install_vscode_extensions.sh
```

`~/.dotfiles/vscode/extensions.txt` 插件清单：

```plaintext
# theme
catppuccin.catppuccin-vsc
catppuccin.catppuccin-vsc-icons

# general
esbenp.prettier-vscode
usernamehw.errorlens
eamodio.gitlens
ms-vscode-remote.remote-ssh
mushan.vscode-paste-image
drcika.apc-extension

# appearence
mechatroner.rainbow-csv

# python
ms-python.python
ms-toolsai.jupyter
charliermarsh.ruff

# golang
golang.go

# latex
james-yu.latex-workshop

# astro
astro-build.astro-vscode
bradlc.vscode-tailwindcss

# markdown
yzhang.markdown-all-in-one

# markdoc
stripe.markdoc-language-support

# html
formulahendry.auto-rename-tag
```

`~/.dotfiles/install_vscode_extensions.sh` 脚本内容：

```bash
#!/bin/bash
echo "Installing VS Code extensions..."
cat ~/.dotfiles/vscode/extensions.txt | grep -v '^#' | xargs -L 1 code --install-extension
echo "Extensions all installed."
```

运行脚本下载插件：

```bash
bash ~/.dotfiles/install_vscode_extensions.sh
```

### 核心配置文件 (settings.json)

编辑 `~/.dotfiles/vscode/Library/Application Support/Code/User/settings.json`：

```json
{
  // ==========================================
  // Theme & Appearance
  // ==========================================
  "workbench.colorTheme": "Catppuccin Frappé",
  "workbench.iconTheme": "catppuccin-vsc-icons",
  "catppuccin-icons.associations.languages": {
    "typescriptreact": "typescript-react",
  },
  "catppuccin-icons.associations.extensions": {
    "spec.ts": "typescript-test",
  },
  "catppuccin-icons.associations.files": {
    "vite.config.ts": "vite",
  },
  "catppuccin-icons.associations.folders": {
    "typings": "folder_types",
  },
  "editor.fontFamily": "'Fira Code', 'Jetbrains Mono', monospace",
  "editor.fontLigatures": true,
  "editor.fontSize": 20,
  "editor.lineHeight": 1.5,
  "terminal.integrated.fontFamily": "'FiraCode Nerd Font', 'Jetbrains Mono', monospace",
  "apc.font.family": "Fira Code, JetBrains Mono, monospace", 
  "apc.parts.font.family": {
    "sidebar": "Fira Code",
    "titlebar": "Fira Code"
  },
  "apc.listRow": {
    "fontSize": 15,
    "height": 26
  },

  // ==========================================
  // Editor Core
  // ==========================================
  "editor.formatOnSave": true,
  "editor.wordWrap": "on",
  "files.autoSave": "onFocusChange",
  "editor.bracketPairColorization.enabled": true,
  "editor.guides.bracketPairs": "active",
  "editor.minimap.enabled": false,

  // ==========================================
  // Python
  // ==========================================
  "[python]": {
    "editor.defaultFormatter": "charliermarsh.ruff",
    "editor.codeActionsOnSave": {
      "source.organizeImports": "explicit",
    },
  },
  "jupyter.alwaysTrustNotebooks": true,

  // ==========================================
  // Golang
  // ==========================================
  "[go]": {
    "editor.defaultFormatter": "golang.go",
    "editor.codeActionsOnSave": {
      "source.organizeImports": "explicit",
    },
  },
  "gopls": {
    "formatting.gofumpt": true,
  },

  // ==========================================
  // Astro, HTML & Prettier
  // ==========================================
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "[astro]": {
    "editor.defaultFormatter": "astro-build.astro-vscode",
  },
  "tailwindCSS.emmetCompletions": true,
  "tailwindCSS.includeLanguages": {
    "astro": "html",
  },

  // ==========================================
  // Markdown
  // ==========================================
  "[markdown]": {
    "editor.defaultFormatter": "yzhang.markdown-all-in-one",
  },
  "files.associations": {
    "*.mdoc": "mdx",
  },
  // ==========================================
  // Markdoc
  // ==========================================
  "files.associations": {
    "*.mdoc": "markdoc"
  },
  // ==========================================
  // Latex Workshop
  // ==========================================
  "latex-workshop.latex.autoBuild.run": "onSave",
  "latex-workshop.view.pdf.viewer": "tab",
  "latex-workshop.latex.tools": [
    {
      "name": "latexmk",
      "command": "latexmk",
      "args": [
        "-synctex=1",
        "-interaction=nonstopmode",
        "-file-line-error",
        "-pdf",
        "-outdir=%OUTDIR%",
        "%DOC%",
      ],
    },
    {
      "name": "xelatex",
      "command": "xelatex",
      "args": [
        "-synctex=1",
        "-interaction=nonstopmode",
        "-file-line-error",
        "%DOC%",
      ],
    },
    {
      "name": "bibtex",
      "command": "bibtex",
      "args": ["%DOCFILE%"],
    },
  ],
  "latex-workshop.latex.recipes": [
    {
      "name": "latexmk 🔃",
      "tools": ["latexmk"],
    },
    {
      "name": "xelatex -> bibtex -> xelatex*2",
      "tools": ["xelatex", "bibtex", "xelatex", "xelatex"],
    },
  ],
  "latex-workshop.latex.clean.fileTypes": [
    "*.aux",
    "*.bbl",
    "*.blg",
    "*.idx",
    "*.ind",
    "*.lof",
    "*.lot",
    "*.out",
    "*.toc",
    "*.acn",
    "*.acr",
    "*.alg",
    "*.glg",
    "*.glo",
    "*.gls",
    "*.ist",
    "*.fls",
    "*.log",
    "*.fdb_latexmk",
    "*.synctex.gz",
  ],
  "latex-workshop.latex.autoClean.run": "onBuilt",

  // ==========================================
  // Other Extensions
  // ==========================================

  // ErrorLens
  "errorLens.delay": 300,
  "errorLens.fontStyleItalic": true,

  // Paste Image
  "pasteImage.path": "${documentWorkspaceFolder}/.assets/images/${documentBaseName}",
  "pasteImage.prefix": "/",

  // Auto Rename Tag
  "auto-rename-tag.activationOnLanguage": ["html", "xml", "astro"],
  "security.workspace.trust.untrustedFiles": "open",
  "workbench.startupEditor": "none",
}
```

## 9. 窗口管理：`Aerospace`

使用 [`Aerospace`](https://www.google.com/search?q=[https://github.com/nikitabobko/AeroSpace](https://github.com/nikitabobko/AeroSpace)) 管理所有窗口，避免修改 MacOS 底层设置（替代方案如 yabai）。

### 安装与创建配置

```bash
brew install --cask nikitabobko/tap/aerospace

mkdir -p ~/.dotfiles/aerospace/.config/aerospace
touch ~/.dotfiles/aerospace/.config/aerospace/aerospace.toml
```

### 写入 `aerospace.toml`

```toml
# This config file refers to Josean Martinez
# His Youtube channel has a video on the setup of aerospace at https://www.youtube.com/watch?v=-FoWClVHG5g
# And also a detailed blog at: https://www.josean.com/posts/how-to-setup-aerospace-tiling-window-manager

after-login-command = []
after-startup-command = []
start-at-login = true 

# Normalizations
enable-normalization-flatten-containers = true
enable-normalization-opposite-orientation-for-nested-containers = true

accordion-padding = 30
default-root-container-layout = 'tiles'
default-root-container-orientation = 'auto'

key-mapping.preset = 'qwerty'

on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
on-focus-changed = "move-mouse window-lazy-center"

[gaps]
inner.horizontal = 10
inner.vertical =   10
outer.left =       10
outer.bottom =     10
outer.top =        10
outer.right =      10

[mode.main.binding]

alt-slash = 'layout tiles horizontal vertical'
alt-comma = 'layout accordion horizontal vertical'

alt-h = 'focus left'
alt-j = 'focus down'
alt-k = 'focus up'
alt-l = 'focus right'

alt-shift-h = 'move left'
alt-shift-j = 'move down'
alt-shift-k = 'move up'
alt-shift-l = 'move right'

alt-shift-minus = 'resize smart -50'
alt-shift-equal = 'resize smart +50'

alt-1 = 'workspace 1'
alt-2 = 'workspace 2'
alt-3 = 'workspace 3'
alt-4 = 'workspace 4'
alt-5 = 'workspace 5'
alt-6 = 'workspace 6'
alt-7 = 'workspace 7'
alt-8 = 'workspace 8'
alt-9 = 'workspace 9'
alt-m = 'workspace m'
alt-n = 'workspace n'
alt-w = 'workspace w'
alt-a = 'workspace a'
alt-s = 'workspace s'
alt-p = 'workspace p'
alt-g = 'workspace g'

alt-shift-1 = 'move-node-to-workspace 1'
alt-shift-2 = 'move-node-to-workspace 2'
alt-shift-3 = 'move-node-to-workspace 3'
alt-shift-4 = 'move-node-to-workspace 4'
alt-shift-5 = 'move-node-to-workspace 5'
alt-shift-6 = 'move-node-to-workspace 6'
alt-shift-7 = 'move-node-to-workspace 7'
alt-shift-8 = 'move-node-to-workspace 8'
alt-shift-9 = 'move-node-to-workspace 9'
alt-shift-m = 'move-node-to-workspace m' # m for music
alt-shift-n = 'move-node-to-workspace n' # n for notes
alt-shift-w = 'move-node-to-workspace w' # w specially for Wezterm
alt-shift-a = 'move-node-to-workspace a' # a specially for Arc
alt-shift-s = 'move-node-to-workspace s' # s specially for Safari
alt-shift-p = 'move-node-to-workspace p' # p for personal stuff
alt-shift-g = 'move-node-to-workspace g' # g specially for Google Chrome

alt-shift-f = 'fullscreen'
alt-tab = 'workspace-back-and-forth'
alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
alt-shift-semicolon = 'mode service'

[mode.service.binding]
esc = ['reload-config', 'mode main']
r = ['flatten-workspace-tree', 'mode main']
f = ['layout floating tiling', 'mode main']
backspace = ['close-all-windows-but-current', 'mode main']

alt-shift-h = ['join-with left', 'mode main']
alt-shift-j = ['join-with down', 'mode main']
alt-shift-k = ['join-with up', 'mode main']
alt-shift-l = ['join-with right', 'mode main']
```

### 基本操作指南

- `option + [key]`：切换到 `workspace [key]`
- `shift + option + [key]`：将当前窗口移动到 `workspace [key]`
- `option + /` 或 `option + ,`：在当前 workspace 内平铺 / 堆叠放置窗口
- `option + h/j/k/l`：聚焦左 / 下 / 上 / 右的窗口
- `shift + option + h/j/k/l`：将当前窗口与左 / 下 / 上 / 右的窗口对调
- `option + shift + ;`：切换到选择模式
  - `esc`：退出选择模式（重新加载配置）
  - `f`：将当前窗口切换至浮动模式 / 默认模式
  - `backspace`：关闭本 worksapce 内除聚焦窗口外的其他窗口
  - `shift + option + h/j/k/l`：将当前窗口与侧边窗口融合（可用于四格式页面布局）

## 10. 全局启动器：Raycast

使用 Raycast 替代苹果自带的 Spotlight 用作启动各种软件的唯一入口。

**初始设置：**

1. 取消 MacOS 自带 Spotlight 的快捷键 `command+space`。
2. 隐藏 Docker 栏（为 Aerospace 提供更多空间）。

**浏览器 Quicklinks 配置：**

- Bilibili: `https://search.bilibili.com?keyword={argument name="Argument"}`
- Github: `https://github.com/search?q={argument name="Argument"}`
- Google: `https://google.com/search?q={argument}`
- Youtube: `https://www.youtube.com/results?search_query={argument name="Argument"}`
- 谷歌翻译为中文：`https://translate.google.com/?sl=auto&tl=zh-CN&text={argument}&op=translate`
- 谷歌翻译为英文：`https://translate.google.com/?sl=auto&tl=en&text={argument}&op=translate`

**推荐 Raycast 插件：**

- VS Code
- Color Picker
- Kill Process

## 11. LaTeX 环境配置

```bash
brew install --cask mactex
# 根据提示，完成配置
eval "$(/usr/libexec/path_helper)"
```

如果已经在 VS Code 中下载了 `Latex Workshop` 插件，按下 `cmd+shift+p` 打开 JSON 设置，确保包含如下配置（也可参考第 8 步的完整 JSON）：

```json
 {
	// ==========================================
  // Latex Workshop
  // ==========================================
  "latex-workshop.latex.autoBuild.run": "onSave",
  "latex-workshop.view.pdf.viewer": "tab",
  "latex-workshop.latex.tools": [ ... ],
  "latex-workshop.latex.recipes": [ ... ],
  "latex-workshop.latex.clean.fileTypes": [ ... ],
  "latex-workshop.latex.autoClean.run": "onBuilt"
 }
```

## 12. CLI 工具与其他软件补齐

### 使用 Brewfile 一键安装

创建一个 `Brewfile`，使用 `brew bundle` 一键下载剩余软件和工具。

```bash
nvim ~/.dotfiles/Brewfile
```

写入你想下载的软件清单：

```Plaintext
# ----------------------------------------
# Developer Tools
# ----------------------------------------
cask "cursor"
cask "pycharm"

# ----------------------------------------
# AI Tools
# ----------------------------------------
cask "chatgpt"
cask "lm-studio"
cask "ollama-app"

# ----------------------------------------
# Productivity
# ----------------------------------------
cask "arc"
cask "coteditor"
cask "google-chrome"
cask "google-drive"
cask "notion"
cask "obsidian"
cask "updf"
cask "zotero"

# ----------------------------------------
# Media & Design
# ----------------------------------------
cask "handbrake-app"
cask "iina"
cask "obs"
cask "qview"

# ----------------------------------------
# Social & Comm
# ----------------------------------------
cask "neteasemusic"
cask "qq"
cask "tencent-meeting"

# ----------------------------------------
# Utilities & Network
# ----------------------------------------
cask "appcleaner"
cask "battery-buddy"
cask "keepingyouawake"
cask "mos"
cask "tailscale-app"
cask "the-unarchiver"

# ----------------------------------------
# CLI Tools
# ----------------------------------------
brew "jq"
brew "tldr"
brew "yt-dlp"
brew "btop"
```

执行一键下载：

```bash
cd ~/.dotfiles
brew bundle
```

### App Store 补充下载

- `WeChat` / `QQ Music` (因为 brew 下载不够稳定)
- `Bob`：快速翻译
- `Run Cat`：在状态栏通过猫猫动画展示 CPU / 内存占用
- `Pure Paste`：实现无格式粘贴
- `MindNode`：思维导图制作

## 13. 浏览器核心插件

- `easyScholar`
- `Immersive Translate` (沉浸式翻译)
- `BewlyBewly`