# ricardosuman/omarchy-menu-calc architecture

> Architecture diagram of the GitHub repository ricardosuman/omarchy-menu-calc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ricardosuman/omarchy-menu-calc
- Repository: https://github.com/ricardosuman/omarchy-menu-calc

## Overview

Menu Calc is a forked Omarchy menu that adds inline arithmetic and editable search text. The documented workflow is to type an expression, see its result at the top of the menu, then press Enter to copy it and close the menu. Invalid expressions leave ordinary app search unchanged. README documents these behaviors, but the sampled source does not show the QML wiring, so only the documented connections are shown.

Main entry points: [`Menu.qml`](https://github.com/ricardosuman/omarchy-menu-calc/blob/main/Menu.qml) (Omarchy menu), [`Calc.js`](https://github.com/ricardosuman/omarchy-menu-calc/blob/main/Calc.js) (Expression evaluator), [`MenuModel.js`](https://github.com/ricardosuman/omarchy-menu-calc/blob/main/MenuModel.js) (Menu model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_menu["Menu interaction"]
  node_menuqml["Omarchy menu<br/>[Menu.qml]"]
  node_menumodel["Menu model<br/>[MenuModel.js]"]
end

subgraph group_calc["Calculation"]
  node_calcjs["Expression evaluator<br/>[Calc.js]"]
end

node_user(("Menu user"))
node_clipboard["wl-copy"]

node_user -->|"types query"| node_menuqml
node_menuqml -->|"evaluates expression"| node_calcjs
node_calcjs -->|"returns result"| node_menuqml
node_menuqml -->|"searches menu"| node_menumodel
node_menuqml -.->|"copies on Enter"| node_clipboard
node_menuqml -->|"shows result"| node_user

click node_menuqml "https://github.com/ricardosuman/omarchy-menu-calc/blob/main/Menu.qml"
click node_calcjs "https://github.com/ricardosuman/omarchy-menu-calc/blob/main/Calc.js"
click node_menumodel "https://github.com/ricardosuman/omarchy-menu-calc/blob/main/MenuModel.js"

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_menuqml,node_menumodel,node_user toneBlue
class node_calcjs toneAmber
class node_clipboard toneIndigo
```

## Components

### Menu interaction

- [Omarchy menu](https://github.com/ricardosuman/omarchy-menu-calc/blob/main/Menu.qml): `Menu.qml`
- [Menu model](https://github.com/ricardosuman/omarchy-menu-calc/blob/main/MenuModel.js): `MenuModel.js`

### Calculation

- [Expression evaluator](https://github.com/ricardosuman/omarchy-menu-calc/blob/main/Calc.js): `Calc.js`

### Other components

- **Menu user**
- **wl-copy**

## Connections

- Menu user → Omarchy menu: types query
- Omarchy menu → Expression evaluator: evaluates expression
- Expression evaluator → Omarchy menu: returns result
- Omarchy menu → Menu model: searches menu
- Omarchy menu → wl-copy: copies on Enter
- Omarchy menu → Menu user: shows result
