Thanks to visit codestin.com
Credit goes to github.com

Skip to content

itsjoeyrighthere/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotfiles

个人 macOS 配置文件备份仓库。

alt text

📦 当前包含

Zsh 配置

  • .zshrc - Zsh 主配置文件
  • .p10k.zsh - Powerlevel10k 主题配置

iTerm2 配置

  • Default.json - iTerm2 Profile 配置(颜色、字体、快捷键等)
  • iTerm2 State.itermexport - iTerm2 完整配置导出

🚀 使用方法

克隆仓库

git clone https://github.com/YOUR_USERNAME/dotfiles.git ~/dotfiles
cd ~/dotfiles

自动安装

chmod +x install.sh
./install.sh

手动安装

1. 安装 Oh My Zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

2. 安装 Powerlevel10k 主题

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

3. 安装 Zsh 插件

# 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

4. 复制配置文件

# 备份现有配置
cp ~/.zshrc ~/.zshrc.backup
cp ~/.p10k.zsh ~/.p10k.zsh.backup 2>/dev/null

# 复制新配置
cp zsh/.zshrc ~/
cp zsh/.p10k.zsh ~/

5. 导入 iTerm2 配置

方式 1:导入完整配置(推荐)

  1. 打开 iTerm2
  2. Preferences → General → Preferences
  3. 点击 Load preferences from a custom folder or URL
  4. 选择 iterm2 文件夹
  5. 重启 iTerm2

方式 2:仅导入 Profile

  1. 打开 iTerm2
  2. Preferences → Profiles
  3. 点击左下角的 Other Actions → Import JSON Profiles
  4. 选择 iterm2/Default.json

6. 重启终端

source ~/.zshrc

🎨 功能特性

Zsh 配置

  • ✨ Powerlevel10k 主题 - 美观快速的提示符
  • 🔍 zsh-autosuggestions - 命令自动建议
  • 🎯 zsh-syntax-highlighting - 语法高亮
  • 📂 z - 快速目录跳转
  • 🌐 代理快速切换(proxy/unproxy 命令)

iTerm2 配置

  • 🎨 优化的颜色方案
  • 📊 状态栏配置
  • ⌨️ 自定义快捷键
  • 🪟 窗口样式和行为设置

🔄 同步配置

备份当前配置到仓库:

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

About

个人 macOS 配置文件备份仓库

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages