English | 中文
My personal OpenBSD configuration collection
Minimal, efficient, secure, and keyboard-driven
This repository stores my OpenBSD user configuration files. The setup focuses on lightweight window managers (spectrwm / cwm), terminal workflows (tmux + alacritty / kitty), shell configuration, desktop utilities, and small helper scripts. The goal is to keep the system simple, fast, maintainable, and easy to restore on a fresh OpenBSD installation.
System: OpenBSD 7.x
Style: keyboard-first, consistent colors, script-driven
openbsd/
├── .Xresources # X11 resources: colors, fonts, terminal appearance
├── .config/ # Application configuration directory
│ ├── alacritty # Alacritty terminal configuration
│ ├── bat # bat configuration
│ ├── bspwm # bspwm window manager configuration
│ ├── sxhkd # sxhkd hotkey daemon configuration
│ ├── i3 # i3 window manager configuration
│ ├── kitty # kitty terminal configuration
│ ├── lf # lf file manager configuration
│ ├── nvim # Neovim configuration
│ ├── polybar # polybar status bar configuration
│ ├── ranger # ranger file manager configuration
│ └── tint2 # tint2 panel configuration
├── .cwmrc # cwm window manager configuration
├── .cshrc # C Shell configuration
├── .i3status.conf # i3status configuration
├── .kshrc # Korn Shell configuration
├── .profile # Login environment variables
├── .spectrwm/ # spectrwm window manager configuration
├── .tmux.conf # tmux terminal multiplexer configuration
├── .twmrc # twm window manager configuration
├── .xsession # X session startup script
├── GNUstep/ # Window Maker / GNUstep configuration
├── backgrounds/ # Wallpapers and desktop backgrounds
├── bin/ # Personal helper scripts
└── list # OpenBSD package list for this setup
This repository contains configuration for:
- X11 resources and session startup
cwm,spectrwm,twm,bspwm, and i3-related desktop workflowstmux, shell startup files, and terminal appearancealacrittyandkittyranger,lf,bat,polybar,tint2,picom, and Neovim- Window Maker / GNUstep state and theme-related files
- custom scripts in
bin/ - an OpenBSD package list in
list
It is intended as a personal dotfiles backup and restore point, not as a general-purpose OpenBSD desktop distribution.
git clone https://gitee.com/hotalexnet/openbsd.git ~/dotfilesThe list file contains the packages used by this setup.
doas pkg_add -l ~/dotfiles/listReview the package list before installing if you want a smaller system.
Recommended before copying files into $HOME:
backup_dir=~/dotfiles_backup_$(date +%F)
mkdir -p "$backup_dir"
cp ~/.profile ~/.Xresources ~/.xsession ~/.tmux.conf ~/.cwmrc "$backup_dir" 2>/dev/null || trueCopy the files you need:
cp ~/dotfiles/.profile ~/
cp ~/dotfiles/.Xresources ~/
cp ~/dotfiles/.xsession ~/
cp ~/dotfiles/.tmux.conf ~/
cp ~/dotfiles/.cwmrc ~/
cp ~/dotfiles/.kshrc ~/
cp ~/dotfiles/.cshrc ~/
cp -R ~/dotfiles/.spectrwm ~/
cp -R ~/dotfiles/.config ~/
cp -R ~/dotfiles/GNUstep ~/
cp -R ~/dotfiles/bin ~/You can copy only the parts you actually use. For example, if you only use cwm, you do not need the bspwm, i3, or spectrwm files.
After copying .xsession, restart X or log out and log back in.
For shell or tmux changes, open a new shell or reload manually:
. ~/.profile
tmux source-file ~/.tmux.confThe bin/ directory currently includes:
color_ifconfig # Colorized ifconfig output
cwmbar # cwm status bar helper
kitty-chinese.sh # kitty launcher wrapper for Chinese input/display use
Make sure ~/bin is in your PATH if you copy this directory into your home folder.
This repository intentionally does not include passwords, API keys, mail account credentials, or private keys.
Important exclusions:
.mutt/is ignored because mail configuration often contains account credentials.- machine-local secrets should stay outside the repository.
- Git identity can be configured manually or through a private local file such as
.gitconfig.local.
Before committing new files, scan for secrets.
- Some tools require terminals with ANSI color support.
- Some configuration assumes specific fonts such as Meslo or Sarasa Term SC Nerd fonts.
.xsessionshould start only the window manager you actually want to use. Avoid starting multiple window managers at the same time.backgrounds/can be large; keep only wallpapers you actually want to track.- Window Maker / GNUstep state files may be machine-specific. Review them before using on another host.
- KISS: keep the setup simple and avoid unnecessary abstraction.
- Portability: prefer OpenBSD base tools where practical.
- Keyboard-first: optimize common workflows through shortcuts and scripts.
- Security-first: keep secrets out of Git and avoid granting more permissions than needed.
- Recoverability: keep the repository easy to clone and apply on a clean OpenBSD install.
Unless otherwise noted, this repository is released under the BSD 3-Clause License. See LICENSE for details.