This repository contains my personal dotfiles and shell configuration for Linux, Windows (PowerShell), and cross-platform development environments.
- Shell Configuration: Bash startup scripts, aliases, and environment setup
- Tool Configurations: Git, Vim, Tmux, Python, Node.js, Rust, and more
- Custom Scripts: Utility scripts in the
bin/directory - Cross-Platform Support: Linux bash and Windows PowerShell configurations
- Modular Design: Organized by tool/functionality with conditional loading
git clone https://github.com/harleypig/dotfiles.git ~/projects/dotfiles
cd ~/projects/dotfilesThe repository uses symbolic links to connect configuration files to your home directory:
# Create the main shell startup link
ln -sf ~/projects/dotfiles/shell-startup ~/.bash_profile
# Optional: Link other shell files if needed
ln -sf ~/projects/dotfiles/shell-startup ~/.bashrc
ln -sf ~/projects/dotfiles/shell-startup ~/.profileThe repository supports multiple dotlinks configurations for different environments:
dotlinks-default: Default configuration for most usersdotlinks-harleypig.com: Specific configuration for harleypig.com environmentdotlinks-sweetums: Configuration for sweetums environment
When to use: Choose the dotlinks file that matches your environment or create your own custom one.
How to set up:
# Copy the appropriate dotlinks file
cp dotlinks-default ~/.dotlinks
# Or create your own custom dotlinks file
# Edit ~/.dotlinks to specify which configuration files to linkThe bin-dirs-defaults file specifies additional directories to add to your
PATH:
# Default bin directories (in order of precedence)
$HOME/bin
$HOME/.local/bin
$HOME/.vim/bin
$HOME/.cabal/bin
$HOME/.cargo/bin
$HOME/.minecraft/bin
$HOME/go/bin
$HOME/.dotnet/tools
$HOME/Dropbox/bin
$HOME/videos/bin
$PROJECTS_DIR/depot_tools
$PROJECTS_DIR/android-sdk/tools
$PROJECTS_DIR/android-sdk/platform-toolsWhen to customize: If you have additional tool directories or want to change the PATH order.
How to set up:
# Use defaults (no action needed)
# The system will automatically use bin-dirs-defaults
# Or create custom bin directories
cp bin-dirs-defaults ~/.bin-dirs
# Edit ~/.bin-dirs to customize your PATH# Start a new login shell to test
bash -l
# Verify environment variables
echo "DOTFILES: $DOTFILES"
echo "XDG_CONFIG_HOME: $XDG_CONFIG_HOME"
# Check if completions are working
complete -p | grep gitThe .bash_profile, .bashrc, and .profile files all link to the same
shell-startup file. This unified approach provides:
- Simplicity: One central file to understand and modify
- Consistency: Same configuration regardless of how bash is started
- Vim Integration: Ensures aliases work when shelling from vim
- Modular Loading: Individual tool configurations in
config/shell-startup/
├── bin/ # Custom utility scripts
├── config/ # Tool-specific configurations
│ ├── completions/ # Bash completion files
│ ├── shell-startup/ # Modular shell startup files
│ ├── git/ # Git configuration
│ ├── vim/ # Vim configuration
│ └── ... # Other tool configs
├── docs/ # Documentation
├── powershell/ # Windows PowerShell configuration
├── shell-startup # Main shell startup script
├── dotlinks-default # Default dotlinks configuration
├── bin-dirs-defaults # Default PATH directories
└── README.md # This file
Tool configurations are organized in config/shell-startup/ with conditional
loading:
000-loadtokens: Load authentication tokens010-general: General environment setupgit: Git configuration and aliasespython: Python environment and poetry setupnodejs: Node.js and NVM configurationrust: Rust and Cargo setupvim: Vim configurationtmux: Tmux configurationssh-config-completion: SSH host completion
- Shell: Bash with comprehensive completion system
- Package Management: Supports apt, pacman, and other package managers
- Development Tools: Git, Vim, Tmux, Python, Node.js, Rust, Go
- System Integration: XDG Base Directory specification
The repository includes PowerShell configuration for Windows environments:
- PowerShell Profiles: Located in
powershell/directory - Git for Windows: Integration with Git Bash and PowerShell
- Cross-Platform Scripts: Some utilities work in both environments
Note: Windows support is actively being developed. Some features may be incomplete or require manual setup.
When using Git for Windows:
- Git Bash: Uses the same bash configuration as Linux
- PowerShell: Uses Windows-specific PowerShell profiles
- MSYS Integration: Handles symlink creation appropriately
Setup for Git for Windows:
# In Git Bash
ln -sf ~/projects/dotfiles/shell-startup ~/.bash_profile
# PowerShell setup (manual)
# Copy powershell/ files to appropriate PowerShell profile location- Create shell-startup file: Add
config/shell-startup/newtool - Add completion: Place completion file in
config/completions/ - Update PATH: Add to
bin-dirs-defaultsor~/.bin-dirs
- Create custom dotlinks: Copy and modify
dotlinks-default - Custom bin directories: Create
~/.bin-dirsfile - Tool-specific configs: Add files to
config/directory
- Symbolic links not working: Ensure you're using absolute paths
- Completions not loading: Check file permissions and tool installation
- PATH issues: Verify
bin-dirs-defaultsor~/.bin-dirsconfiguration - Environment variables: Use
bash -lto test login shell behavior
# Enable debug output
DEBUG=1 bash -l
# Check specific configurations
bash -l -c 'echo "DOTFILES: $DOTFILES"'- Bash Completion: Detailed explanation of the completion system
- Git Aliases: List of available git aliases
- Conventions: Coding and configuration conventions
This is a personal dotfiles repository, but suggestions and improvements are welcome. Please:
- Test changes thoroughly
- Document new features
- Maintain backward compatibility
- Follow existing conventions
See LICENSE file for details.