Skip to content

francoiskha/dotfiles

 
 

Repository files navigation

francoiskha's Dotfiles

Personalized shell environment, forked from Zach Holman's dotfiles.

Intent & Architecture

This setup focuses on performance and maintainability while leveraging the best parts of the Oh-My-Zsh ecosystem.

Key Performance Optimizations

  • Static File Sourcing (zsh-rebuild): Instead of dynamically globbing for .zsh files on every startup, a zsh-rebuild script generates a static index (~/.zsh_index.zsh), drastically reducing I/O overhead.
  • Antidote for Plugins: Replaced the full Oh-My-Zsh framework with Antidote. This allows loading only necessary OMZ plugins (like git, docker, etc.) without the overhead of the entire framework. Plugins are statically compiled into ~/.zsh_plugins.zsh for near-instant startup.
  • Optimized Autocompletion (compinit): We use compinit -C for rapid startup, only performing a full security and timestamp check (compinit) once every 24 hours in the background.
  • Mise for Tooling: Replaced nvm with Mise. Mise is written in Rust and handles tool versions (Node, Python, Go) without slowing down every shell session.
  • Homebrew Prefix Caching: The Homebrew installation path is cached in $BREW_PREFIX once during startup, avoiding expensive subshell calls like $(brew --prefix) throughout the configuration.
  • Optimized Loading Order: Shell initialization is carefully sequenced: Environment -> PATH -> compinit -> Plugins -> Aliases. Initializing compinit before plugins ensures that compdef is always available when plugins need it.

Core Components

  • Prompt: Uses Pure for a minimal, fast, and informative prompt.

  • Package Management: Three Brewfiles at the root track Homebrew formulas and casks:

    • Brewfile — baseline packages installed on every Mac
    • Brewfile.personal — packages for the personal Mac only
    • Brewfile.work — packages for the work Mac only

    The context is detected automatically: if $USER == "fran", the personal profile is applied; otherwise the work profile is used.

  • Automatic Caching: Dynamic completions (for tools like fzf or docker) are cached locally to minimize startup lag.

Installation

git clone https://github.com/francoiskha/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
script/bootstrap

The bootstrap script will link your configuration files and sync all dependencies via brew bundle.

Maintenance & Customization

Adding Plugins

Add any Zsh plugin (from GitHub or Oh-My-Zsh) to zsh/plugins.txt and run zsh-rebuild to regenerate the static plugin bundle.

Updating Configuration Files

When adding new .zsh files (aliases, paths, completions) to the .dotfiles directory, run zsh-rebuild to update the static source index.

Adding Packages

Add new Homebrew packages or Mac apps to the appropriate Brewfile:

  • Brewfile for packages needed on every Mac
  • Brewfile.personal for packages specific to the personal Mac
  • Brewfile.work for packages specific to the work Mac

You can then sync your system by running:

dotfilesdot

(This is an alias for bin/dotfilesdot which updates Brew and runs brew bundle).

Secrets

Put your sensitive environment variables (API keys, private tokens) in ~/.localrc. This file is sourced by Zsh but is not tracked by Git.

Troubleshooting

If you see errors related to completions, ensure $ZSH_CACHE_DIR (defined in zshrc.symlink) is writable. The system automatically creates this in your home cache directory.

Credits

Based on Holman's dotfiles. Theme: Pure. Plugin Manager: Antidote. Version Manager: Mise.

About

@holman does dotfiles

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Shell 97.4%
  • Ruby 2.6%