Skip to content

dave6892/dotfiles

Repository files navigation

dotfiles

A focused Zsh-only dotfiles configuration providing a modern development environment with comprehensive aliases, functions, and environment setup.

⚠️ These dotfiles are intended for my own environment. Use at your own risk.

Originally inspired by craftzdog, this repository has been consolidated to focus on Zsh as the primary shell.

Features

  • Modular configuration: Organized Zsh settings split across multiple files for easy maintenance
  • 150+ aliases: Navigation, git, system utilities, network tools, and macOS-specific commands
  • Utility functions: File management, archive extraction, Grimoire integration
  • Modern development tools: Support for Go, Node.js, Python, Rust, and other tools
  • Easy customization: Local overrides via .zshrc.local without modifying base config
  • Clean separation: Environment variables in .zshenv, interactive config in .zshrc, modular configs in .config/zsh/

Directory Structure

dotfiles/
├── .zshenv                  # Environment variables and PATH (always loaded)
├── .zprofile                # Login shell initialization
├── .zshrc                   # Main interactive shell config (sources modular files)
├── .config/
│   └── zsh/
│       ├── aliases.zsh      # Aliases (navigation, git, system, network, Grimoire)
│       ├── functions.zsh    # Custom shell functions
│       ├── utilities.zsh    # Utility aliases and compatibility fixes
│       └── macos.zsh        # macOS-specific aliases and functions
├── .gitconfig               # Git configuration and aliases
├── .editorconfig            # Editor settings
├── .inputrc                 # Readline configuration
├── .curlrc                  # Curl configuration
├── .wgetrc                  # Wget configuration
└── bootstrap.sh             # Installation script

How It Works

The configuration is split into multiple files for better organization:

Load Order

  1. .zshenv - Always loaded first (environment variables, PATH)
  2. .zprofile - Login shells only (startup programs)
  3. .zshrc - Interactive shells (Oh-My-Zsh, sources modular configs)

Modular Configuration Files

  • aliases.zsh - All aliases organized by category
  • functions.zsh - Custom shell functions
  • utilities.zsh - Utility aliases and compatibility fixes
  • macos.zsh - macOS-specific configuration (only loaded on macOS)

The configuration sources .zshrc.local if it exists, allowing for machine-specific overrides without modifying the base config.

Installation

Quick Start

  1. Clone the repository:

    git clone https://github.com/dave6892/dotfiles.git
    cd dotfiles
  2. Run the installation script:

    ./bootstrap.sh

    Or use the --force option to skip the confirmation prompt:

    ./bootstrap.sh --force
  3. Apply the changes:

    • Restart your terminal, or
    • Source the configuration manually:
      source ~/.zshrc

What the Installation Does

The bootstrap.sh script will:

  1. Copy all configuration files to your home directory
  2. Preserve your existing files (creates backups when needed)

Requirements

  • Shell: Zsh
  • Supported platforms: macOS, Linux
  • Dependencies: rsync (usually pre-installed)

Usage

Available Aliases

Once installed, you'll have access to these aliases across all shells:

Navigation

..          # cd ..
...         # cd ../..
....        # cd ../../..
.....       # cd ../../../..

d           # cd ~/Documents
dl          # cd ~/Downloads
dt          # cd ~/Desktop
dev         # cd ~/Developer

Git Shortcuts

g           # git
gst         # git status
ga          # git add
grm         # git rm
gc          # git commit
gp          # git push
gl          # git pull
gd          # git diff
gb          # git branch
gco         # git checkout

System Utilities

h           # history
j           # jobs
week        # show current week number
timer       # simple timer utility

# Network
ip          # get external IP address
localip     # get local IP address
flush       # flush DNS cache

# File operations
c           # trim newlines and copy to clipboard
cleanup     # remove .DS_Store files recursively

macOS-Specific

show        # show hidden files in Finder
hide        # hide hidden files in Finder
showdesktop # show desktop icons
hidedesktop # hide desktop icons
spotoff     # disable Spotlight indexing
spoton      # enable Spotlight indexing

Available Functions

These functions work across all supported shells:

File Management

# Create directory and cd into it
mkd project-name

# Change to top-most Finder window location (macOS)
cdf

# Create compressed tar.gz archive
targz folder-name

# Extract various archive formats
extract archive.zip
extract archive.tar.gz
extract archive.rar
# ... supports many formats

Environment Variables

The configuration sets up several useful environment variables:

  • PATH: Optimized with common development tool paths
  • EDITOR: Set to your preferred editor (neovim if available, vim otherwise)
  • Development tools: Configured for various programming languages and tools

Customization

Local Configuration

Add machine-specific settings without modifying the main configuration:

  • Create ~/.zshrc.local with your custom settings

This file is automatically sourced at the end of .zshrc if it exists.

Adding New Aliases or Functions

To add new aliases or functions:

  1. Edit .zshrc and add your customizations, or
  2. Add them to ~/.zshrc.local to keep them separate from the base config

Vim Setup

Requires Neovim (>= 0.5)

Other Tools

Tmux Configuration

  • Modern terminal multiplexer setup with sensible defaults
  • Mouse support and improved key bindings
  • Seamless navigation between tmux panes and vim splits

Git Configuration

  • Useful aliases for common git operations
  • Enhanced diff and log visualization
  • Sensible defaults for better usability

Resources

License

This project is licensed under MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •