hotalexnet/README.md
2025-09-23 14:49:58 +08:00

100 lines
3.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# OpenBSD 配置文件仓库
> 我的 OpenBSD 个性化配置集合
> 简洁 · 高效 · 安全 · 键盘驱动
本仓库存放我使用的 OpenBSD 系统配置文件。配置以轻量级窗口管理器(`spectrwm` / `cwm`)、终端工具(`tmux` + `alacritty` / `kitty`)为核心,追求极简、高效与可维护性。
**系统OpenBSD 7.X**
****风格**:键盘优先 · 配色统一 · 脚本驱动**
---
## 仓库概览
```sh
openbsd/
├── .Xresources # X11 资源配置 (颜色, 字体等)
├── .config/ # 第三方软件配置目录
│ └── alacritty # alacritty 终端模拟器配置目录
│ └── bat # bat 配置目录
│ └── bspwm # bspwm 窗口管理器配置目录
│ └── sxhkd
│ └── i3 # i3 窗口管理器配置目录
│ └── kitty # kitty 终端模拟器配置目录
│ └── lf # lf 文件管理器配置目录
│ └── polybar # polybar 状态栏配置目录
│ └── ranger # ranger 文件管理器配置目录
│ └── tint2 # tint2 状态栏配置目录
├── .cwmrc # cwm 窗口管理器配置文件
├── .i3status.conf # i3status 状态栏配置
├── .kshrc # Korn Shell 配置文件
├── .profile # 用户登陆环境变量
├── .spectrwm # spectrwm 窗口管理器配置文件
├── .tmux.conf # tmux 终端复用器配置文件
├── .twmrc # twm 窗口管理器配置文件
├── .xsession # X Window 启动脚本
├── GNUstep/ # Window Maker 窗口管理器配置目录
├── backgrounds/ # 桌面壁纸
├── bin/ # 自定义脚本与工具目录
└── list # 我的OpenBSD安装包列表包含上述所有软件
```
---
## 快速使用指南
### 1. 克隆仓库
```sh
git clone https://gitee.com/hotalexnet/openbsd.git ~/dotfiles
```
### 2. 安装软件包
```
doas pkg_add -l ~/dotfiles/list
```
### 3. 备份现有配置(推荐)
```Shell
mkdir ~/dotfiles_backup_$(date +%F)
cp ~/.profile ~/.Xresources ~/.xsession ~/.tmux.conf ~/dotfiles_backup_$(date +%F)/ 2>/dev/null || echo "无旧配置"
```
### 4. 拷贝所需要的配置文件到根目录
```sh
cp ~/dotfiles/.profile ~/
cp ~/dotfiles/.Xresources ~/
cp ~/dotfiles/.xsession ~/
cp ~/dotfiles/.tmux.conf ~/
cp ~/dotfiles/.cwmrc ~/
cp -rf ~/dotfiles/.spectrwm ~/
cp -rf ~/dotfiles/.config ~/
cp -rf ~/dotfiles/bin ~/
```
### 5. 重载配置
重启 X 或重新登录以应用 .xsession
---
## 注意事项
敏感信息本仓库未包含密码、API 密钥等敏感信息。如需配置 Git请使用 .gitconfig.local 或手动设置。
终端兼容性:部分软件依赖支持 ANSI 颜色的终端。
窗口管理器选择:.xsession 中需明确启动 cwm 或 spectrwm避免冲突。
字体依赖:配置中使用了第三方特定字体(如 MesloFont 或 SarasaTermSCNerd请确保已安装。
---
## 配置哲学
KISS 原则:保持简单,避免过度配置。
可移植性:尽量使用 OpenBSD 基础工具,减少外部依赖。
键盘驱动:通过快捷键提升效率,减少鼠标依赖。
安全优先:默认启用 unveil、pledge配置最小权限。
---
## 许可
除非另有说明,本仓库内容以 BSD 3-Clause 开源发布。