refactor: restructure #4
Open
steveclarke wants to merge 37 commits intomasterfrom
Open
Conversation
Updated the installation process by organizing scripts into a dedicated `linux` directory. This change enhances clarity and maintainability by separating Linux-specific installation scripts from the general installation structure. Additionally, updated README references to reflect the new directory organization, ensuring users can easily locate and execute the appropriate scripts for their platform.
Added a Justfile to facilitate linting and syntax checking of shell scripts using shellcheck. This addition improves code quality by allowing users to easily run checks on their scripts, ensuring adherence to best practices. Also updated the install.sh script to include shellcheck disable comments for better compatibility with linting tools.
Modified the cloning instructions in the README to specify the `feature/restructure` branch. This change ensures users are directed to the correct branch for installation, aligning with recent restructuring efforts and improving the clarity of the setup process.
Finalized the organization of configuration and fixes directories by creating platform-specific structures for Linux and macOS. This includes the addition of dedicated stow scripts for each platform, enhancing the clarity and maintainability of the configuration management process. Updated the todo list to reflect the completion of these phases and recommended next steps for library structure improvement and root directory cleanup.
Refactored the oversized `lib/dotfiles.sh` into platform-specific modules for Linux and macOS, creating `lib/linux.sh`, `lib/macos.sh`, and `lib/bootstrap.sh`. This change significantly enhances code organization and maintainability by reducing the core library size from 275 lines to 35 lines. Updated various scripts to source the new modules, ensuring proper functionality across platforms. The todo list has been updated to reflect the completion of this phase and the next recommended steps for root directory cleanup.
Updated the README to reflect significant changes in the repository's structure, enhancing clarity and cross-platform support. The organization now includes dedicated directories for platform-specific configurations, installation scripts, and documentation. Added a section detailing recent restructuring efforts and migration notes for users transitioning from older versions. This update aims to provide a clearer understanding of the project layout and improve user experience.
Updated multiple scripts to include standardized headers with metadata such as script name, description, platform, and dependencies. Implemented consistent error handling using `set -euo pipefail` across all main scripts. This enhances clarity, maintainability, and reliability of the scripts, ensuring a uniform approach to error management and documentation throughout the codebase.
Standardized headers, error handling, and package installation approaches across 15+ scripts, enhancing reliability and maintainability. Created a comprehensive script header template and updated all main scripts to follow consistent patterns. This phase significantly improves user experience with clear progress indicators and helpful tips, ensuring all scripts pass syntax validation and adhere to best practices. Updated the todo list to reflect the completion of this phase and the next steps for enhancing the utility script.
Added five new commands (`install`, `config`, `doctor`, `clean`, `help`) to the `bin/dotfiles` utility, improving user experience with platform detection and enhanced feedback. Updated help documentation with usage examples and tips, making it easier for users to manage their dotfiles. This enhancement significantly boosts the utility's functionality and usability.
Introduced a robust dependency management system to validate script requirements before execution. This includes standardized dependency declarations, platform compatibility checks, and conflict detection. Updated multiple installation scripts to include dependency declarations, enhancing reliability and user experience. Created detailed documentation on dependency management, providing examples and best practices for script authors. This improvement significantly streamlines the installation process and ensures compatibility across different environments.
Introduced a new command to install fonts, enhancing cross-platform support. Added a dedicated script for macOS that copies fonts to the appropriate directory, as macOS does not support symlinked fonts. Updated the Linux installation process to include font stowing and cache updating. Enhanced the help documentation to reflect the new font installation command, improving user experience and functionality.
Introduced a robust logging and error handling framework across the dotfiles repository. This includes structured logging with multiple levels (DEBUG, INFO, WARN, ERROR), enhanced error context reporting, and progress tracking for installations. Updated the `bin/dotfiles` utility with new commands for log management and debugging. Enhanced existing scripts to utilize the new logging functions, improving overall reliability and user experience. Created detailed documentation on logging and error handling, providing examples and best practices for users and script authors.
Introduced a comprehensive unified package management system that supports multiple package managers (apt, brew, snap, flatpak) with automatic detection and intelligent fallback mechanisms. Enhanced the `bin/dotfiles` utility with new commands for package installation, removal, listing, and conflict checking. Updated existing scripts to utilize the new package management functions, improving cross-platform compatibility and user experience. Created detailed documentation outlining usage, examples, and integration patterns for the new system, significantly streamlining the installation process across different environments.
Introduced a comprehensive resumable installation system that tracks installation progress and allows users to pause and resume installations seamlessly. Enhanced the `install.sh` script with modular step functions for macOS and Linux, improving reliability and user experience. Added new commands to the `bin/dotfiles` utility for managing installation state, including status checks, resuming, and resetting. Updated documentation to provide detailed usage instructions and best practices for the new system, significantly enhancing the installation process across different environments.
Enhanced the README with new documentation links for logging, error handling, and package management systems. Added new rules for cursor IDE files to the .gitignore, ensuring proper management of configuration files. Introduced new markdown files for dotfiles and package management rules, providing clear guidelines for users. Updated TODO list to reflect ongoing improvements in script subsystems.
Updated the logging configuration to store log files within the dotfiles directory, improving organization. Added new entries to the .gitignore for installation state and log files, ensuring proper management of temporary files. Revised documentation to reflect the new log file path and provide clearer instructions on logging and error handling. Introduced a .gitkeep file in the logs directory to maintain its presence in the repository.
…tion Revised the installation instructions in the README to reflect the new command for running the installation script. Added detailed architecture documentation outlining the core systems, directory structure, and best practices for the dotfiles setup. This enhances user understanding and provides clear guidelines for utilizing the dotfiles effectively.
Replaced the DEBUG environment variable with DOTFILES_DEBUG in the documentation to ensure consistency across the dotfiles setup. This change clarifies the correct variable to use for enabling debug output, improving troubleshooting guidance for users.
Introduced new environment variables for logging and debugging in the dotfiles configuration. Added `DOTFILES_DEBUG` to enable debug mode and `DOTFILES_LOG_LEVEL` to set the minimum log level. Updated documentation to reflect these changes, enhancing user control over logging behavior and improving troubleshooting capabilities.
Updated the breaktimer installation script to include error handling, logging, and autostart functionality. The script now checks if BreakTimer is already installed before proceeding, improving user experience by preventing redundant installations. Additionally, it creates an autostart entry for BreakTimer, ensuring the application launches on login. This enhancement streamlines the installation process and provides better integration with the user's environment.
Revised the commands for testing script dependencies in the README and related documentation. The previous command 'test basic' has been replaced with 'test script <script-path>' to provide clearer instructions for validating specific scripts. This change enhances user understanding and ensures consistency across the documentation, improving the overall user experience when managing dependencies.
Updated the installation and configuration scripts to use 'bash' instead of 'source' for executing shell scripts. This change enhances compatibility and ensures that scripts are run in a subshell, preventing potential variable conflicts and improving overall script reliability across different platforms.
Updated the stow script to conditionally execute stow commands based on the operating system. For Linux, the script performs a standard stow operation, while for macOS, it excludes Linux-only binaries to ensure compatibility. This change enhances the usability of the dotfiles across different platforms.
Introduced a new iTerm2 preferences file (`com.googlecode.iterm2.plist`) and a README with setup instructions for syncing preferences using iTerm2's custom folder feature. This addition streamlines the configuration process and enhances user experience by automating settings management across multiple machines.
Updated the installation scripts to replace the previous stow script with a new cross-platform version located in the setups directory. Introduced separate scripts for macOS and Linux configurations, enhancing compatibility and organization. This change streamlines the configuration process by ensuring that platform-specific settings are applied correctly.
Introduced new Zsh configuration files, including .zprofile and .zshrc, to enhance the Zsh shell experience. Added a macOS-specific setup script to configure Zsh as the default shell, ensuring a seamless installation process. Updated the stow script to include Zsh configurations, improving organization and usability of the dotfiles.
Updated the dotfiles documentation to include guidelines for using `set -euo pipefail` in scripts. This addition ensures that scripts fail fast and exit with an error code if any command fails, improving reliability and user experience.
… into feature/restructure
Introduced comprehensive auto-completion for the dotfiles command across major shells: Bash, Zsh, and Fish. Added configuration files for each shell to enhance user experience by providing command and subcommand suggestions. Updated README to include instructions on enabling auto-completion, improving overall usability and accessibility of the dotfiles.
… into feature/restructure
Introduced a detailed migration plan to modernize all existing scripts in the dotfiles repository. The plan outlines phases for implementing a Dependency Management System, Logging and Error Handling System, Unified Package Management System, and Resumable Installation System. It categorizes scripts based on their modernization status and provides specific tasks and examples for each phase, ensuring a structured approach to enhance script reliability, usability, and maintainability.
Introduced a dry-run mode to simulate script operations without making actual changes, improving user experience during testing. Enhanced logging capabilities to provide detailed output for both real and simulated executions, including progress tracking and error handling. Updated existing scripts to support new logging features and ensure consistent behavior across the dotfiles repository.
Replaced direct calls to command functions with new run_* prefixed functions for better organization and clarity. Added a run_version function to display version information and system details, enhancing the user experience and providing useful context for the dotfiles management system.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated the installation process by organizing scripts into a dedicated
linuxdirectory. This change enhances clarity and maintainability by separating Linux-specific installation scripts from the general installation structure. Additionally, updated README references to reflect the new directory organization, ensuring users can easily locate and execute the appropriate scripts for their platform.