This repository contains my dotfiles, organized for efficient management using an integrated package manager built around GNU Stow. This setup simplifies the process of enabling and disabling configurations using symlinks, making it easier to manage and switch between setups.
- Introduction
- Features
- Showcase
- How to Use
- Available Commands
- How It Works
- Example Directory Structure
- Contributing
- TODOs
This repository houses my personal dotfiles for tools like Neovim, Hyprland, Zsh, and others. By leveraging an integrated package manager, you can quickly enable or disable these configurations, ensuring a seamless experience across systems. This approach provides flexibility, whether you prefer an interactive terminal interface or command-line efficiency.
- Centralized storage for dotfiles with a consistent structure.
- Integrated package manager for managing configurations interactively or via the command line.
- Simplifies symlink creation using GNU Stow.
- Automatically detects enabled and disabled packages.
- Compatible with Linux, macOS, and other Unix-based systems.
-
Clone this repository into your preferred location:
git clone https://github.com/username/dotfiles.git ~/dotfiles
-
Navigate to the directory:
cd ~/dotfiles
-
Ensure GNU Stow is installed. If not, install it using your package manager:
sudo apt install stow # For Debian-based systems sudo pacman -S stow # For Arch-based systems brew install stow # For macOS
-
Ensure your dotfiles are organized under the
packages/
directory. -
Run the package manager in interactive mode:
python3 package_manager.py
-
Alternatively, use command-line options for specific tasks (see Available Commands).
You can use the following command-line options to manage your configurations:
-i, --install PACKAGE Enable one or more packages (e.g., nvim, zsh).
-r, --remove PACKAGE Disable one or more packages.
-le, --list-enabled List all currently enabled packages.
-ld, --list-disabled List all currently disabled packages.
-la, --list-all List all available packages.
Examples:
# Enable configurations for nvim and zsh
python3 manager.py -i nvim zsh
# Disable the nvim configuration
python3 manager.py -r nvim
# List all enabled packages
python3 manager.py -le
# List all disabled packages
python3 manager.py -ld
- Packages Directory: Dotfiles are grouped into packages under the
packages/
directory. Each package corresponds to a specific tool or application. - Symlinks with Stow: GNU Stow handles the creation of symlinks in
$HOME
or$HOME/.config
based on the package structure. - Interactive Mode: Navigate and toggle packages using an easy-to-use terminal interface.
- Direct Commands: Command-line options allow quick enable/disable actions.
Organize your dotfiles in the packages/
directory as follows:
dotfiles/
├── packages/
│ ├── nvim/
│ │ ├── .config/
│ │ │ ├── nvim/
│ │ │ │ ├── init.lua
│ │ │ │ ├── etc.lua
│ ├── hypr/
│ │ ├── .config/
│ │ │ ├── hypr/
│ │ │ │ ├── hyprland.conf
│ │ │ │ ├── hyprpaper.conf
│ │ │ │ ├── etc.conf
│ ├── zsh/
│ │ ├── .zshrc
│ │ ├── .zsh_env
│ │ ├── .zsh_etc
When enabling the nvim
package, the manager creates symlinks for its configuration files under $HOME/.config/nvim
.
When enabling the zsh
package, the manager creates symlinks for its configuration files directly under $HOME
, as the files are not located within a .config directory in the package.
Contributions are welcome! Feel free to:
- Fork the repository.
- Create a branch for your changes:
git checkout -b feature/my-feature
- Submit a pull request with a clear description of your improvements.
- Add a feature to replace existing dotfiles in the repository with the user's current setup. - For example, copy
$HOME/.config/hypr/
topackages/hypr/.config/hypr/
. - Ensure proper structure and prompt for confirmation if files already exist.
If you encounter any issues or have questions, open an issue in the repository. Enjoy managing your dotfiles effortlessly!