# gabrielfrimodig/dotfiles architecture

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

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

## Overview

##### Project Type and Purpose
- This is a dotfiles repository containing a fully customized AwesomeWM (a tiling window manager) configuration.
- Its purpose is to define a personalized desktop environment: window behavior (tiling, floating), keybindings, theming, status bar widgets, popups, and startup scripts.

##### File Structure Analysis
- Top‐level directories:
- `.config/awesome`: main configuration folder for AwesomeWM
- `.config/kitty`, `.config/picom`, `.config/rofi`: configs for terminal, compositor, launcher
- `.zshrc`, `LICENSE`, `README.md`: shell config and metadata
- Inside `.config/awesome`:
- `rc.lua`: entry point that loads all modules
- `autostart.sh`: startup script (sets wallpaper, launches background services)
- `bindings/`: keyboard & mouse mappings
- `config/`: core layout & menu definitions, gap settings, signal hooks
- `rules/`: application-to-tag/screen placement rules
- `signals/`: reaction scripts on brightness change, errors, screen corners
- `ui/`: wibar/bar widgets, popups, notifications, powermenu

##### README Insights
- Lists dependencies (AwesomeWM core, picom, feh, rofi, maim, playerctl, etc.)
- Describes features: dynamic widgets, popups on volume/brightness, wallpaper on startup
- Highlights multi-screen and tag‐mapping rules for apps (e.g., Spotify→tag8)

a. Main Components
1. Operating System (Fedora Workstation)
2. X Server (Xorg)
3. AwesomeWM Core (git version)
4. AwesomeWM Modules (Lua scripts):
- Autostart
- Bindings
- Config (layout, menus, gaps)
- Rules
- Signals
- Theme
- UI (bar, popups, notifications, powermenu)
5. External Tools/Services invoked:
- feh (wallpaper)
- picom (compositor)
- rofi (launcher)
- maim/xclip (screenshots)
- pactl, acpi, xbacklight (status scripts)
- playerctl, i3lock
- Shell (zsh), Terminal (kitty)
b. Relationships & Interactions
- OS starts X Server → X Server spawns AwesomeWM
- rc.lua loads modules in sequence: autostart → config → bindings → rules → signals → theme → UI
- Autostart.sh uses feh to set wallpaper and may launch picom
- Keybindings trigger Lua callbacks that call external binaries (rofi, maim, pactl, etc.)
- Signals watch system events (brightness change, battery, error) and update widgets/popups
- Rules assign newly created client windows to specific screens/tags
c. Architectural Patterns
- Modular plugin‐style architecture: each concern lives in its own directory
- Event‐driven: “signals” modules react to system/window events
- Layered: core (rc.lua & config) → extensions (bindings, rules, theme) → UI
d. Key Technologies & Libraries
- Lua (scripting language for AwesomeWM)
- AwesomeWM API modules: awful, naughty, ruled, wibox
- External commands called via `awful.spawn.with_shell`

##### Elements
- Blue for core & modules
- Green for UI elements
- Orange for external system tools
- Rounded for scripts/modules
- Rectangles for binaries/services

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% External Tools
    subgraph "External Tools/Services"
        direction TB
        FEH["feh"]:::external
        PICOM["picom"]:::external
        ROFI["rofi"]:::external
        MAIM["maim/xclip"]:::external
        PACTL["pactl/acpi/xbacklight"]:::external
        PLAYERCTL["playerctl/i3lock"]:::external
        KITTY_TERMINAL["kitty (Terminal)"]:::external
        ZSH_SHELL["zsh"]:::external
    end

    %% UI Module
    subgraph "UI Module" 
        direction TB
        UI_INIT["init.lua"]:::coreModules
        subgraph "Wibar/Bar" 
            direction TB
            BAR_INIT["init.lua"]:::ui
            LAYOUTBOX["layoutbox.lua"]:::ui
            TAGLIST["taglist.lua"]:::ui
            TASKLIST["tasklist.lua"]:::ui
            WIDGETS["widgets/"]:::ui
        end
        NOTIFICATIONS["notifications/init.lua"]:::ui
        subgraph "Popups" 
            direction TB
            POP_LAYOUTS["layouts.lua"]:::ui
            POP_MIC["mic.lua"]:::ui
        end
        subgraph "Powermenu"
            direction TB
            POWER_INIT["init.lua"]:::ui
            POWER_BTN["button.lua"]:::ui
        end
    end

    %% Modules
    subgraph "AwesomeWM Modules" 
        direction TB
        AUTOSTART["autostart.sh"]:::coreModules
        BINDINGS_INIT["bindings/init.lua"]:::coreModules
        BIND_KEY["keyboard.lua"]:::coreModules
        BIND_MOUSE["mouse.lua"]:::coreModules
        CONFIG_INIT["config/init.lua"]:::coreModules
        CONFIG_LAYOUT["layout.lua"]:::coreModules
        CONFIG_MENU["menu.lua"]:::coreModules
        CONFIG_GAPS["gaps.lua"]:::coreModules
        CONFIG_SIGNALS["signals.lua"]:::coreModules
        RULES_INIT["rules/init.lua"]:::coreModules
        SIGNALS_INIT["signals/init.lua"]:::coreModules
        SIG_BRIGHT["brightness.lua"]:::coreModules
        SIG_CORNERS["corners.lua"]:::coreModules
        SIG_ERROR["error.lua"]:::coreModules
        THEME_MAIN["theme.lua"]:::coreModules
        THEME_LAYOUTS["layouts/"]:::coreModules
    end

    %% Core
    CORE["rc.lua"]:::coreModules

    %% X Server and OS
    XORG["X Server (Xorg)"]:::external
    OS["Operating System\n(Fedora)"]:::external

    %% Connections
    OS -->|"starts"| XORG
    XORG -->|"spawns"| CORE

    CORE -->|"loads"| AUTOSTART
    CORE -->|"loads"| CONFIG_INIT
    CORE -->|"loads"| BINDINGS_INIT
    CORE -->|"loads"| RULES_INIT
    CORE -->|"loads"| SIGNALS_INIT
    CORE -->|"loads"| THEME_MAIN
    CORE -->|"loads"| UI_INIT

    AUTOSTART -->|"sets wallpaper"| FEH
    AUTOSTART -->|"launches"| PICOM

    BINDINGS_INIT --> BIND_KEY
    BINDINGS_INIT --> BIND_MOUSE
    BINDINGS_INIT -->|"key press"| ROFI
    BINDINGS_INIT -->|"key press"| MAIM
    BINDINGS_INIT -->|"volume/brightness"| PACTL

    SIGNALS_INIT --> SIG_BRIGHT
    SIGNALS_INIT --> SIG_CORNERS
    SIGNALS_INIT --> SIG_ERROR

    UI_INIT --> BAR_INIT
    UI_INIT --> NOTIFICATIONS
    UI_INIT --> POP_LAYOUTS
    UI_INIT --> POWER_INIT

    BAR_INIT --> LAYOUTBOX
    BAR_INIT --> TAGLIST
    BAR_INIT --> TASKLIST
    BAR_INIT --> WIDGETS

    WIDGETS --> PACTL
    WIDGETS --> PLAYERCTL

    %% Click Events
    click CORE "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/rc.lua"
    click AUTOSTART "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/autostart.sh"
    click BINDINGS_INIT "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/bindings/init.lua"
    click BIND_KEY "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/bindings/keyboard.lua"
    click BIND_MOUSE "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/bindings/mouse.lua"
    click CONFIG_INIT "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/config/init.lua"
    click CONFIG_LAYOUT "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/config/layout.lua"
    click CONFIG_MENU "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/config/menu.lua"
    click CONFIG_GAPS "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/config/gaps.lua"
    click CONFIG_SIGNALS "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/config/signals.lua"
    click RULES_INIT "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/rules/init.lua"
    click SIGNALS_INIT "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/signals/init.lua"
    click SIG_BRIGHT "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/signals/brightness.lua"
    click SIG_CORNERS "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/signals/corners.lua"
    click SIG_ERROR "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/signals/error.lua"
    click THEME_MAIN "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/theme/catppuccino/theme.lua"
    click THEME_LAYOUTS "https://github.com/gabrielfrimodig/dotfiles/tree/master/.config/awesome/theme/catppuccino/layouts/"
    click UI_INIT "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/ui/init.lua"
    click BAR_INIT "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/ui/bar/init.lua"
    click LAYOUTBOX "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/ui/bar/layoutbox.lua"
    click TAGLIST "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/ui/bar/taglist.lua"
    click TASKLIST "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/ui/bar/tasklist.lua"
    click WIDGETS "https://github.com/gabrielfrimodig/dotfiles/tree/master/.config/awesome/ui/bar/widgets/"
    click NOTIFICATIONS "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/ui/notifications/init.lua"
    click POP_LAYOUTS "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/ui/popups/layouts.lua"
    click POP_MIC "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/ui/popups/mic.lua"
    click POWER_INIT "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/ui/powermenu/init.lua"
    click POWER_BTN "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/awesome/ui/powermenu/button.lua"
    click KITTY_TERMINAL "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/kitty/kitty.conf"
    click PICOM "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/picom/picom.conf"
    click ROFI "https://github.com/gabrielfrimodig/dotfiles/blob/master/.config/rofi/config.rasi"
    click ZSH_SHELL "https://github.com/gabrielfrimodig/dotfiles/blob/master/.zshrc"

    %% Styles
    classDef coreModules fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef ui fill:#90EE90,stroke:#000,stroke-width:1px
    classDef external fill:#FFD580,stroke:#000,stroke-width:1px
```
