个人 macOS 配置文件备份仓库。
.zshrc- Zsh 主配置文件.p10k.zsh- Powerlevel10k 主题配置
Default.json- iTerm2 Profile 配置(颜色、字体、快捷键等)iTerm2 State.itermexport- iTerm2 完整配置导出
git clone https://github.com/YOUR_USERNAME/dotfiles.git ~/dotfiles
cd ~/dotfileschmod +x install.sh
./install.shsh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k# zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting# 备份现有配置
cp ~/.zshrc ~/.zshrc.backup
cp ~/.p10k.zsh ~/.p10k.zsh.backup 2>/dev/null
# 复制新配置
cp zsh/.zshrc ~/
cp zsh/.p10k.zsh ~/方式 1:导入完整配置(推荐)
- 打开 iTerm2
Preferences → General → Preferences- 点击
Load preferences from a custom folder or URL - 选择
iterm2文件夹 - 重启 iTerm2
方式 2:仅导入 Profile
- 打开 iTerm2
Preferences → Profiles- 点击左下角的
Other Actions → Import JSON Profiles - 选择
iterm2/Default.json
source ~/.zshrc- ✨ Powerlevel10k 主题 - 美观快速的提示符
- 🔍 zsh-autosuggestions - 命令自动建议
- 🎯 zsh-syntax-highlighting - 语法高亮
- 📂 z - 快速目录跳转
- 🌐 代理快速切换(proxy/unproxy 命令)
- 🎨 优化的颜色方案
- 📊 状态栏配置
- ⌨️ 自定义快捷键
- 🪟 窗口样式和行为设置
备份当前配置到仓库:
cd ~/dotfiles
# 更新 Zsh 配置
cp ~/.zshrc zsh/
cp ~/.p10k.zsh zsh/
# 重新导出 iTerm2 配置(如需要)
# iTerm2: Preferences → Profiles → Other Actions → Save Profile as JSON
# 提交
git add .
git commit -m "Update configs"
git push