# sagittariu5a/dotfiles architecture

> Architecture diagram of the GitHub repository sagittariu5a/dotfiles, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sagittariu5a/dotfiles
- Repository: https://github.com/sagittariu5a/dotfiles

## Overview

##### Main Components
- HOME Directory: Represent the “HOME” folder as the root component where all configurations reside.
- Configuration Subdirectories:
- Neovim (HOME/config/nvim): Contains the initialization file and related Lua subdirectories for autocmds, keymaps, options, plugins, etc.
- Oh My Posh (HOME/config/ohmyposh): Holds the custom theme files.
- tmux (HOME/config/tmux): Contains the tmux configuration.
- Other Shell Scripts (shell/ and shell/linux): These are helper scripts for configuring or deploying dotfiles. They are responsible for automating installation and setup of the various tools.
- Additional Elements:
- Global configuration files such as .gitignore, LICENSE, README.md, and the zshrc file.
- The make.sh and additional utility scripts in shell directories, which indicate automation/build steps.

##### Relationships and Interactions
- The central HOME configuration acts as the source for individual tool configurations.
- Neovim’s configuration interacts with its plugins and options submodules, indicating a modular design.
- tmux and Oh My Posh configurations are handled separately but share a common concept of environmental customization.
- The shell scripts under “shell/linux” and “shell” directories act as deployment or setup routines that load and deploy these configurations into the user’s environment.
- .gitignore and LICENSE are external components that facilitate version control and open-source licensing of these dotfiles.

##### Architectural Patterns or Design Principles
- Modularity: Each tool (Neovim, tmux, etc.) has its own dedicated directory and configuration files, promoting separation of concerns.
- Automation and consistency: The existence of multiple shell scripts for configuration suggests an emphasis on automating environment setup.
- Simplicity & Transparency: With a lightweight structure, every piece of configuration can be clearly mapped and updated as needed.

##### Relevant Technologies and Frameworks
- Neovim with Lua-based configuration.
- Oh My Posh for customizing the command prompt.
- tmux for terminal multiplexing.
- zsh as the shell (with configuration provided by zshrc).
- Shell scripting for automation.
- Git (indicated by .gitignore) to version control the dotfiles.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Root Node
    DotfilesRepo["Dotfiles Repository"]:::repo

    %% Configuration Subgraph
    subgraph "Configurations"
        NeovimConfig["Neovim Config"]:::config
        OhMyPoshConfig["Oh My Posh Config"]:::config
        TmuxConfig["tmux Config"]:::config
        ZshConfig["Global zsh Config"]:::config
        VersionControl["Version Control Files"]:::version

        %% Neovim details
        NeovimConfig --> initLua["init.lua"]:::config
        NeovimConfig --> luaConfig["Lua/Config"]:::config
        NeovimConfig --> luaPlugins["Lua/Plugins"]:::config

        %% Version control files details
        VersionControl --> gitignore[".gitignore"]:::version
        VersionControl --> license["LICENSE"]:::version
        VersionControl --> readme["README.md"]:::version
    end

    %% Automation Scripts Subgraph
    subgraph "Automation Scripts"
        ShellScripts["General Shell Scripts"]:::script
        LinuxScripts["Linux Shell Scripts"]:::script

        ShellScripts --> shellUtils["Utils Script"]:::script
        
        LinuxScripts --> configNeovimLinux["config.nvim.sh"]:::script
        LinuxScripts --> configOhMyPoshLinux["config.ohmyposh.sh"]:::script
        LinuxScripts --> configTmuxLinux["config.tmux.sh"]:::script
        LinuxScripts --> initLinux["init.sh"]:::script
        LinuxScripts --> linuxUtils["utils.sh"]:::script
        LinuxScripts --> zshrcLinux["zshrc.sh"]:::script
    end

    %% Relationships from Dotfiles Repository to configurations and automation scripts
    DotfilesRepo --> NeovimConfig
    DotfilesRepo --> OhMyPoshConfig
    DotfilesRepo --> TmuxConfig
    DotfilesRepo --> ZshConfig
    DotfilesRepo --> VersionControl
    DotfilesRepo --> ShellScripts
    DotfilesRepo --> LinuxScripts

    %% Deployment links from automation scripts to configuration components
    configNeovimLinux --> NeovimConfig
    configOhMyPoshLinux --> OhMyPoshConfig
    configTmuxLinux --> TmuxConfig
    zshrcLinux --> ZshConfig

    %% Click Events
    click DotfilesRepo "https://github.com/sagittariu5a/dotfiles/tree/master/HOME"
    click NeovimConfig "https://github.com/sagittariu5a/dotfiles/tree/master/HOME/config/nvim"
    click initLua "https://github.com/sagittariu5a/dotfiles/blob/master/HOME/config/nvim/init.lua"
    click luaConfig "https://github.com/sagittariu5a/dotfiles/tree/master/HOME/config/nvim/lua/config"
    click luaPlugins "https://github.com/sagittariu5a/dotfiles/tree/master/HOME/config/nvim/lua/plugins"
    click OhMyPoshConfig "https://github.com/sagittariu5a/dotfiles/tree/master/HOME/config/ohmyposh"
    click TmuxConfig "https://github.com/sagittariu5a/dotfiles/blob/master/HOME/config/tmux/tmux.conf"
    click ZshConfig "https://github.com/sagittariu5a/dotfiles/tree/master/HOME/zshrc"
    click shellUtils "https://github.com/sagittariu5a/dotfiles/blob/master/shell/utils.sh"
    click configNeovimLinux "https://github.com/sagittariu5a/dotfiles/blob/master/shell/linux/config.nvim.sh"
    click configOhMyPoshLinux "https://github.com/sagittariu5a/dotfiles/blob/master/shell/linux/config.ohmyposh.sh"
    click configTmuxLinux "https://github.com/sagittariu5a/dotfiles/blob/master/shell/linux/config.tmux.sh"
    click initLinux "https://github.com/sagittariu5a/dotfiles/blob/master/shell/linux/init.sh"
    click linuxUtils "https://github.com/sagittariu5a/dotfiles/blob/master/shell/linux/utils.sh"
    click zshrcLinux "https://github.com/sagittariu5a/dotfiles/blob/master/shell/linux/zshrc.sh"
    click gitignore "https://github.com/sagittariu5a/dotfiles/blob/master/.gitignore"
    click license "https://github.com/sagittariu5a/dotfiles/tree/master/LICENSE"
    click readme "https://github.com/sagittariu5a/dotfiles/blob/master/README.md"

    %% Styles
    classDef repo fill:#FFDDCC,stroke:#D14,stroke-width:2px;
    classDef config fill:#CCFFFF,stroke:#006699,stroke-width:2px;
    classDef script fill:#CCFFCC,stroke:#339933,stroke-width:2px;
    classDef version fill:#FFFFCC,stroke:#999900,stroke-width:2px;
```
