These are my personal dotfiles, carefully curated over more than a decade to streamline terminal and development workflows and enhance productivity. This repository includes configurations for various tools and shell programs, ensuring a cohesive and efficient environment.
git clone https://github.com/hollow/dotfiles ~/.config
ln -nfs ~/.config/zsh/.zshrc ~/.zshrc
exec zshThe repository includes extensive configurations for zsh, managed using
zi. Zi allows for fast and flexible management
of zsh plugins, enabling users to load and configure plugins on demand,
enhancing shell performance and functionality.
-
User Information: Environment variables
USER_NAMEandUSER_EMAILfor Git and GPG. -
Locale Settings: Enforces
en_US.UTF-8for consistent language and character encoding. -
Truecolor Support: Sets
COLORTERMtotruecolorfor enhanced terminal colors. -
Path Management: Dynamically sets system and user paths for binaries and libraries.
-
XDG Directories: Configures paths following the XDG Base Directory Specification to organize user data in a clean, standardized structure:
XDG_CONFIG_HOME(~/.config): User-specific configuration filesXDG_CACHE_HOME(~/.cache): Non-essential cached dataXDG_DATA_HOME(~/.local/share): User-specific data filesXDG_STATE_HOME(~/.local/state): State data that should persist between restartsXDG_RUNTIME_DIR(~/.local/run): Runtime files with restricted permissions (mode 0700)
All directories are automatically created on shell startup, ensuring a consistent environment structure.
-
Oh My Zsh Libraries: Leverages core Oh My Zsh library modules for essential shell functionality:
completion.zsh: Enhanced tab completion with visual feedbackdirectories.zsh: Directory navigation improvements and shortcutsfunctions.zsh: Common utility functionsgrep.zsh: Colorized grep outputhistory.zsh: Advanced history management and searchkey-bindings.zsh: Standard keyboard shortcuts for line editingspectrum.zsh: 256-color support utilitiestermsupport.zsh: Terminal title and tab management
-
Prompt & Visual Feedback: The shell uses Powerlevel10k, a fast and highly customizable zsh theme that provides instant command feedback with a rich, informative prompt. It displays Git status, command execution time, exit codes, background jobs, and more—all updated asynchronously for zero lag.
Combined with Fast Syntax Highlighting (F-Sy-H), commands are color-coded as you type: valid commands appear in green, invalid in red, with additional syntax highlighting for strings, redirections, and command options. This immediate visual feedback catches typos before execution and improves command-line awareness.
-
Enhanced Completion: The shell integrates fzf for fuzzy searching and fzf-tab to replace the traditional tab completion menu with an interactive fzf interface. When completing
cdcommands, fzf-tab displays a live preview of each directory's contents usingeza, making navigation faster and more intuitive. The completion system is further enhanced with:- Error Correction: Approximate completion with automatic typo correction (up to 7 character errors based on input length)
- Formatted Messages: Styled descriptions, warnings, and error counts for clearer feedback during completion
- Customized Sorting: Disables alphabetical sorting for
git checkoutto preserve recency-based branch ordering - Fish-like Autosuggestions: As you type, the shell displays greyed-out suggestions from command history that can be accepted with the right arrow key, dramatically speeding up command recall
- Auto-pairing: Automatically closes matching quotes, brackets, and parentheses as you type, reducing syntax errors in complex commands
- Extended Completions: Installs additional completion definitions for hundreds of commands beyond the zsh defaults, auto-updating alongside other plugins
-
Directory Navigation: Convenient aliases for navigating up multiple directory levels:
..: Navigate up one directory level...: Navigate up two directory levels....: Navigate up three directory levels.....: Navigate up four directory levels
-
Per-Directory Environments (direnv): Integrates
direnvto automatically adjust environment variables when entering project directories that define a.envrc. The config adds a concise helper aliasdafordirenv allowand wires the direnv shell hook so changes apply instantly. This keeps language versions, secrets, and tool paths scoped to their project without polluting the global shell session. -
Batch & Parallel Helpers: Two custom helpers streamline running commands across multiple project directories:
:each DIRS... do <cmd>: Iterates over matching directories, entering each one sequentially and executing the provided command (or just changing into it if no command is given). Output is grouped by directory for readability.:parallel DIRS... do <cmd>: Executes the command in up to 5 parallel jobs using GNUparallel, sourcing the full zsh configuration for each job. Tags each line of output with its originating directory for easier log scanning. Ideal for bulk updates, status checks, or building many modules.
These helpers reduce manual loop boilerplate and provide consistent context (environment, PATH, functions) in every invocation.
-
Update Management: The
zupcommand provides a unified update workflow that sequentially updates all major tools and packages in the environment:- Homebrew packages (via
brew update,brew upgrade, andbrew bundle) - Python applications installed via pipx
- Tmux plugins
- Google Cloud SDK components
- Zi plugin manager itself
- All Zi-managed zsh plugins
This ensures the entire development environment stays current with a single command.
- Homebrew packages (via
-
Common CLI Tooling: Frequently used modern replacements and enhancers are installed and configured for an improved terminal experience:
bat: Syntax-highlightedcatwith paging integration and man page coloringbtop: Rich terminal resource monitor (CPU, memory, processes)duf: Readable disk/file system usage instead of classicdfeza: Feature-richlsalternative with colors, icons, and tree viewsfd: Fast, intuitive alternative tofindwith sensible defaultsglow: Render Markdown in the terminal nicelyjq/yq/xq: JSON, YAML, and XML query/transform tools for structured dataless: Configured pager with improved prompts, raw color support, and historyman: Colorized manual pages via integration withbatncdu: Interactive disk usage explorer for pruning large directoriesparallel: Run commands across inputs concurrently with tagged outputrg(ripgrep): Fast recursive search with color and smart file ignoressponge: Safely read & write in a pipeline without truncation racesxh: Moderncurl-like HTTP client with nicer UX
My installation leverages Homebrew as the primary package
manager on macOS, with declarative package management through Brewfile. This
file defines all formulae (command-line tools), casks (GUI applications), Mac
App Store apps, and VS Code extensions to be installed.
-
Automatic Installation & Update: On first shell startup after cloning the dotfiles, and whenever the
zupupdate helper is run, the configuration ensures every entry in theBrewfileis installed. This is achieved through the:brew-updatefunction which:- Dumps current state back into
Brewfile(brew bundle dump -f) to keep it version-aligned - Runs
brew update+brew upgradefor installed formulae - Applies the Brewfile (
brew bundle install) so missing packages are installed and extraneous ones can be pruned - Performs cleanup (
brew autoremove,brew cleanup -s --prune=all) for a lean installation
- Dumps current state back into
-
Reproducibility: No manual
brew installcommand is required—just on a new host. Start a shell with this configuration or runzupand the environment converges to the declared state. -
GNU Utilities: GNU versions of common Unix utilities (coreutils, findutils, sed, tar, etc.) take precedence over macOS BSD versions, ensuring consistent behavior across different Unix-like systems.
SSH is configured for reliable, persistent connections with smart authentication via 1Password integration.
-
Connection Persistence: Configured to prevent dropped connections through keep-alive settings:
ServerAliveInterval 60: Sends keep-alive packets every 60 seconds to maintain idle connectionsServerAliveCountMax 10: Allows up to 10 missed responses before disconnecting (total ~10 minutes of unresponsiveness tolerance)
-
Simplified Host Management: Host key verification is streamlined for development environments:
HashKnownHosts no: Known hosts are stored in plain text for easier manual inspection and troubleshootingStrictHostKeyChecking no: Automatically accepts new host keys without prompting (suitable for dynamic environments where hosts change frequently)
-
1Password SSH Agent: Seamlessly integrates with 1Password for SSH key management. If 1Password's SSH agent socket is detected, it's automatically configured as the authentication agent. This allows SSH keys stored in 1Password to be used for authentication with biometric unlock, eliminating the need to manage separate SSH key files. Falls back to the standard Oh My Zsh SSH agent plugin if 1Password is unavailable.
-
Privileged Access Helper: The
ssualias provides quick access to remote root shells viasshlive -o RequestTTY=force -o RemoteCommand='sudo -i', automatically requesting a PTY and elevating to root upon connection.
GNU Privacy Guard (GPG) is configured with XDG-compliant paths and automatic agent management for cryptographic operations.
-
XDG Directory Compliance: GPG configuration and keyring are stored in
~/.local/share/gnupg(GNUPGHOME) following the XDG Base Directory specification, keeping GPG data out of the home directory root. -
Terminal Integration:
GPG_TTYis automatically set to the current terminal device, enabling proper passphrase prompting in terminal sessions. This ensures GPG can securely request passphrases when needed for signing, encryption, or decryption operations. -
GPG Agent: The Oh My Zsh
gpg-agentplugin is loaded to automatically start and manage the GPG agent, which handles key caching and passphrase management. The agent enables seamless GPG operations (signing, encryption, authentication) without repeatedly entering passphrases, using secure timeout-based credential caching.
This setup primarily supports GPG-signed Git commits (see Git section), but can also be used for encrypted email communication, file encryption/decryption, and GPG-based authentication workflows.
Tmux is configured as a powerful terminal multiplexer with plugin management, session persistence, and ergonomic keybindings for efficient multitasking.
-
XDG Directory Compliance: Plugin cache is stored in
~/.cache/tmux/plugins(TMUX_PLUGIN_MANAGER_PATH) following the XDG Base Directory specification, keeping tmux data organized. -
Custom Prefix Key: Uses
Ctrl-ainstead of the defaultCtrl-bas the prefix key, providing a more ergonomic alternative that's easier to reach on most keyboards. -
Plugin Management: Uses TPM (Tmux Plugin Manager) to manage plugins, with automatic installation and updates via the
:tmux-updatehelper (invoked byzup):tmux-sensible: Sensible default settings that everyone can agree ontmux-resurrect: Save and restore tmux sessions across system restartstmux-continuum: Automatic session saving and restoration (works with tmux-resurrect)tmux-colors-solarized: Solarized dark color scheme for consistent terminal aestheticstmux-power: Modern, informative status bar theme
-
256-Color Support: Configured with
screen-256colorterminal type and true color support via terminal overrides, ensuring rich colors in terminal applications like vim and less. -
Ergonomic Keybindings: Enhanced navigation and management shortcuts:
Shift-Left/Right: Navigate between windows without prefix keyCtrl-Shift-Arrow: Navigate between panes without prefix keyCtrl-k: Clear screen and scrollback (emulates macOS Terminal behavior)Ctrl-a Ctrl-a: Jump to last active windowCtrl-a i: Toggle synchronized input across panesCtrl-a x: Close current paneCtrl-a r: Reload tmux configuration
-
Session Management: Automatic session persistence through tmux-continuum ensures work context is preserved across system reboots. Sessions are automatically saved every 15 minutes and restored on tmux start.
-
Default Session: The Oh My Zsh tmux plugin integration sets
defaultas the default session name and provides theTalias for quick tmux access. -
Window & Pane Indexing: Windows and panes start at index 1 instead of 0, making keyboard shortcuts more intuitive (1 is closer to the other numbers on the keyboard than 0).
Vim is configured with XDG-compliant paths and modern defaults for efficient
text editing. The configuration works with both Vim and Neovim, with the shell
aliasing vim to nvim when available.
-
XDG Directory Compliance: All Vim data is stored following the XDG Base Directory specification:
- Configuration:
~/.config/vim(runtime path and packpath) - Data:
~/.local/share/vim(plugins, spell files, views, viminfo) - Cache:
~/.cache/vim(backup, swap, undo files)
This keeps the home directory clean by avoiding the traditional
~/.vimand~/.vimrcclutter. - Configuration:
-
Plugin Management: Uses vim-plug to manage plugins, with plugins installed to
~/.local/share/vim/plugged:vim-code-dark: Visual Studio Code dark color scheme for consistent aesthetics across editors
-
Modern Defaults: Enhanced from the base Vim configuration by Amir Salihefendic's vimrc:
- 500 lines of command history
- Auto-reload files changed externally
- Smart case-insensitive searching with incremental search
- Syntax highlighting with 256-color support
- UTF-8 encoding by default
- Unix line endings preferred
- Persistent undo, backup, and swap files (in XDG cache)
-
Editing Enhancements:
- Leader key:
,(comma) for custom command combinations <leader>w: Quick save:W: Save with sudo (handles permission-denied errors)0: Jump to first non-blank character instead of line start- Space: Search forward, Ctrl-Space: Search backward
- Auto-delete trailing whitespace on save for common file types
- Smart tab handling (4 spaces, expandtab enabled)
- Leader key:
-
Window & Buffer Management:
Ctrl-h/j/k/l: Navigate between split windows<leader>bd: Close current buffer<leader>ba: Close all buffers<leader>tn: New tab,<leader>tc: Close tab<leader>tl: Toggle to last accessed tab- Return to last edit position when reopening files
-
Visual Enhancements:
- Informative status line showing file path, CWD, line, and column
- Highlight matching brackets
- Show line numbers and ruler
- Visual error feedback (no annoying beeps)
-
Spell Checking:
<leader>ss: Toggle spell checking<leader>sn/sp: Next/previous spelling error<leader>sa: Add word to dictionary<leader>s?: Suggest corrections
-
Neovim Integration: The
VIMINITenvironment variable points to the vimrc configuration, ensuring both Vim and Neovim use the same settings. TheEDITORenvironment variable is set tonvim, making it the default editor for Git commits, cron jobs, and other system operations.
Git is configured for secure, efficient workflows with GPG-signed commits, sensible defaults, and extensive shell integration for GitHub operations.
-
Identity & Security: User name and email are set globally for commits, with automatic GPG signing enabled for all commits using a configured signing key. This ensures commit authenticity and non-repudiation.
-
Modern Defaults: Uses
mainas the default branch for new repositories, enables fast-forward-only pulls to maintain linear history, and automatically sets up remote tracking branches on first push. Rerere (reuse recorded resolution) is enabled to remember conflict resolutions. -
SSH for GitHub: HTTPS GitHub URLs are automatically rewritten to SSH for seamless authentication via SSH keys.
-
Workflow Aliases: Short, memorable commands for common operations:
c: Show changes (modified files, excluding untracked)ga: Stage all changesgap: Stage changes interactively (patch mode)ci: Commit staged changesamend: Amend the last commit without changing the messageco: Checkout branches or filesgcm: Checkout the main branch (detectsmainormaster)gd: Show unstaged changesgdc: Show staged changes (diff cached)gdm: Diff against the main branchgf: Fetch with automatic pruning of deleted remote branchesgl: Pretty-formatted log graph with colorsgp: Pull changesgpr: Pull with rebase and auto-stashgrh: Unstage all changess: Compact status (current directory only)
-
GitHub Integration: Helper functions streamline GitHub workflows via
ghCLI:pr: Push current branch and open a pull request creation form, then view in browserghm: Merge a PR and clean up local brancheshub-repo-list: List all repositories (with filtering options)hub-clone-all: Clone all non-archived repos in parallelhub-remove-archived: Delete local copies of archived repositories
-
Batch Operations: Apply commands across multiple Git repositories:
git-each DIRS... do <cmd>: Run git commands sequentially in matching repositoriesgit-parallel DIRS... do <cmd>: Run git commands in parallel across repositories (up to 5 jobs)
-
Additional Git Config Aliases: The git config file defines additional utility aliases for specialized tasks:
aliases: List all configured git aliases with their definitionsamend: Amend the last commit reusing its message (same as shell alias)changes: Show modified files excluding untracked (same as shell aliasc)ci: Shorthand for commitco: Shorthand for checkoutdc: Show staged changes (diff cached)lg: Pretty-formatted log graph with colors, relative dates, and author namesls: List all files tracked in HEADnew: Show commits added to a branch since last fetch (e.g.,git new main)rank: Contributor rankings by commit count (excluding merges)st: Compact status with branch infostat: Show diff statistics (files changed, insertions, deletions)tags: List all tagswhatis: One-line commit summary with hash and short date
-
Configuration Details: Additional settings include:
- Branch sorting by most recent commit date (
-committerdate) - Detached HEAD warnings suppressed for intentional detached states
- Copy detection enabled for renames in diffs
- Automatic tag pushing when pushing commits (
followTags) - Git LFS (Large File Storage) filters configured for binary file management
- Branch sorting by most recent commit date (
Copier is a project templating tool that maintains synchronization between template repositories and generated projects, enabling consistent updates across multiple codebases.
-
Template-Based Project Generation: Copier generates new projects from template repositories, prompting for customization values that are stored in
.copier-answers.ymlfor reproducibility and future updates. -
Template Updates: Projects generated with Copier can pull in template updates while preserving local customizations. The answers file tracks which template version was used, enabling smart merges when templates evolve.
-
Batch Operations: Helper functions streamline working with multiple Copier-managed projects:
copier-each DIRS... do <cmd>: Run commands sequentially in directories containing.copier-answers.ymlcopier-parallel DIRS... do <cmd>: Run commands in parallel across Copier-managed projects (up to 5 jobs)
These helpers automatically discover all projects generated from Copier templates, making it easy to apply template updates, check status, or perform bulk operations across entire project families.
The Python setup favors a clean, isolated tooling environment while keeping the
system free from ad‑hoc pip install --user clutter.
-
Runtime Discovery:
PYTHONHOMEis set dynamically to the newest Homebrew installed Python (patternpython@*), and itslibexec/bindirectory is added early toPATHto provide the correctpython,pip, and venv tools. -
Interactive Startup:
PYTHONSTARTUPpoints topython/startup.pyso every REPL session loads personal helper code (history, quality‑of‑life tweaks, etc.). -
Application Isolation via pipx:
pipxis configured withPIPX_HOME(cached environments) andPIPX_BIN_DIR(binaries added toPATH). Tools installed through pipx (e.g. linters, formatters, CLIs) run in dedicated virtual environments, avoiding dependency conflicts. -
Automatic Tool Refresh: The
:pipx-updatehelper (invoked byzup) reinstalls and upgrades all pipx‑managed applications, including injected dependencies, ensuring they stay current without manual tracking. -
Tab Completion for Python CLIs:
argcompleteintegration extends shell completion for Python programs (e.g.pipx) by adding its generated completion functions tofpathand registering them after the packages are available. -
Clean Separation of Caches/Data: All Python‑related config, cache, and data locations honor the XDG directory setup, keeping the home directory tidy and making backup/cleanup operations safer.
Ansible is configured with XDG-compliant paths and convenient helpers for infrastructure automation workflows.
-
XDG Directory Compliance: All Ansible data is stored following the XDG specification:
ANSIBLE_GALAXY_CACHE_DIR: Galaxy role/collection cache in~/.cache/ansibleANSIBLE_GALAXY_TOKEN_PATH: API tokens in~/.local/share/ansible/galaxy_tokenANSIBLE_LOCAL_TEMP: Temporary files in~/.local/run/ansible/tmpANSIBLE_PERSISTENT_CONTROL_PATH_DIR: SSH control sockets in~/.local/run/ansible/cp
-
Quick Access Aliases: Short commands for common Ansible operations:
ad: ansible-doc (view module documentation)ai: ansible-inventory (inspect inventory)ap: ansible-playbook (run playbooks)
-
Host Management Helpers: Functions for working with AlmaLinux platform hosts:
ah: List all AlmaLinux platform hosts from inventory (via jq filtering)asu [pattern] <command>: Run ad-hoc shell commands on hosts matching a pattern (defaults toplatform_almalinux). Executes with privilege escalation (-b) using the shell module.
-
Batch Operations: Apply commands across multiple Ansible projects:
ansible-each DIRS... do <cmd>: Run commands sequentially in directories containingansible.mkansible-parallel DIRS... do <cmd>: Run commands in parallel across Ansible projects (up to 5 jobs)
Terraform is configured for infrastructure-as-code workflows with XDG-compliant paths and convenient aliases for common operations.
-
XDG Directory Compliance: Terraform plugin cache is stored in
~/.cache/terraform/plugins(TF_PLUGIN_CACHE_DIR), following the XDG Base Directory specification. This prevents duplicate provider downloads across multiple Terraform projects and keeps plugin binaries organized. -
Checkpoint Telemetry Disabled:
CHECKPOINT_DISABLE=truedisables HashiCorp's checkpoint telemetry system, preventing version checks and analytics reporting for enhanced privacy and performance. -
Configuration Symlink: The
.terraform.ddirectory is symlinked fromterraform/config.tfrcin the dotfiles, centralizing Terraform CLI configuration. -
Quick Aliases: Short commands for common Terraform operations:
tf: Shorthand forterraformtfd: Destroy infrastructure (terraform destroy)tfi: Import existing resources (terraform import)
-
Targeted Operations: Helper functions for selective plan/apply operations:
tfa [resources...]: Apply changes, optionally targeting specific resources (e.g.,tfa module.vpc aws_instance.webexpands toterraform apply -target=module.vpc -target=aws_instance.web)tfp [resources...]: Plan changes with optional resource targeting, using the same syntax astfa
When called without arguments, these functions operate on the entire configuration. With arguments, they automatically prefix each resource with
-target=for selective operations. -
Batch Operations: Apply commands across multiple Terraform projects:
terraform-each DIRS... do <cmd>: Run commands sequentially in directories containingterraform.mkterraform-parallel DIRS... do <cmd>: Run commands in parallel across Terraform projects (up to 5 jobs)