Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

macOS Zsh environment, modular and reproducible.

License: MIT Platform Shell

Quick Start

curl -fsSL https://raw.githubusercontent.com/hacxy/dotfiles/main/install.sh | bash

This installs Homebrew, Oh My Zsh, zsh-autosuggestions, clones the repo to ~/dotfiles, and symlinks .zshrc and the Starship config.

What's Inside

zsh/
├── .zshrc                  # Entry point — loads Oh My Zsh then sources modules
├── .zshrc.local.example    # Template for private tokens (GITHUB_TOKEN, HF_TOKEN, etc.)
├── core/
│   ├── 05-helpers.zsh      # Utility functions: OS detection, has(), path_add()
│   └── 10-general.zsh      # Editor, aliases, PATH entries
└── tools/
    ├── 20-proxy.zsh        # proxy on/off/status — manages HTTP proxy env vars
    └── 30-nvm.zsh          # Lazy-loads NVM on first node/npm/npx call

starship/
└── starship.toml           # Starship prompt config — symlinked to ~/.config/starship.toml

Features

  • Modular config — drop a .zsh file into core/ or tools/, it loads automatically in filename order
  • Lazy NVM — NVM is deferred until you actually run node, npm, or npx, keeping shell startup fast
  • Proxy toggleproxy on / proxy off / proxy status with Homebrew-aware env vars
  • Private config.zshrc.local (gitignored) for tokens and machine-specific settings
  • One-command setupinstall.sh handles Homebrew, Oh My Zsh, plugins, cloning, and symlinking

Installation

Remote (recommended)

curl -fsSL https://raw.githubusercontent.com/hacxy/dotfiles/main/install.sh | bash

Local

git clone git@github.com:hacxy/dotfiles.git ~/dotfiles
cd ~/dotfiles
chmod +x install.sh
./install.sh

Usage

Proxy

proxy          # enable proxy (default: 127.0.0.1:7890)
proxy off      # disable
proxy status   # check current state

Override defaults with environment variables:

export PROXY_HOST=192.168.1.100
export PROXY_PORT=1080

Private Config

cp zsh/.zshrc.local.example zsh/.zshrc.local
# edit zsh/.zshrc.local — add GITHUB_TOKEN, HF_TOKEN, etc.

Adding Modules

Create a .zsh file in core/ (loaded first) or tools/ (loaded second). Prefix with a number to control load order:

# zsh/tools/50-aliases.zsh
alias ll="ls -la"

Contributing

Contributions welcome. Open an issue or submit a pull request.

License

MIT

About

Personal dotfiles: opencode, nvim, kitty, tmux, zsh

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages