Personal shell environment, editor configs, and machine provisioning scripts.
Forked from romkatv/dotfiles-public. The core bare-repo model and bootstrap flow are preserved; the tooling and configs have been extended for multi-platform use (macOS, WSL, Ubuntu/Debian).
This is not a normal project — there's no build, lint, or test system. The repo files live at the repo root and map 1:1 to $HOME paths (e.g., .zshrc → ~/.zshrc, .config/ghostty/config.ghostty → ~/.config/ghostty/config.ghostty).
The repo is cloned as a bare git repo at ~/.dotfiles-public with GIT_WORK_TREE=~. This means:
- No
.git/directory in your home — all git metadata lives in~/.dotfiles-public. git status,git diff,git add,git commitall work from any directory, operating on your home files.- A companion private repo (
~/.dotfiles-private) holds secrets: SSH keys, private shell config, zsh history.
~/
├── .dotfiles-public/ ← bare git repo (GIT_DIR)
├── .dotfiles-private/ ← bare git repo (secrets)
├── .zshrc ← checked out from dotfiles-public
├── .tmux.conf ← checked out from dotfiles-public
├── ...
Public config files (.zshrc, .bashrc, .tmux.conf, etc.) source or include their private counterparts:
.zshrc→ sources.zshrc-private.zshenv→ sources.zshenv-private.ssh/config→ includesconfig-private
Private files live in ~/.dotfiles-private and are never committed to the public repo.
- A GitHub account
gitandcurlinstalled
SSH key generation (Ed25519) and GitHub registration are handled automatically by
install.sh. If you already have an SSH key (~/.ssh/id_ed25519or~/.ssh/id_rsa), it will be reused.
Set your GitHub username and run:
GITHUB_USERNAME=auspbro bash -c \
"$(curl -fsSL 'https://raw.githubusercontent.com/auspbro/dotfiles-public/master/bin/install.sh')"This single command will:
- Pre-authenticate
sudo(one password prompt for the entire script) - Detect your platform (macOS / WSL / Ubuntu)
- Auto-detect network proxy (if needed to reach GitHub)
- Generate an Ed25519 SSH key and register it with GitHub (via
ghCLI — one browser authorization, skipped ifGH_TOKENis set) - Install base dependencies (
git,zsh,curl) - Clone both
dotfiles-publicanddotfiles-privateas bare repos - Check out all config files into
$HOME - Run
setup-machine.shto install additional software (non-interactive)
Interactive prompts during install: 1 sudo password + 1 GitHub browser authorization (skipped with GH_TOKEN). That's it.
For fully non-interactive install (e.g., automated provisioning):
GH_TOKEN=ghp_xxxx AUTO_YES=1 GITHUB_USERNAME=auspbro bash -c \
"$(curl -fsSL 'https://raw.githubusercontent.com/auspbro/dotfiles-public/master/bin/install.sh')"
GH_TOKEN(orGITHUB_TOKEN) skips the browser authorization — the token is used for SSH key registration and HTTPS clone, then the remote is switched back to SSH. Token needsadmin:public_key+reposcopes.AUTO_YES=1skips the WSL restart confirmation. Onlysudostill requires interaction.
For users in China, add APT_MIRROR to speed up package downloads:
APT_MIRROR=mirrors.aliyun.com GH_TOKEN=ghp_xxxx GITHUB_USERNAME=auspbro bash -c \
"$(curl -fsSL 'https://raw.githubusercontent.com/auspbro/dotfiles-public/master/bin/install.sh')"Common mirrors: mirrors.aliyun.com, mirrors.tuna.tsinghua.edu.cn, mirrors.ustc.edu.cn, mirrors.huaweicloud.com
After install completes:
- Restart your shell — close and reopen terminal, or
exec zsh - Powerlevel10k configuration — the p10k wizard should launch automatically on first zsh start. If not, run
p10k configure. - zsh4humans update — run
z4h updateto ensure the latest z4h framework.
| Component | Config File(s) | Notes |
|---|---|---|
| Zsh (primary) | .zshrc, .zshenv |
Via zsh4humans (z4h) |
| Powerlevel10k | .p10k.zsh, .p10k-ascii.zsh, .p10k-8color.zsh, .p10k-ascii-8color.zsh |
Multiple prompt profiles for different terminal capabilities |
| Bash (fallback) | .bashrc, .bash_profile, .bash_aliases |
Minimal bash environment |
| Zsh functions | dotfiles/functions/ |
Autoloaded: sync-dotfiles, toggle-dotfiles, auto-proxy, bench, arith-eval, zman |
| Emulator | Config File | Notes |
|---|---|---|
| Ghostty | .config/ghostty/config.ghostty |
Maple Mono NF CN font, Solarized theme, transparent background, quick-terminal (Ctrl+backtick) |
| Windows Terminal | dotfiles/microsoft-terminal-settings*.json |
Multiple machine-specific profiles (Legion, Surface 4, XPS 13) |
| Apple Terminal | dotfiles/apple-terminal-profile.terminal |
macOS Terminal profile |
Main config: .tmux.conf
| Feature | Binding |
|---|---|
| Pane navigation | h/j/k/l (vim-style) |
| Fast pane nav | Ctrl+Alt+h/j/k/l |
| Split horizontal | | |
| Split vertical | - |
| Second prefix | ` (backtick) |
| Floating terminal | Alt+backtick (80% width, 70% height) |
| Plugin manager | TPM |
Alternative profiles switchable via aliases:
tmux-min # minimal config → .config/tmux/tmux.min.conf
tmux-fancy # fancy config → .config/tmux/tmux.fancy.conf| Editor | Config File | Notes |
|---|---|---|
| Vim | .vimrc |
Leader=Space, jk/vv for Esc, 4-space indent, system clipboard, relative line numbers |
| VS Code | .config/Code/User/settings.json |
VS Code settings |
| Neovim (VSCode extension) | .config/nvim/init_vscode.vim |
For VSCode Neovim plugin |
| Clang-format | .clang-format |
Google style, 100-column limit, left pointer alignment |
bin/build_docker_env.sh builds a Docker image (alanenv) based on Ubuntu 22.04 with common development tools pre-installed.
bash ~/bin/build_docker_env.sh # build
bash ~/bin/build_docker_env.sh rebuild # rebuild without cache| Script | Purpose |
|---|---|
install.sh |
Unified bootstrap entry point (platform-aware) |
setup-machine.sh |
Install all software (apt packages, tools, fonts, Docker). Idempotent, safe to re-run. |
bootstrap-dotfiles.sh |
Clone both dotfiles repos as bare repos |
bootstrap-machine.sh |
Legacy entry point (deprecated, use install.sh) |
build_docker_env.sh |
Build alanenv Docker development image |
num-cpus |
Return CPU count (used by make/cmake aliases for -j) |
cpu-temp |
Show CPU temperature |
diff-so-fancy |
Git diff beautifier |
redit |
Open file in editor from remote session |
rdp |
Remote desktop helper |
slurp / barf |
Clipboard utilities |
punzip |
Parallel unzip |
pick-random-lines |
Random line picker from file |
.
├── .bash_aliases # Bash aliases
├── .bash_profile # Bash profile
├── .bashrc # Bash config (fallback shell)
├── .clang-format # C/C++ formatting rules
├── .config/
│ ├── Code/User/ # VS Code settings
│ ├── ghostty/ # Ghostty terminal config
│ ├── git/ # Git global ignores
│ ├── nvim/ # Neovim (VSCode extension) config
│ └── tmux/ # Alternative tmux profiles
├── .hushlogin # Suppress login message
├── .p10k.zsh # Powerlevel10k config (default)
├── .p10k-ascii.zsh # Powerlevel10k config (ASCII-only)
├── .p10k-8color.zsh # Powerlevel10k config (8-color terminal)
├── .p10k-ascii-8color.zsh # Powerlevel10k config (ASCII + 8-color)
├── .purepower # Pure Power theme config
├── .ssh/ # SSH config (public part)
├── .tmux.conf # tmux main config
├── .vimrc # Vim config
├── .zshenv # Zsh environment (sourced first)
├── .zshrc # Zsh config (main)
├── CLAUDE.md # Claude Code project context
├── README.md # This file
├── bin/ # Utility scripts
└── dotfiles/
├── apple-terminal-profile.terminal
├── functions/ # Autoloaded zsh functions
└── microsoft-terminal-settings*.json # Per-machine Windows Terminal configs
Pull, merge upstream changes, and push both repos:
sync-dotfilesThis function (in dotfiles/functions/sync-dotfiles) also commits zsh history from the private repo before syncing.
Bound to Alt+P, cycles GIT_DIR/GIT_WORK_TREE between three states:
toggle-dotfiles # back to normal (unset)
toggle-dotfiles public # switch to public dotfiles repo
toggle-dotfiles private # switch to private dotfiles repoThis lets you run git add/commit/diff on dotfiles from any directory.
Run periodically to keep everything up to date:
sync-dotfiles && bash ~/bin/setup-machine.sh && z4h updatePro tip: Copy-paste this command including the comment. Use Ctrl+R and type #maintenance to find it later.
sync-dotfiles && bash ~/bin/setup-machine.sh && z4h update #maintenance| Platform | install.sh |
setup-machine.sh |
Notes |
|---|---|---|---|
| macOS | ✅ | ✅ | Uses Homebrew; Xcode CLT installed automatically |
| WSL (Ubuntu) | ✅ | ✅ | Primary development platform |
| Ubuntu/Debian | ✅ | ✅ | Native Linux |
| RHEL/Fedora/CentOS | ❌ | ✅ | Partial support in setup script |
All Windows setup is handled by install.sh. Manual steps:
- Install WSL 2 with Ubuntu 22.04:
wsl.exe --set-default-version 1 wsl.exe --install -d Ubuntu-22.04
- Run the one-line install command from Quick Start. SSH keys are generated and registered automatically.
After install, configure Windows Terminal:
- Open Windows Terminal →
Ctrl+,→ change Profiles > Ubuntu > Appearance > Text Formatting > Intense text style to "Bold font" Ctrl+Shift+,→ replacesettings.jsonwith the appropriate file fromdotfiles/microsoft-terminal-settings*.json.
If ssh -T git@github.com fails, add this to ~/.ssh/config:
Host github.com
Hostname ssh.github.com
Port 443
User git
IdentityFile ~/.ssh/id_rsa
Proxy is handled automatically at two levels:
Install time — install.sh detects proxy before any GitHub access:
- Uses existing proxy if
http_proxy/https_proxyenvironment variables are set - Tests direct connection — if it works, no proxy is used
- Probes common local proxy ports (Clash
7890, v2ray10809, etc.) - If nothing works, prints a warning and continues
Shell startup — auto-proxy runs on every new shell (from .zshrc):
- Probes local proxy ports and sets env vars + git config automatically
- Caches result in
~/.cache/auto-proxy(subsequent shells start in ~100ms) - Skips detection if proxy env vars are already set (manual override)
auto-proxy # auto-detect and configure
auto-proxy -f # force re-probe (ignore cache)
auto-proxy -u # unset proxy
auto-proxy -s # show current statusSet APT_MIRROR to replace Ubuntu/Debian apt sources with a domestic mirror before the first apt-get update. Original sources.list is backed up to sources.list.bak.
APT_MIRROR=mirrors.aliyun.com GITHUB_USERNAME=auspbro bash -c \
"$(curl -fsSL 'https://raw.githubusercontent.com/auspbro/dotfiles-public/master/bin/install.sh')"To manually set a proxy before running install:
export http_proxy=http://127.0.0.1:7890
export https_proxy=http://127.0.0.1:7890
GITHUB_USERNAME=auspbro bash -c \
"$(curl -fsSL 'https://raw.githubusercontent.com/auspbro/dotfiles-public/master/bin/install.sh')"For better WSL filesystem performance, exclude the WSL distro folder from Windows Defender scanning:
- Windows Security → Virus & threat protection → Manage settings
- Exclusions → Add an exclusion > Folder
- Select
%USERPROFILE%\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc
To completely remove and recreate your WSL distro:
wsl.exe --list # find distro name
wsl.exe --terminate DISTRO # stop it
wsl.exe --unregister DISTRO # delete itThen follow the Windows / WSL Setup steps above to recreate.
- romkatv/dotfiles-public — the foundation this repo is built on
- zsh4humans — the zsh framework
- Powerlevel10k — the prompt theme