# inaciops/hyprmod-nix architecture

> Architecture diagram of the GitHub repository inaciops/hyprmod-nix, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/inaciops/hyprmod-nix
- Repository: https://github.com/inaciops/hyprmod-nix

## Overview

HyprMod is a GTK4/libadwaita settings application for editing Hyprland configuration. Users launch the GUI, choose a settings page, edit a domain-specific configuration, preview supported changes live, and save HyprMod-managed configuration without rewriting their existing config. The window coordinates pages, shared settings, profiles, and undo; the CLI also supports profile operations. The graph preserves the README’s major editing capabilities. Some page-to-core links rely on the source index or README because those page implementations were not excerpted; unsampled details are not inferred.

Main entry points: [`hyprmod/window.py`](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/window.py) (Settings window), [`hyprmod/pages/animations.py`](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/animations.py) (Animations editor), [`hyprmod/core/config.py`](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/core/config.py) (Config manager), [`hyprmod/main.py`](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/main.py) (Application entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_main["Application entry<br/>[main.py]"]
  node_window["Settings window<br/>[window.py]"]
  node_cli["Profile CLI<br/>[cli.py]"]
end

subgraph group_config["Config lifecycle"]
  node_config_core["Config manager<br/>[config.py]"]
  node_managed_file[("Managed config")]
  node_settings["App settings<br/>[settings.py]"]
  node_profiles["Profiles<br/>[profiles.py]"]
  node_undo["Undo history<br/>[undo.py]"]
end

subgraph group_editors["Settings editors"]
  node_animation["Animations editor<br/>[animations.py]"]
  node_binds["Keybind editor<br/>[binds.py]"]
  node_monitors["Monitor editor<br/>[page.py]"]
  node_window_rules["Window rules<br/>[window_rules.py]"]
  node_layer_rules["Layer rules<br/>[layer_rules.py]"]
  node_workspaces["Workspace rules<br/>[workspaces.py]"]
  node_autostart["Autostart editor<br/>[autostart.py]"]
  node_env_vars["Environment editor<br/>[env_vars.py]"]
  node_cursor["Cursor themes<br/>[cursor.py]"]
  node_bezier["Bezier curves<br/>[bezier_data.py]"]
end

subgraph group_assistance["Editing assistance"]
  node_pending["Pending changes<br/>[pending.py]"]
  node_search["Global search<br/>[search.py]"]
  node_migration["Lua migration"]
  node_deprecations["Deprecation review"]
end

node_user(("User"))
node_hyprland["Hyprland"]

node_user -->|"launches"| node_main
node_main -->|"opens"| node_window
node_user -->|"runs profiles"| node_cli
node_cli -->|"operates on"| node_profiles
node_window -->|"loads config"| node_config_core
node_window -->|"uses settings"| node_settings
node_window -->|"manages profiles"| node_profiles
node_window -->|"records undo"| node_undo
node_window -->|"builds page"| node_animation
node_window -->|"builds page"| node_binds
node_window -->|"builds page"| node_monitors
node_window -->|"builds page"| node_window_rules
node_window -->|"builds page"| node_layer_rules
node_window -->|"builds page"| node_workspaces
node_window -->|"builds page"| node_autostart
node_window -->|"builds page"| node_env_vars
node_window -->|"builds page"| node_cursor
node_animation -->|"uses curves"| node_bezier
node_animation -->|"pushes undo"| node_undo
node_window_rules -->|"previews rules"| node_hyprland
node_config_core -->|"reads and writes"| node_managed_file
node_window -.->|"shows edits"| node_pending
node_window -.->|"offers search"| node_search
node_window -.->|"offers migration"| node_migration
node_window -.->|"offers review"| node_deprecations
node_animation -.->|"previews live"| node_hyprland
node_binds -.->|"previews live"| node_hyprland
node_monitors -.->|"previews live"| node_hyprland
node_config_core -.->|"applies live"| node_hyprland

click node_main "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/main.py"
click node_window "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/window.py"
click node_cli "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/cli.py"
click node_config_core "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/core/config.py"
click node_settings "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/core/settings.py"
click node_profiles "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/core/profiles.py"
click node_undo "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/core/undo.py"
click node_animation "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/animations.py"
click node_binds "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/binds.py"
click node_monitors "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/monitors/page.py"
click node_window_rules "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/window_rules.py"
click node_layer_rules "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/layer_rules.py"
click node_workspaces "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/workspaces.py"
click node_autostart "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/autostart.py"
click node_env_vars "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/env_vars.py"
click node_cursor "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/cursor.py"
click node_bezier "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/data/bezier_data.py"
click node_pending "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/pending.py"
click node_search "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/ui/search.py"
click node_migration "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/ui/lua_migration_controller.py"
click node_deprecations "https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/ui/deprecation_controller.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_main,node_window,node_cli,node_user toneBlue
class node_config_core,node_managed_file,node_settings,node_profiles,node_undo toneAmber
class node_animation,node_binds,node_monitors,node_window_rules,node_layer_rules,node_workspaces,node_autostart,node_env_vars,node_cursor,node_bezier toneMint
class node_pending,node_search,node_migration,node_deprecations toneRose
class node_hyprland toneIndigo
```

## Components

### Application

- [Application entry](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/main.py): `hyprmod/main.py`
- [Settings window](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/window.py): `hyprmod/window.py`
- [Profile CLI](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/cli.py): `hyprmod/cli.py`

### Config lifecycle

- [Config manager](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/core/config.py): `hyprmod/core/config.py`
- **Managed config**
- [App settings](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/core/settings.py): `hyprmod/core/settings.py`
- [Profiles](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/core/profiles.py): `hyprmod/core/profiles.py`
- [Undo history](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/core/undo.py): `hyprmod/core/undo.py`

### Settings editors

- [Animations editor](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/animations.py): `hyprmod/pages/animations.py`
- [Keybind editor](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/binds.py): `hyprmod/pages/binds.py`
- [Monitor editor](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/monitors/page.py): `hyprmod/pages/monitors/page.py`
- [Window rules](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/window_rules.py): `hyprmod/pages/window_rules.py`
- [Layer rules](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/layer_rules.py): `hyprmod/pages/layer_rules.py`
- [Workspace rules](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/workspaces.py): `hyprmod/pages/workspaces.py`
- [Autostart editor](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/autostart.py): `hyprmod/pages/autostart.py`
- [Environment editor](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/env_vars.py): `hyprmod/pages/env_vars.py`
- [Cursor themes](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/cursor.py): `hyprmod/pages/cursor.py`
- [Bezier curves](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/data/bezier_data.py): `hyprmod/data/bezier_data.py`

### Editing assistance

- [Pending changes](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/pages/pending.py): `hyprmod/pages/pending.py`
- [Global search](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/ui/search.py): `hyprmod/ui/search.py`
- [Lua migration](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/ui/lua_migration_controller.py): `hyprmod/ui/lua_migration_controller.py`
- [Deprecation review](https://github.com/inaciops/hyprmod-nix/blob/main/hyprmod/ui/deprecation_controller.py): `hyprmod/ui/deprecation_controller.py`

### Other components

- **User**
- **Hyprland**

## Connections

- User → Application entry: launches (evidence: `hyprmod/main.py`)
- Application entry → Settings window: opens (evidence: `hyprmod/main.py`)
- User → Profile CLI: runs profiles (evidence: `README.md`)
- Profile CLI → Profiles: operates on (evidence: `hyprmod/cli.py`)
- Settings window → Config manager: loads config (evidence: `hyprmod/window.py`)
- Settings window → App settings: uses settings (evidence: `hyprmod/window.py`)
- Settings window → Profiles: manages profiles (evidence: `hyprmod/window.py`)
- Settings window → Undo history: records undo (evidence: `hyprmod/window.py`)
- Settings window → Animations editor: builds page (evidence: `hyprmod/window.py`)
- Settings window → Keybind editor: builds page (evidence: `hyprmod/window.py`)
- Settings window → Monitor editor: builds page (evidence: `hyprmod/window.py`)
- Settings window → Window rules: builds page (evidence: `hyprmod/window.py`)
- Settings window → Layer rules: builds page (evidence: `hyprmod/window.py`)
- Settings window → Workspace rules: builds page (evidence: `hyprmod/window.py`)
- Settings window → Autostart editor: builds page (evidence: `hyprmod/window.py`)
- Settings window → Environment editor: builds page (evidence: `hyprmod/window.py`)
- Settings window → Cursor themes: builds page (evidence: `hyprmod/window.py`)
- Animations editor → Bezier curves: uses curves (evidence: `hyprmod/pages/animations.py`)
- Animations editor → Undo history: pushes undo (evidence: `hyprmod/pages/animations.py`)
- Window rules → Hyprland: previews rules (evidence: `hyprmod/pages/window_rules.py`)
- Config manager → Managed config: reads and writes (evidence: `hyprmod/core/config.py`)
- Settings window → Pending changes: shows edits (evidence: `hyprmod/window.py`)
- Settings window → Global search: offers search (evidence: `hyprmod/window.py`)
- Settings window → Lua migration: offers migration (evidence: `hyprmod/ui/lua_migration_controller.py`)
- Settings window → Deprecation review: offers review (evidence: `hyprmod/ui/deprecation_controller.py`)
- Animations editor → Hyprland: previews live (evidence: `README.md`)
- Keybind editor → Hyprland: previews live (evidence: `README.md`)
- Monitor editor → Hyprland: previews live (evidence: `README.md`)
- Config manager → Hyprland: applies live (evidence: `README.md`)
