dotfiles

Dotfiles Preview

Overview

a dotfiles repository for Arch Linux using GNU Stow, with an automated setup script and archinstall configuration.

Repository Structure

dotfiles/
├── packages/          # GNU Stow-compatible directories
│   ├── qtile/.config/qtile/ # Qtile window manager config
│   ├── picom/.config/picom/ # Picom compositor config
│   ├── wezterm/.config/wezterm/ # Wezterm terminal config
│   └── ...                 # Add your own configs here
├── scripts/
│   └── setup.sh             # Dotfiles deployment script
├── config.json              # archinstall configuration
└── README.md                # This documentation

Installation

Arch Linux Installation

  1. Prepare installation media:
    Download Arch ISO from archlinux.org

  2. Boot into live environment

  3. Run archinstall with preset config:

    archinstall --config https://chenxing-dev.github.io/dotfiles/config.json
    

Dotfiles setup

  1. Clone the repository (including submodules):
    git clone --recurse-submodules https://github.com/chenxing-dev/dotfiles.git ~/dotfiles
    
  2. Run the setup script:
    cd ~/dotfiles
    ./scripts/setup.sh --all
    

    Reboot.

Usage

Deployment Options

# Deploy all configurations
./scripts/setup.sh --all

# Deploy specific packages
./scripts/setup.sh qtile wezterm yazi

Adding New Configurations

  1. Create a new package structure:
    mkdir -p packages/newtool/.config/newtool
    
  2. Add your configuration files:
    cp ~/.config/newtool/config.toml packages/newtool/.config/newtool/
    
  3. Deploy:
    ./scripts/setup.sh newtool
    

Backup restoration:

   # View available backups
   ls ~/dotfiles_backup
   
   # Restore a package
   cp -r ~/dotfiles_backup/qtile_20240611_1420/* ~/

Troubleshooting

Ensure ~/.local/bin is in PATH

For bash users:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Updating Submodules

To update submodules to their latest commits:

git submodule update --remote --recursive

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b new-feature)
  3. Commit your changes
  4. Push to the branch
  5. Open a pull request

Credits

License

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