# danielrouco/dotfiles architecture

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

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

## Overview

##### Project Context and Purpose
- This is a dotfiles repository meant for personal use. It configures the Linux desktop by providing preconfigured settings for various applications.
- The tools include Sway (window manager), Waybar (status bar), Wofi (application launcher), Foot (terminal emulator), Dunst (notification manager), Neovim (text editor), Zathura (PDF viewer), and Ranger (file manager).

##### Main Components
- Sway: The core tiling window manager, which acts as the central component managing windows and input.
- Waybar: The status bar for displaying system and workspace information, directly interfacing with Sway.
- Wofi: The application launcher that integrates with the desktop environment.
- Foot: The terminal emulator, a fundamental tool for command-line operations.
- Dunst: The notification manager, which handles system alerts.
- Neovim: The text editor, essential for code and text editing.
- Zathura: The PDF viewer with vim-style keybindings.
- Ranger: The terminal file manager, also employing vim keybindings.
- .bashrc and other user-specific configurations: Provide shell environment setup and additional customizations.

##### Establish Relationships and Interactions
- Waybar should be connected directly to Sway, showing that it relies on the window manager to determine what to display (like workspace and window information).
- Directional flows, for example:
- User inputs or starts session → Sway initiates the desktop environment.
- Sway → Launches Waybar (for status information), Wofi (for application launching), and integrates notifications (Dunst).
- Foot, Neovim, Zathura, and Ranger operate within the Sway environment as applications triggered by user interactions.

##### Architectural Patterns and Design Principles
- Although these configuration files don’t form a “runtime” architecture in the traditional sense, they illustrate a modular design where each tool is independently configured while smoothly integrating into the overall system.
- Follow separation of concerns: each tool’s config file (e.g., sway/config, waybar/config.jsonc, foot/foot.ini) is encapsulated in its own directory.
- Dependency relationships: user environment settings (.bashrc and user-dirs) feeding into system-level configuration.

##### Incorporate Relevant Technologies and Configuration Files
- Out each tool along with their primary configuration file:
- Sway → sway/config
- Waybar → waybar/config.jsonc, waybar/style.css
- Wofi → wofi/style.css
- Foot → foot/foot.ini
- Dunst → dunst/dunstrc
- Neovim → nvim/init.lua (and lazy-lock.json indicating plugin or lazy runtime management)
- Ranger → ranger/rc.conf, ranger/rifle.conf
- Zathura → zathura/zathurarc
- Shell environment → .bashrc
- Optionally mention user directories config files (user-dirs.conf, user-dirs.dirs) used to structure user file locations.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Top-level Initiation
    User["User"]:::userConf

    %% User Configurations Subgraph
    subgraph "User Configurations"
        Bash[".bashrc (Shell Environment Config)"]:::userConf
        UserDirs["User Directories Config"]:::userConf
    end

    %% Core Environment Subgraph
    subgraph "Core Environment"
        Sway["Sway (Window Manager)"]:::coreEnv
        Dunst["Dunst (Notification Manager)"]:::coreEnv
    end

    %% Status and Launchers Subgraph
    subgraph "Status and Launchers"
        Waybar["Waybar (Status Bar)"]:::status
        Wofi["Wofi (Application Launcher)"]:::status
    end

    %% Applications Subgraph
    subgraph "Applications"
        Foot["Foot (Terminal Emulator)"]:::app
        Neovim["Neovim (Text Editor)"]:::app
        Zathura["Zathura (PDF Viewer)"]:::app
        Ranger["Ranger (Terminal File Manager)"]:::app
    end

    %% Connections
    User -->|"starts"| Sway
    Bash -->|"configures"| Sway
    UserDirs -->|"configures"| Sway

    Sway -->|"triggers"| Waybar
    Sway -->|"triggers"| Wofi
    Sway -->|"integrates"| Dunst

    Sway -->|"launches"| Foot
    Sway -->|"launches"| Neovim
    Sway -->|"launches"| Zathura
    Sway -->|"launches"| Ranger

    Foot -->|"notify"| Dunst
    Neovim -->|"notify"| Dunst
    Zathura -->|"notify"| Dunst
    Ranger -->|"notify"| Dunst

    %% Click Events
    click Sway "https://github.com/danielrouco/dotfiles/tree/master/sway/config"
    click Waybar "https://github.com/danielrouco/dotfiles/blob/master/waybar/config.jsonc"
    click Waybar "https://github.com/danielrouco/dotfiles/blob/master/waybar/style.css"
    click Wofi "https://github.com/danielrouco/dotfiles/blob/master/wofi/style.css"
    click Foot "https://github.com/danielrouco/dotfiles/blob/master/foot/foot.ini"
    click Dunst "https://github.com/danielrouco/dotfiles/tree/master/dunst/dunstrc"
    click Neovim "https://github.com/danielrouco/dotfiles/blob/master/nvim/init.lua"
    click Neovim "https://github.com/danielrouco/dotfiles/blob/master/nvim/lazy-lock.json"
    click Ranger "https://github.com/danielrouco/dotfiles/blob/master/ranger/rc.conf"
    click Ranger "https://github.com/danielrouco/dotfiles/blob/master/ranger/rifle.conf"
    click Bash "https://github.com/danielrouco/dotfiles/blob/master/.bashrc"
    click UserDirs "https://github.com/danielrouco/dotfiles/blob/master/user-dirs.conf"
    click UserDirs "https://github.com/danielrouco/dotfiles/blob/master/user-dirs.dirs"
    click Zathura "https://github.com/danielrouco/dotfiles/tree/master/zathura/zathurarc"

    %% Styles
    classDef coreEnv fill:#A2D9CE,stroke:#117864,stroke-width:2px;
    classDef status fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef app fill:#AED6F1,stroke:#2471A3,stroke-width:2px;
    classDef userConf fill:#F5B7B1,stroke:#C0392B,stroke-width:2px;
```
