mirror of
https://github.com/sebaschi/dotfiles.git
synced 2025-11-08 22:54:29 +01:00
1007 B
1007 B
Python Dot-Install Improvements
Key Improvements
- Centralized config registry system that makes adding new configs much easier
- Each config only needs to be registered once with its source, destination, and optional post-actions
- XDG_CONFIG_HOME is properly used if available
- Directory creation is handled automatically as part of the installation process
- Commands are generated dynamically from the registry
- Maintains the same command structure as the original script
Adding New Configurations
To add a new configuration, simply register it using the register_config function:
register_config(
'new_config', # Name
DOTFILES_DIR / "path" / "to" / "file", # Source path (or list of paths)
CONFIG_DIR / "destination" / "path", # Destination path (or list of paths)
[optional_post_action_functions], # Optional post-installation actions
"Description of this configuration" # Description (for help text)
)