# ornfelt/dots architecture

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

- Interactive diagram: https://gitdiagram.com/ornfelt/dots
- Repository: https://github.com/ornfelt/dots

## Overview

This dotfiles project is not a traditional full-stack application but rather a comprehensive, modular collection of configuration files and custom scripts that enable you to manage and personalize a Linux desktop environment. The repository contains settings and patches for multiple window managers (such as dwm, awesomewm, hyprland, and i3), tools (like polybar, dmenu, conky, cava, and more), terminal emulators (kitty, st, wezterm), editors (Neovim), and many custom utility scripts stored under the “bin” directory. It also includes installation and update scripts as well as a folder of screenshots to illustrate the visual configuration.

##### Key components
- Application Configurations: Include components for terminal emulators (kitty, st, wezterm), text editors (nvim), compositor (picom), file managers (lf, ranger), etc. Each component can be represented as a module dedicated to a specific application’s configuration.
- Utility and Status Bar Tools: Components such as polybar, conky, cava, and custom statusbar scripts should be illustrated. They integrate into your system as overlays or as utilities to display system information.
- Custom Scripts (“bin” directory): These include various shell scripts and custom tools for automation (e.g., screenshot tools, system commands, key binders, installation/updating, and launching custom components). These can be grouped as the “Automation & Utilities” layer.
- Installation & Deployment: The “installation” folder and setup scripts (like setup.sh, sync_dots.sh, update_dots.sh) are part of the process to deploy these configurations on a target system.
- Miscellaneous: Global configuration files (such as .bash_profile, .bashrc, .Xresources, .zshrc, .xinitrc) that bootstrap the environment.

##### Relationships and interactions
- That the installation scripts take care of deploying and synchronizing each of these modules into the system’s environment.
- Patch application flows in the “dwm”, “st”, and other window manager folders to show that custom patches or configuration modifications are applied.

##### Important architectural design principles
- Modularity: The repo is structured into many independent configuration “modules” (each in its own directory) so that a change in one (say, polybar or a specific WM’s config) is isolated.
- Reusability & Automation: With the large “bin” directory and installation scripts, much of the configuration is automated; indicate flows from installation scripts to config deployment.

##### Relevant technologies and frameworks
- Technologies: Lua (for awesomewm and its extensions), C (for dwm, st, etc.), shell scripting (bash, zsh), and configuration languages (TOML, YAML, and SCSS).
- Integration with external packages (like system-level utilities) and how the dotfiles interact with the desktop session (e.g., xinitrc, .Xresources).

##### Final detailed approach
- Next, indicate the configuration layers splitting into window managers, terminal settings, and utilities.
- Installation and update scripts as the “deployment” layer interacting with each module.

## Diagram (Mermaid)

```mermaid
graph TD
    A["OS & Shell Environment<br/>(Global/Misc Config Files)"]:::os
    B["Installation & Deployment Scripts"]:::installation

    subgraph "Configuration Modules"
        subgraph "Window Manager Configurations"
            AW["AwesomeWM Config"]:::wm
            DW["dwm Patches"]:::wm
            HY["Hyprland Config"]:::wm
            I3["i3 Config"]:::wm
        end
        subgraph "Terminal Emulator Configurations"
            K["Kitty Config"]:::terminal
            ST["st Config"]:::terminal
            WZ["Wezterm Config"]:::terminal
        end
        subgraph "Text Editor Configurations"
            NV["Neovim Config"]:::editor
        end
        subgraph "Compositor Configurations"
            C["Picom Config"]:::compositor
        end
        subgraph "File Manager Configurations"
            LF["lf Config"]:::fileMgr
            RG["ranger Config"]:::fileMgr
        end
        subgraph "Utility & Status Bar Tools"
            PB["Polybar Modules"]:::util
            CY["Conky Config"]:::util
            CV["Cava Config"]:::util
        end
        subgraph "Automation & Utilities"
            BS["Custom Scripts (bin)"]:::scripts
        end
    end

    %% Relationships
    A -->|"initializes"| B
    B -->|"deploys"| AW
    B -->|"deploys"| DW
    B -->|"deploys"| HY
    B -->|"deploys"| I3
    B -->|"deploys"| K
    B -->|"deploys"| ST
    B -->|"deploys"| WZ
    B -->|"deploys"| NV
    B -->|"deploys"| C
    B -->|"deploys"| LF
    B -->|"deploys"| RG
    B -->|"deploys"| PB
    B -->|"deploys"| CY
    B -->|"deploys"| CV
    B -->|"deploys"| BS
    BS -->|"feeds"| PB

    %% Legend
    subgraph "Legend"
        L_os["OS & Global/Misc Config Files"]:::os
        L_inst["Installation Scripts"]:::installation
        L_wm["Window Manager Configs"]:::wm
        L_term["Terminal Emulator Configs"]:::terminal
        L_edit["Text Editor Configs"]:::editor
        L_comp["Compositor Config (Picom)"]:::compositor
        L_fmgr["File Manager Configs"]:::fileMgr
        L_util["Utility & Status Bar Tools"]:::util
        L_scr["Custom Scripts"]:::scripts
    end

    %% Click Events for Component Mapping
    click AW "https://github.com/ornfelt/dots/tree/master/.config/awesome"
    click DW "https://github.com/ornfelt/dots/tree/master/.config/dwm"
    click HY "https://github.com/ornfelt/dots/tree/master/.config/hypr"
    click I3 "https://github.com/ornfelt/dots/tree/master/.config/i3"
    click K "https://github.com/ornfelt/dots/tree/master/.config/kitty"
    click ST "https://github.com/ornfelt/dots/tree/master/.config/st"
    click WZ "https://github.com/ornfelt/dots/blob/master/.wezterm.lua"
    click NV "https://github.com/ornfelt/dots/tree/master/.config/nvim"
    click C "https://github.com/ornfelt/dots/tree/master/.config/picom"
    click LF "https://github.com/ornfelt/dots/tree/master/.config/lf"
    click RG "https://github.com/ornfelt/dots/tree/master/.config/ranger"
    click PB "https://github.com/ornfelt/dots/tree/master/.config/polybar"
    click CY "https://github.com/ornfelt/dots/tree/master/.config/conky"
    click CV "https://github.com/ornfelt/dots/tree/master/.config/cava"
    click BS "https://github.com/ornfelt/dots/tree/master/bin"
    click B "https://github.com/ornfelt/dots/tree/master/installation"
    click A "https://github.com/ornfelt/dots/blob/master/.bash_profile"

    %% Styles
    classDef os fill:#d1e8ff,stroke:#333,stroke-width:2px;
    classDef installation fill:#c2f0c2,stroke:#333,stroke-width:2px;
    classDef wm fill:#ffd1dc,stroke:#333,stroke-width:2px;
    classDef terminal fill:#fef4c9,stroke:#333,stroke-width:2px;
    classDef editor fill:#d3cde3,stroke:#333,stroke-width:2px;
    classDef fileMgr fill:#cbe2b0,stroke:#333,stroke-width:2px;
    classDef util fill:#d0e1f9,stroke:#333,stroke-width:2px;
    classDef compositor fill:#f9d0d0,stroke:#333,stroke-width:2px;
    classDef scripts fill:#ffe5b4,stroke:#333,stroke-width:2px;
```
