# mohamedattiadev/hintium architecture

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

- Interactive diagram: https://gitdiagram.com/mohamedattiadev/hintium
- Repository: https://github.com/mohamedattiadev/hintium

## Overview

Hintium is a keyboard-driven desktop accessibility controller. The user invokes a mode through the launcher; the resident daemon dispatches it, gathers accessible elements or windows, presents targets, and performs the selected action. Distinct modes cover hinting/clicking, scrolling, search, caret navigation, and editing fields in an external editor. Shared internals include AT-SPI discovery, overlays, input backends, configuration, and theme handling. Edges reflect README statements and the supplied source index/excerpts; unsampled implementation details are not assumed.

Main entry points: [`hintium/service.py`](https://github.com/mohamedattiadev/hintium/blob/main/hintium/service.py) (Resident daemon), [`hintium/x11.py`](https://github.com/mohamedattiadev/hintium/blob/main/hintium/x11.py) (X11 input), [`hintium/overlay.py`](https://github.com/mohamedattiadev/hintium/blob/main/hintium/overlay.py) (Target overlay), [`hintium/click.py`](https://github.com/mohamedattiadev/hintium/blob/main/hintium/click.py) (Hint and click)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime orchestration"]
  node_launcher["Mode launcher"]
  node_daemon["Resident daemon<br/>[service.py]"]
end

subgraph group_modes["Interaction modes"]
  node_hint["Hint and click<br/>[click.py]"]
  node_scroll["Scroll mode<br/>[scroll.py]"]
  node_search["Search mode<br/>[search.py]"]
  node_caret["Caret mode<br/>[caret.py]"]
  node_edit["Field editor<br/>[edit.py]"]
end

subgraph group_discovery["Target discovery"]
  node_elements["Accessible elements<br/>[elements.py]"]
  node_windows["Window targets<br/>[windows.py]"]
end

subgraph group_desktop["Desktop integration"]
  node_x11["X11 input<br/>[x11.py]"]
  node_hypr["Hyprland IPC<br/>[hypr.py]"]
end

subgraph group_shared["Shared presentation and settings"]
  node_overlay["Target overlay<br/>[overlay.py]"]
  node_labels["Hint labels<br/>[hints.py]"]
  node_config["Runtime settings<br/>[config.py]"]
  node_userconfig["Config commands<br/>[userconfig.py]"]
  node_theme["Theme palette<br/>[theme.py]"]
  node_themes["Theme presets<br/>[themes.py]"]
end

node_user(("User"))
node_atspi(("AT-SPI desktop"))
node_editor["External editor"]

node_user -->|"invokes mode"| node_launcher
node_launcher -->|"sends command"| node_daemon
node_daemon -->|"dispatches"| node_hint
node_daemon -->|"dispatches"| node_scroll
node_daemon -->|"dispatches"| node_search
node_daemon -->|"dispatches"| node_caret
node_daemon -->|"dispatches"| node_edit
node_daemon -->|"queries"| node_elements
node_daemon -->|"collects targets"| node_windows
node_elements -->|"queries tree"| node_atspi
node_hint -->|"presents targets"| node_overlay
node_scroll -->|"presents regions"| node_overlay
node_search -->|"presents matches"| node_overlay
node_caret -->|"presents targets"| node_overlay
node_hint -->|"assigns labels"| node_labels
node_hint -->|"sends clicks"| node_x11
node_scroll -->|"sends scroll input"| node_x11
node_caret -->|"sends key input"| node_x11
node_edit -->|"opens field"| node_editor
node_edit -->|"reads fields"| node_elements
node_edit -->|"controls focus"| node_x11
node_windows -->|"queries windows"| node_hypr
node_windows -->|"queries windows"| node_x11
node_daemon -->|"handles config commands"| node_userconfig
node_userconfig -->|"reads settings"| node_config
node_theme -->|"reads palette settings"| node_config
node_theme -->|"loads presets"| node_themes
node_overlay -->|"draws with palette"| node_theme
node_hypr -.->|"Wayland fallback"| node_x11

click node_launcher "https://github.com/mohamedattiadev/hintium/blob/main/bin/hintium"
click node_daemon "https://github.com/mohamedattiadev/hintium/blob/main/hintium/service.py"
click node_hint "https://github.com/mohamedattiadev/hintium/blob/main/hintium/click.py"
click node_scroll "https://github.com/mohamedattiadev/hintium/blob/main/hintium/scroll.py"
click node_search "https://github.com/mohamedattiadev/hintium/blob/main/hintium/search.py"
click node_caret "https://github.com/mohamedattiadev/hintium/blob/main/hintium/caret.py"
click node_edit "https://github.com/mohamedattiadev/hintium/blob/main/hintium/edit.py"
click node_elements "https://github.com/mohamedattiadev/hintium/blob/main/hintium/elements.py"
click node_windows "https://github.com/mohamedattiadev/hintium/blob/main/hintium/windows.py"
click node_overlay "https://github.com/mohamedattiadev/hintium/blob/main/hintium/overlay.py"
click node_labels "https://github.com/mohamedattiadev/hintium/blob/main/hintium/hints.py"
click node_config "https://github.com/mohamedattiadev/hintium/blob/main/hintium/config.py"
click node_userconfig "https://github.com/mohamedattiadev/hintium/blob/main/hintium/userconfig.py"
click node_theme "https://github.com/mohamedattiadev/hintium/blob/main/hintium/theme.py"
click node_themes "https://github.com/mohamedattiadev/hintium/blob/main/hintium/themes.py"
click node_x11 "https://github.com/mohamedattiadev/hintium/blob/main/hintium/x11.py"
click node_hypr "https://github.com/mohamedattiadev/hintium/blob/main/hintium/hypr.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_launcher,node_daemon,node_user toneBlue
class node_hint,node_scroll,node_search,node_caret,node_edit toneAmber
class node_elements,node_windows toneMint
class node_x11,node_hypr toneRose
class node_overlay,node_labels,node_config,node_userconfig,node_theme,node_themes,node_atspi,node_editor toneIndigo
```

## Components

### Runtime orchestration

- [Mode launcher](https://github.com/mohamedattiadev/hintium/blob/main/bin/hintium): `bin/hintium`
- [Resident daemon](https://github.com/mohamedattiadev/hintium/blob/main/hintium/service.py): `hintium/service.py`

### Interaction modes

- [Hint and click](https://github.com/mohamedattiadev/hintium/blob/main/hintium/click.py): `hintium/click.py`
- [Scroll mode](https://github.com/mohamedattiadev/hintium/blob/main/hintium/scroll.py): `hintium/scroll.py`
- [Search mode](https://github.com/mohamedattiadev/hintium/blob/main/hintium/search.py): `hintium/search.py`
- [Caret mode](https://github.com/mohamedattiadev/hintium/blob/main/hintium/caret.py): `hintium/caret.py`
- [Field editor](https://github.com/mohamedattiadev/hintium/blob/main/hintium/edit.py): `hintium/edit.py`

### Target discovery

- [Accessible elements](https://github.com/mohamedattiadev/hintium/blob/main/hintium/elements.py): `hintium/elements.py`
- [Window targets](https://github.com/mohamedattiadev/hintium/blob/main/hintium/windows.py): `hintium/windows.py`

### Desktop integration

- [X11 input](https://github.com/mohamedattiadev/hintium/blob/main/hintium/x11.py): `hintium/x11.py`
- [Hyprland IPC](https://github.com/mohamedattiadev/hintium/blob/main/hintium/hypr.py): `hintium/hypr.py`

### Shared presentation and settings

- [Target overlay](https://github.com/mohamedattiadev/hintium/blob/main/hintium/overlay.py): `hintium/overlay.py`
- [Hint labels](https://github.com/mohamedattiadev/hintium/blob/main/hintium/hints.py): `hintium/hints.py`
- [Runtime settings](https://github.com/mohamedattiadev/hintium/blob/main/hintium/config.py): `hintium/config.py`
- [Config commands](https://github.com/mohamedattiadev/hintium/blob/main/hintium/userconfig.py): `hintium/userconfig.py`
- [Theme palette](https://github.com/mohamedattiadev/hintium/blob/main/hintium/theme.py): `hintium/theme.py`
- [Theme presets](https://github.com/mohamedattiadev/hintium/blob/main/hintium/themes.py): `hintium/themes.py`

### Other components

- **User**
- **AT-SPI desktop**
- **External editor**

## Connections

- User → Mode launcher: invokes mode (evidence: `README.md`)
- Mode launcher → Resident daemon: sends command (evidence: `README.md`)
- Resident daemon → Hint and click: dispatches (evidence: `hintium/service.py`)
- Resident daemon → Scroll mode: dispatches (evidence: `hintium/service.py`)
- Resident daemon → Search mode: dispatches (evidence: `hintium/service.py`)
- Resident daemon → Caret mode: dispatches (evidence: `hintium/service.py`)
- Resident daemon → Field editor: dispatches (evidence: `hintium/service.py`)
- Resident daemon → Accessible elements: queries (evidence: `hintium/service.py`)
- Resident daemon → Window targets: collects targets (evidence: `hintium/service.py`)
- Accessible elements → AT-SPI desktop: queries tree (evidence: `hintium/elements.py`)
- Hint and click → Target overlay: presents targets (evidence: `hintium/overlay.py`)
- Scroll mode → Target overlay: presents regions (evidence: `hintium/overlay.py`)
- Search mode → Target overlay: presents matches (evidence: `hintium/search.py`)
- Caret mode → Target overlay: presents targets (evidence: `hintium/caret.py`)
- Hint and click → Hint labels: assigns labels (evidence: `hintium/hints.py`)
- Hint and click → X11 input: sends clicks (evidence: `hintium/click.py`)
- Scroll mode → X11 input: sends scroll input (evidence: `hintium/scroll.py`)
- Caret mode → X11 input: sends key input (evidence: `hintium/caret.py`)
- Field editor → External editor: opens field (evidence: `README.md`)
- Field editor → Accessible elements: reads fields (evidence: `hintium/edit.py`)
- Field editor → X11 input: controls focus (evidence: `hintium/edit.py`)
- Window targets → Hyprland IPC: queries windows (evidence: `hintium/windows.py`)
- Window targets → X11 input: queries windows (evidence: `hintium/windows.py`)
- Resident daemon → Config commands: handles config commands (evidence: `hintium/service.py`)
- Config commands → Runtime settings: reads settings (evidence: `hintium/userconfig.py`)
- Theme palette → Runtime settings: reads palette settings (evidence: `hintium/theme.py`)
- Theme palette → Theme presets: loads presets (evidence: `hintium/theme.py`)
- Target overlay → Theme palette: draws with palette (evidence: `hintium/overlay.py`)
- Hyprland IPC → X11 input: Wayland fallback
