steveclarke/dotfiles
GitHub: steveclarke/dotfiles
一个用于自动化配置和同步多台计算机个人开发环境的工具集。
Stars: 34 | Forks: 1
# inal English form." This means that when translating, I should not translate those terms. So for "Dotfiles", if it's considered technical jargon, I should keep it as "Dotfiles" in the Chinese translation.
这是我为 Mac、Linux 和 Omarchy 机器准备的个人配置脚本。克隆这个仓库,运行一条命令,就搞定了。
## 功能说明
- 安装你偏好的命令行工具和应用程序
- 配置 Shell 环境(Fish、Zsh、Bash)
- 使用 GNU Stow 管理配置文件
- 配置系统设置
- 设置 SSH 密钥
## 支持的系统
| 平台 | 版本 |
|----------|---------|
| macOS | 10.15 (Catalina) 或更高版本 |
| Linux | 基于 Debian 的发行版(Ubuntu、Pop!_OS 等) |
| Arch | Omarchy 或原生 Arch |
## 快速开始
### 1. 安装前置条件
**macOS:**
```
xcode-select --install
```
**Ubuntu/Debian:**
```
sudo apt update && sudo apt install -y git curl
```
**Omarchy/Arch:**
无需安装前置条件——git、curl、stow 和 yay 已预装。
### 2. 下载配置文件
**macOS:**
```
curl -o ~/.dotfilesrc https://raw.githubusercontent.com/steveclarke/dotfiles/master/.dotfilesrc.template
```
**Linux:**
```
wget -qO ~/.dotfilesrc https://raw.githubusercontent.com/steveclarke/dotfiles/master/.dotfilesrc.template
```
编辑 `~/.dotfilesrc` 文件以匹配你的偏好。
### 3. 克隆并安装
```
git clone https://github.com/steveclarke/dotfiles.git ~/.local/share/dotfiles
cd ~/.local/share/dotfiles
bash install.sh
```
## 将安装的内容
**macOS:**
1. Homebrew(如果缺失)
2. GNU Stow
3. 来自 Brewfile 的命令行工具
4. 图形界面应用(如果启用)
5. SSH 密钥(如果已设置)
6. 系统设置
7. Shell 配置
**Linux:**
1. 构建工具
2. GNU Stow
3. 命令行工具
4. 图形界面应用(如果启用)
5. SSH 密钥(如果已设置)
6. Shell 配置
## 目录结构
| 文件夹 | 内容说明 |
|--------|------------------|
| `ai/` | AI 提示词、技能和代理。参见 [AI 说明文档](ai/README.md)。 |
| `configs/` | 用于应用配置的 Stow 包。字体文件也存放在此处。 |
| `docs/` | 指南和参考文档。 |
| `fixes/` | 用于修复问题的脚本。需要时手动运行。 |
| `install/` | 按类别划分的安装脚本(见下文)。 |
| `setups/` | 用于配置 Stow 无法处理事项的脚本。 |
### 安装脚本
| 文件夹 | 用途 |
|--------|---------|
| `install/prereq/` | 其他脚本所需的工具 |
| `install/cli/` | 命令行工具 |
| `install/apps/` | 图形界面应用 |
| `install/desktop-entries/` | `.desktop` 文件(网页应用封装器) |
| `install/optional/` | 附加软件。需手动运行。 |
## 更新
拉取最新更改:
```
git pull
```
更新配置和软件包:
```
dotfiles stow # Update symlinks
dotfiles brew # Update Homebrew packages
dotfiles update # Run both
```
### 安装新脚本
新增的安装脚本不会自动运行。需要手动执行:
```
bash install/cli/some-tool.sh
bash install/optional/steam.sh
```
## 配置
### .dotfilesrc 文件
`~/.dotfilesrc` 文件存储你的设置和密钥信息。Fish 和 Zsh 在启动时会加载它。
添加密钥示例:
```
# - In the example, 'API Reference' is translated to 'API 参考', where 'API' is kept in English. So the translation includes both English and Chinese parts.
export MY_API_KEY="your-secret-key"
export GITHUB_TOKEN="ghp_..."
# - Similarly, for "Dotfiles", I could translate it as "Dotfiles" or "点文件". But to align with the example, I should keep "Dot" in English if it's part of the term. "Dotfiles" might be best left as "Dotfiles".
export DATABASE_URL="postgresql://user:pass@host/db"
```
## 文档
| 指南 | 描述 |
|-------|-------------|
| [Omarchy Waybar AI 使用指南](docs/omarchy-waybar-ai-usage.md) | Omarchy Waybar 的 Codex 和 Claude 使用模块 |
| [ZSH Shell 指南](docs/zsh-shell-guide.md) | Shell 启动文件、Shell 类型、操作系统差异 |
| [AI 资源](ai/README.md) | 用于 AI 编程工具的提示词、技能和代理 |
## 要求
- 仓库需放置在 `~/.local/share/dotfiles`(或在 `.dotfilesrc` 中设置自定义路径)
- **macOS**:Xcode 命令行工具
- **Linux**:基于 Debian 的发行版(apt)或基于 Arch 的发行版(Omarchy)
标签:Arch Linux设置, Awesome, Git使用, GNU Stow, Linux设置, macOS设置, Shell配置, 个人设置, 包管理, 多设备同步, 工作流优化, 工具安装, 应用安全, 开发环境, 数字取证, 点文件管理, 环境搭建, 系统优化, 系统管理, 网络安全研究, 脚本编程, 自动化脚本, 跨平台支持