omarchy-ui 0.0.4-x86_64-linux → 0.0.6-x86_64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -1,326 +1,555 @@
1
- # Omarchy UI
2
-
3
- > **Experimental:** the API and packaging format are being validated with real Omarchy apps.
4
- > Pin the gem version for production projects and review release notes before upgrading.
5
-
6
- Omarchy UI is a Ruby framework for building native Omarchy applications. It provides reactive
7
- state, components, events, animation, tasks, commands, standalone windows, and shell plugin
8
- integration through one compact API.
1
+ <p align="center">
2
+ <img src="docs/assets/readme-hero.svg" width="100%" alt="Omarchy UI — native interfaces written in Ruby">
3
+ </p>
4
+
5
+ <h1 align="center">Omarchy UI</h1>
6
+
7
+ <p align="center">
8
+ <strong>The native Ruby application and plugin adapter for Omarchy.</strong><br>
9
+ Build desktop windows, bar widgets, and shell panels with Zui—without writing application-owned QML.
10
+ </p>
11
+
12
+ <p align="center">
13
+ <img alt="Omarchy UI 0.0.6" src="https://img.shields.io/badge/Omarchy_UI-0.0.6-b7ff5a?style=flat-square&labelColor=111711">
14
+ <img alt="Ruby 3.1 or newer" src="https://img.shields.io/badge/Ruby-3.1%2B-cc342d?style=flat-square&logo=ruby&logoColor=white">
15
+ <img alt="Zui 0.0.10" src="https://img.shields.io/badge/Zui-0.0.10-7ee14b?style=flat-square&labelColor=111711">
16
+ <img alt="241 components" src="https://img.shields.io/badge/components-241-75d943?style=flat-square&labelColor=111711">
17
+ <a href="LICENSE"><img alt="MIT license" src="https://img.shields.io/badge/license-MIT-e8ece8?style=flat-square&labelColor=111711"></a>
18
+ </p>
19
+
20
+ <p align="center">
21
+ <a href="#quick-start">Quick start</a> ·
22
+ <a href="#application-model">Applications</a> ·
23
+ <a href="#omarchy-plugins">Plugins</a> ·
24
+ <a href="#command-line-reference">CLI</a> ·
25
+ <a href="#component-catalog">Components</a> ·
26
+ <a href="#architecture">Architecture</a> ·
27
+ <a href="#development">Development</a>
28
+ </p>
29
+
30
+ ---
31
+
32
+ Omarchy UI connects the platform-neutral [Zui](https://github.com/AdamMusa/zui) framework to
33
+ Omarchy and Quickshell. Zui provides the Ruby DSL, state, events, bindings, animation, commands,
34
+ rendering protocol, Qt runtime, and complete component catalog. Omarchy UI provides the shell host,
35
+ plugin lifecycle, Omarchy surfaces, packaging, and an embedded Ruby runtime.
36
+
37
+ Applications contain **Ruby and assets only**. QML remains an internal implementation detail of Zui
38
+ and the Omarchy adapter.
39
+
40
+ <table>
41
+ <tr>
42
+ <td width="33%"><strong>Pure Ruby UI</strong><br>Compose native controls, state, events, and application logic in one language.</td>
43
+ <td width="33%"><strong>Two delivery modes</strong><br>Build a normal desktop application or an integrated Omarchy shell plugin.</td>
44
+ <td width="33%"><strong>Verified runtime</strong><br>Ship with a reproducible, checksummed, and GitHub-attested mruby executable.</td>
45
+ </tr>
46
+ </table>
47
+
48
+ > [!IMPORTANT]
49
+ > Omarchy UI currently targets **Omarchy on x86-64 Linux** and is marked experimental. The reusable
50
+ > Zui application module can also run with Zui's native host on Linux, macOS, and Windows.
51
+
52
+ ## Choose a workflow
53
+
54
+ | Build | Use it for | Primary surface | Delivery |
55
+ | --- | --- | --- | --- |
56
+ | Omarchy application | Full desktop tools and standalone interfaces | `app :main` | `omarchy_ui run` or `omarchy_ui bundle` |
57
+ | Omarchy plugin | Bar widgets, panels, and shell-integrated tools | `bar_widget` and `panel` | `omarchy_ui validate` and `omarchy_ui push` |
58
+ | Portable Zui application | The same application UI outside Omarchy | `app :main` | The platform-neutral [Zui toolchain](https://github.com/AdamMusa/zui#developer-workflow) |
9
59
 
10
- ```ruby
11
- require "omarchy_ui" unless Object.const_defined?(:OmarchyUI)
60
+ ## Requirements
12
61
 
13
- OmarchyUI.plugin do
14
- state :count, 0
62
+ - Omarchy on x86-64 Linux;
63
+ - Ruby 3.1 or newer while installing the gem and developing applications;
64
+ - optional Qt modules for components that use features such as Quick 3D or Multimedia.
15
65
 
16
- app :main, title: "Counter", width: 640, height: 420 do
17
- column spacing: 12 do
18
- text "Official Omarchy UI", style: :heading
19
- text { "Count: #{state.count}" }
20
- button("Increment") { state.count += 1 }
21
- end
22
- end
23
- end
24
- ```
66
+ The finished Omarchy bundle includes the Omarchy adapter and mruby executable. Shared renderers,
67
+ controls, theme, and fonts stay in the compatible Zui gem instead of being duplicated into every
68
+ plugin. The destination therefore needs Ruby and `omarchy-ui` installed. A component fails with an
69
+ explicit error when its gem, required Qt module, or resource is unavailable; Omarchy UI never
70
+ substitutes a different component.
25
71
 
26
- ## Install
72
+ ## Quick start
27
73
 
28
- On Omarchy x86-64, install the gem:
74
+ ### 1. Install the adapter
29
75
 
30
76
  ```bash
31
77
  gem install omarchy-ui
32
78
  ```
33
79
 
34
- The gem contains everything required to launch and bundle an application. Developers do
35
- not need to install a separate runtime or copy framework files. Bundled applications require only
36
- an Omarchy computer to run.
80
+ The gem installs the compatible Zui version as a dependency.
37
81
 
38
- ## Start an application
82
+ ### 2. Generate an application
39
83
 
40
84
  ```bash
41
- omarchy_ui new MyApp
42
- cd myapp
43
- omarchy_ui launch main.rb
85
+ omarchy_ui new Counter
86
+ cd counter
44
87
  ```
45
88
 
46
- A new standalone project contains only application-owned files:
89
+ The generator creates a small, host-independent project:
47
90
 
48
91
  ```text
49
- myapp/
92
+ counter/
93
+ ├── app.rb # reusable Zui application
50
94
  ├── components/
51
- │ └── welcome.rb
52
- ├── README.md
53
- └── main.rb
95
+ │ └── welcome.rb # application-owned Ruby UI module
96
+ ├── main.rb # Omarchy launcher
97
+ └── README.md
54
98
  ```
55
99
 
56
- The generated application UI is entirely Ruby. `main.rb` loads reusable Ruby components from
57
- `components/`; no QML source is generated into the application project. The framework creates the
58
- required native bridge files only when launching or bundling the app.
100
+ ### 3. Run it
59
101
 
60
- `launch` opens a compositor-managed window. Drag its title bar or use Super+drag, and close it
61
- with Super+W. For protocol debugging without a window, use `omarchy_ui run main.rb`.
102
+ ```bash
103
+ omarchy_ui run main.rb
104
+ ```
62
105
 
63
- ## Bundle for another Omarchy computer
106
+ `run` bundles the project's Ruby entry point, prepares the Omarchy host, resolves the exact Zui gem,
107
+ then launches it through Quickshell.
64
108
 
65
- From an application directory:
109
+ ## Application model
66
110
 
67
- ```bash
68
- omarchy_ui bundle
69
- ./dist/myapp/run
111
+ Keep the reusable application definition in `app.rb`. UI methods live in a module scoped to that
112
+ application, so they do not leak into the global DSL.
113
+
114
+ ```ruby
115
+ # app.rb
116
+ require "zui"
117
+
118
+ module Counter
119
+ module UI
120
+ def counter_screen
121
+ container padding: 24 do
122
+ column spacing: 16 do
123
+ text(style: :heading) { "Count: #{state.count}" }
124
+ button("Increment") { state.count += 1 }
125
+ end
126
+ end
127
+ end
128
+ end
129
+
130
+ def self.build
131
+ Zui::Application.new(ui: UI) do
132
+ state :count, 0
133
+
134
+ app :main, title: "Counter", width: 640, height: 420 do
135
+ counter_screen
136
+ end
137
+ end
138
+ end
139
+
140
+ def self.run = build.run
141
+ end
70
142
  ```
71
143
 
72
- `bundle` creates a self-contained application under `dist/<project-name>/`. Its `run`
73
- launcher works on another Omarchy computer without Ruby or the `omarchy-ui` gem.
144
+ The Omarchy entry point only selects the host:
74
145
 
75
- An Omarchy Shell plugin is a separate packaging mode. It requires `manifest.json` so the shell
76
- can discover its ID, entry points, bar placement, and lifecycle. For a project that intentionally
77
- contains a manifest:
146
+ ```ruby
147
+ # main.rb
148
+ require "omarchy_ui"
149
+ require_relative "app"
78
150
 
79
- ```bash
80
- omarchy_ui validate path/to/plugin
81
- omarchy_ui push path/to/plugin
151
+ OmarchyUI.run(Counter)
82
152
  ```
83
153
 
84
- `push` stages and validates the project, adds the framework support files, backs up an existing
85
- installation, installs atomically, optionally enables it, and restarts Omarchy Shell. Use
86
- `--no-enable` or `--no-restart` when needed.
154
+ `OmarchyUI.run` accepts either:
155
+
156
+ - a module whose `build` method returns a `Zui::Application`; or
157
+ - an already-built `Zui::Application` instance.
87
158
 
88
- ## Surfaces and windows
159
+ Because `app.rb` depends on Zui rather than the Omarchy adapter, the same application definition can
160
+ use Zui's standard host on [Linux, macOS, or Windows](https://github.com/AdamMusa/zui/blob/main/docs/platforms.md).
161
+
162
+ ### State and bindings
163
+
164
+ Declare application state before the surfaces that consume it. A block passed to a value component
165
+ is a reactive binding; changing the referenced state emits only the native property patches that
166
+ actually changed.
89
167
 
90
168
  ```ruby
91
- bar_widget do
92
- text "Weather"
93
- on_click { open_panel :weather }
94
- end
169
+ state :status, "Ready"
170
+ state :progress, 0
95
171
 
96
- panel :weather do
97
- text "Panel content"
98
- end
172
+ column spacing: 12 do
173
+ text(style: :heading) { state.status }
174
+
175
+ progress_bar = progress 0, minimum: 0, maximum: 100
176
+ bind(progress_bar, :value) { state.progress }
177
+ bind(progress_bar, :visible) { state.progress.positive? }
99
178
 
100
- app :main,
101
- title: "Weather",
102
- width: 900,
103
- height: 600,
104
- min_width: 480,
105
- min_height: 320,
106
- max_width: 1600,
107
- max_height: 1200,
108
- color: "#101713",
109
- visible: true,
110
- maximized: false,
111
- fullscreen: false do
112
- text "Application content"
179
+ button "Start" do
180
+ transaction do
181
+ state.status = "Working"
182
+ state.progress = 12
183
+ end
184
+ end
113
185
  end
114
186
  ```
115
187
 
116
- `app` supports `title`, `width`, `height`, `min_width`, `min_height`, `max_width`, `max_height`,
117
- `color`, `visible`, `maximized`, and `fullscreen`.
188
+ Use `bind node, :property` when the reactive value is not the component's primary value. A
189
+ `transaction` groups related state assignments so the native host receives one bounded patch batch.
190
+
191
+ ### Events
118
192
 
119
- ## State and reactivity
193
+ Action helpers accept a block directly. Use `on` when you need another event exposed by a component.
194
+ The handler receives the normalized event payload.
120
195
 
121
196
  ```ruby
122
- state :enabled, false
123
- state :profile, { "name" => "Ada" }
197
+ query = text_field placeholder: "Search devices"
124
198
 
125
- toggle_control = toggle "Enabled", checked: state.enabled do |event|
126
- state.enabled = event.fetch("value")
199
+ on query, :submit do |event|
200
+ submitted_query = event.fetch("value", "")
201
+ state.status = "Searching for #{submitted_query}"
127
202
  end
128
- bind(toggle_control, :checked) { state.enabled }
129
203
 
130
- text { state.enabled ? "Enabled" : "Disabled" }
204
+ button("Refresh") { state.status = "Refreshing" }
205
+ ```
131
206
 
132
- transaction do
133
- state.enabled = true
134
- state.profile = { "name" => "Grace" }
207
+ Component schemas define the valid properties and events. Unknown properties, undeclared events,
208
+ duplicate IDs, and invalid surface names fail explicitly instead of being silently ignored.
209
+
210
+ ### Reusable UI
211
+
212
+ Organize larger interfaces with ordinary Ruby modules and methods:
213
+
214
+ ```ruby
215
+ module Operations
216
+ module UI
217
+ def metric_card(label, value)
218
+ card padding: 18 do
219
+ text label, color: "#8b8b92"
220
+ text value, style: :heading
221
+ end
222
+ end
223
+ end
135
224
  end
136
225
  ```
137
226
 
138
- State accepts protocol-safe values: `nil`, booleans, finite numbers, strings, arrays, and hashes
139
- with string/symbol keys. Bindings are reevaluated after changes and emit small property patches.
140
- Ruby blocks passed to `text`, `property`, or `bind` are reactive; no wrapper is required.
141
- `transaction` batches related state writes.
227
+ Pass one module or an array of modules through `Zui::Application.new(ui: ...)`. Application-owned
228
+ QML is not required.
142
229
 
143
- ## Common properties
230
+ ## Omarchy plugins
144
231
 
145
- Every component supports `visible`, `enabled`, `opacity`, `scale`, `rotation`, `z`, `width`, and
146
- `height`. Component-specific properties are listed below. Property names use Ruby `snake_case`.
232
+ A Ruby-powered plugin is an ordinary Omarchy plugin repository with `manifest.json` and `main.rb`
233
+ at its root. Omarchy UI adds the generated service, panel, bar-widget, framework, and runtime files
234
+ while staging the plugin; do not commit generated copies to the application source.
147
235
 
148
- ## Built-in component reference
236
+ ```text
237
+ system-status/
238
+ ├── manifest.json
239
+ ├── main.rb
240
+ └── assets/
241
+ ```
149
242
 
150
- ### Layout and display
243
+ ### Manifest
244
+
245
+ This complete manifest declares the adapter surfaces used by the Ruby definition below:
246
+
247
+ ```json
248
+ {
249
+ "schemaVersion": 1,
250
+ "id": "example.system-status",
251
+ "name": "System Status",
252
+ "version": "0.1.0",
253
+ "author": "Example Author",
254
+ "license": "MIT",
255
+ "description": "A Ruby-powered status panel for Omarchy.",
256
+ "kinds": ["service", "bar-widget", "panel"],
257
+ "keepLoaded": true,
258
+ "entryPoints": {
259
+ "service": "Service.qml",
260
+ "barWidget": "BarWidget.qml",
261
+ "panel": "Panel.qml"
262
+ },
263
+ "barWidget": {
264
+ "displayName": "System Status",
265
+ "description": "Open the current system status.",
266
+ "category": "System",
267
+ "allowMultiple": false,
268
+ "defaultSection": "right"
269
+ }
270
+ }
271
+ ```
151
272
 
152
- | Ruby component | Component-specific properties | Events | Container |
153
- | --- | --- | --- | --- |
154
- | `container` | `spacing`, `padding`, `bordered` | `click` | yes |
155
- | `row` | `spacing`, `alignment` (`start`, `center`, `end`) | `click` | yes |
156
- | `column` | `spacing`, `alignment` (`start`, `center`, `end`) | `click` | yes |
157
- | `grid` | `columns`, `rows`, `spacing`, `row_spacing`, `column_spacing` | `click` | yes |
158
- | `stack` | — | `click` | yes |
159
- | `scroll` | `clip` | `click` | yes |
160
- | `rectangle` | `color`, `radius`, `border_color`, `border_width`, `padding` | `click` | yes |
161
- | `text` | `text`, `style`, `size`, `bold`, `color`, `wrap` | — | no |
162
- | `icon` | `name`, `text`, `size`, `color` | — | no |
163
- | `image` | `source`, `fill_mode` | — | no |
164
- | `spacer` | — | — | no |
165
- | `progress` | `value`, `minimum`, `maximum`, `color` | — | no |
166
- | `separator` | `strength` | — | no |
167
- | `section_header` | `text` | — | no |
168
- | `panel_hero` | `title`, `meta`, `detail`, `foreground`, `font_family`, `icon_size`, `icon_opacity`, `meta_opacity` | — | no |
169
- | `optical_glyph` | `text`, `size`, `color`, `debug_bounds` | — | no |
170
-
171
- ### Inputs and actions
172
-
173
- | Ruby component | Component-specific properties | Events |
174
- | --- | --- | --- |
175
- | `button` | `text`, `icon`, `tooltip`, `selected`, `active`, `cursor`, `focusable`, `bordered`, colors, font/icon sizes, padding, `left_align` | `click`, `right_click`, `hover` |
176
- | `action_button` | `icon`, `tooltip`, `foreground`, `hover_color`, font/size, `focusable`, `cursor`, `bordered` | `click`, `hover` |
177
- | `toggle` | `label`, `description`, `checked`, `cursor`, `rounded`, colors, font/title/description sizes | `change`, `hover` |
178
- | `toggle_switch` | `checked`, `busy`, `interactive`, `cursor`, `cursor_ring`, `cursor_pad`, `rounded`, colors, track/knob geometry | `change`, `hover` |
179
- | `text_field` | `text`, `placeholder`, `password`, colors, selection tint, padding, `cursor` | `input`, `change`, `submit`, `focus`, `blur` |
180
- | `number_field` | `label`, `value`, `from`, `to`, `step`, colors, font/field width, `cursor` | `change`, `hover` |
181
- | `slider` | `value`, `minimum`, `maximum`, `step`, `integer`, track/fill/knob colors and sizes, `ticks`, `tick_color` | `input`, `change`, `right_click` |
182
- | `dropdown` | `label`, `value`, `options`, colors, font, row sizes, `show_label`, `cursor` | `change`, `hover` |
183
- | `searchable_dropdown` | dropdown fields plus `placeholder`, `empty_text`, `trigger_label`, popup sizing | `change`, `hover` |
184
- | `multi_select` | `label`, `values`, `options`, command options, placeholder/empty labels, popup sizing, colors | `change`, `hover` |
185
- | `button_group` | `value`, `options`, colors, font, `focusable`, `cursor_index` | `change`, `hover` |
186
- | `confirm_dialog` | `opened`, `message`, cancel/confirm labels, `selected_index`, colors, font, `corner_radius` | `cancel`, `confirm` |
187
- | `cursor_surface` | `cursor`, `current`, `outline`, `bordered`, `foreground`, `accent`, `fill`, `current_fill` | `click` |
188
- | `widget_button` | text/font/colors, active state, dimensions, rotation, visibility states, interaction flags, tooltip | `click`, `right_click`, `middle_click`, `wheel` |
189
- | `list_view` | `items`, key/label/description/icon fields, `selected`, `orientation`, `spacing`, `empty_text` | `change`, `activate`, `scroll` |
190
-
191
- Convenience methods return their node, so it can be bound, animated, or passed to `on`:
273
+ ### Ruby entry point
192
274
 
193
275
  ```ruby
194
- field = text_field "", id: :query, placeholder: "Search" do |event|
195
- state.query = event.fetch("value")
276
+ # main.rb
277
+ require "omarchy_ui"
278
+
279
+ OmarchyUI.plugin do
280
+ state :status, "System ready"
281
+
282
+ bar_widget do
283
+ button("Status") { open_panel :status }
284
+ end
285
+
286
+ panel :status do
287
+ container padding: 20 do
288
+ column spacing: 12 do
289
+ text(style: :heading) { state.status }
290
+ badge 8
291
+ button("Refresh") { state.status = "Checked just now" }
292
+ end
293
+ end
294
+ end
196
295
  end
296
+ ```
297
+
298
+ `bar_widget` declares the shell-owned bar surface. `panel :status` declares the panel opened by
299
+ `open_panel :status`. The manifest must declare the corresponding entry points.
197
300
 
198
- on(field, :submit) { |event| state.query = event.fetch("value") }
301
+ ### Validate and install
302
+
303
+ ```bash
304
+ omarchy_ui validate path/to/system-status
305
+ omarchy_ui push path/to/system-status
199
306
  ```
200
307
 
201
- Typical event payloads are:
308
+ `validate` checks a fully staged copy, including the bundled Ruby entry point and generated adapter.
309
+ `push` then:
202
310
 
203
- - `click`, `right_click`, `confirm`, `cancel`: `{}`
204
- - `change`, `input`, `submit`, `hover`: `{ "value" => ... }`
205
- - `wheel`: `{ "delta" => number }`
206
- - `list_view` change/activate: value, index, and original item
207
- - `list_view` scroll: x and y offsets
311
+ 1. stages and validates the complete plugin;
312
+ 2. backs up an existing installation when present;
313
+ 3. installs it atomically under `~/.config/omarchy/plugins/<plugin-id>`;
314
+ 4. enables the plugin; and
315
+ 5. restarts the Omarchy shell.
208
316
 
209
- Only declared and subscribed events are delivered to application handlers.
317
+ During development, suppress either lifecycle action when needed:
210
318
 
211
- ## Bindings and properties
319
+ ```bash
320
+ omarchy_ui push path/to/system-status --no-enable
321
+ omarchy_ui push path/to/system-status --no-restart
322
+ ```
212
323
 
213
- ```ruby
214
- label = text "", id: :status
215
- bind(label, :text) { state.message }
324
+ > [!WARNING]
325
+ > Omarchy plugins execute as unsandboxed user code inside the shell environment. Review the Ruby,
326
+ > assets, manifest, generated package, and provenance before installing a third-party plugin.
216
327
 
217
- container do
218
- property :opacity, 0.8
219
- end
328
+ ## Command-line reference
329
+
330
+ ```text
331
+ omarchy_ui <command> [arguments]
220
332
  ```
221
333
 
222
- `text { ... }` is shorthand for a reactive text binding. `property` binds or sets a property on
223
- the current component. Explicit IDs are recommended for controls targeted by tests or external
224
- effects; generated IDs are stable for the lifetime of one render.
334
+ | Command | Arguments | Result |
335
+ | --- | --- | --- |
336
+ | `omarchy_ui new NAME` | One application name | Creates a new application directory using a URL-safe form of the name |
337
+ | `omarchy_ui run FILE` | One Ruby entry point | Runs an application through the Omarchy/Quickshell host |
338
+ | `omarchy_ui bundle [DIRECTORY]` | Zero or one project directory | Creates `dist/<project-name>` with the application, Omarchy adapter, and runtime; shared UI comes from Zui |
339
+ | `omarchy_ui validate [DIRECTORY]` | Zero or one plugin directory | Stages the complete plugin and delegates validation to `omarchy plugin validate` |
340
+ | `omarchy_ui push [DIRECTORY]` | Optional `--no-enable` and `--no-restart` | Atomically installs and activates a validated plugin |
341
+ | `omarchy_ui version` | None | Prints the installed Omarchy UI version |
225
342
 
226
- ## Animation
343
+ When a directory is optional, the current directory is used by default. `run` intentionally does
344
+ not forward arbitrary Ruby arguments.
227
345
 
228
- Reactive binding transition:
346
+ ## Packaging
229
347
 
230
- ```ruby
231
- card = rectangle width: 240, height: 120, opacity: 1.0
232
- bind(card, :opacity, animation: animation(duration: 180, easing: :out_cubic)) do
233
- state.visible ? 1.0 : 0.0
234
- end
348
+ Create a distributable application from the project root:
349
+
350
+ ```bash
351
+ omarchy_ui bundle
352
+ ./dist/my-application/run
235
353
  ```
236
354
 
237
- Animate one or several properties immediately:
355
+ The bundle contains:
238
356
 
239
- ```ruby
240
- animate card,
241
- { opacity: 0.25, scale: 1.08, rotation: 2 },
242
- duration: 220,
243
- easing: :in_out_quad,
244
- delay: 40
357
+ ```text
358
+ dist/my-application/
359
+ ├── main.rb # bundled application source
360
+ ├── assets/ # application-owned resources
361
+ ├── App.qml # Omarchy host entry point
362
+ ├── Service.qml # process and surface bridge
363
+ ├── Panel.qml # shell panel adapter
364
+ ├── BarWidget.qml # shell bar adapter
365
+ ├── ZuiRenderer.qml # resolves Zui's shared protocol renderer
366
+ ├── Commons@ Ui@ # links to Omarchy's shell modules
367
+ ├── omarchy-ui-runtime # embedded mruby executable
368
+ ├── omarchy-ui-runtime.sha256
369
+ ├── RUNTIME_PROVENANCE.md
370
+ └── run
245
371
  ```
246
372
 
247
- Sequential animation:
373
+ Plugin bundles use the same runtime package and are validated against their manifest before the
374
+ bundle command succeeds. Generated packages exclude `.git`, previous `dist` output, stale
375
+ adapter/runtime files, and every Zui-owned QML directory. Install `omarchy-ui` on the destination so
376
+ RubyGems supplies the exact Zui 0.0.10 catalog once for every plugin. The exact pin intentionally
377
+ matches the Zui core embedded in the deterministic mruby runtime.
378
+
379
+ ## Component catalog
380
+
381
+ Omarchy UI consumes Zui's **241 registered components** without maintaining an adapter-local fork.
382
+ Each built-in component has a Ruby builder method, property and event schema, native QML renderer,
383
+ reactive patch support, tests, and reference documentation.
384
+
385
+ | Category | Count | Representative components |
386
+ | --- | ---: | --- |
387
+ | Foundation and layout | 28 | `container`, `rectangle`, `grid_layout`, `scroll`, `split_view` |
388
+ | Display, content, and media | 24 | `text`, `image`, `markdown`, `video`, `model_view_3d` |
389
+ | Buttons and input | 36 | `button`, `text_field`, `slider`, `date_picker`, `multi_select` |
390
+ | Navigation and structure | 20 | `tabs`, `drawer`, `stack_view`, `breadcrumb`, `pagination` |
391
+ | Menus, dialogs, and feedback | 19 | `dialog`, `popup`, `toast`, `progress_ring`, `bottom_sheet` |
392
+ | Data and collections | 22 | `list_view`, `grid_view`, `table_view`, `tree_view`, `calendar` |
393
+ | Charts and visualization | 16 | `line_chart`, `candlestick_chart`, `heatmap`, `gauge`, `legend` |
394
+ | Drawing and interaction | 16 | `canvas`, `shape`, `shader_effect`, `drag_area`, `particle_system` |
395
+ | Animation, state, and timing | 32 | `animation`, `transition`, `timer`, `state_group`, `spring_animation` |
396
+ | Effects | 7 | `multi_effect`, `blur`, `drop_shadow`, `colorize`, `glow` |
397
+ | Multimedia and capture | 12 | `media_player`, `camera`, `audio_input`, `video_output`, `screen_capture` |
398
+ | Models and utilities | 9 | `list_model`, `settings`, `clipboard`, `standard_paths` |
399
+
400
+ - [Complete Zui component coverage matrix](https://github.com/AdamMusa/zui/blob/main/docs/component-coverage.md)
401
+ - [Zui platform support](https://github.com/AdamMusa/zui/blob/main/docs/platforms.md)
402
+ - [Omarchy QML ownership boundary](docs/qml-support.md)
403
+
404
+ ## Showcase applications
405
+
406
+ The synchronized [showcase catalog](examples/) demonstrates complete Ruby applications rather than
407
+ isolated component previews.
408
+
409
+ <p align="center">
410
+ <a href="examples/futuristic_dashboard/">
411
+ <img src="docs/assets/nebula-command-preview.png" width="900" alt="Nebula Command futuristic dashboard running through Omarchy UI">
412
+ </a><br>
413
+ <sub><strong>Nebula Command</strong> · A complete orbital-operations dashboard written in Ruby.</sub>
414
+ </p>
415
+
416
+ | Showcase | What it demonstrates |
417
+ | --- | --- |
418
+ | **[Nebula Command](examples/futuristic_dashboard/)** | **Featured:** telemetry, effects, SVG assets, navigation, controls, and charts |
419
+ | [Tesla Drive Lab](examples/tesla_drive_dashboard/) | Vehicle state, canvas maps, gauges, charts, media, and scheduled telemetry |
420
+ | [Nova Pour](examples/nova_pour/) | Image-backed ordering, live status, dialog flows, and responsive composition |
421
+ | [Lumen Forge](examples/lumen_forge/) | GPU shaders, reactive uniforms, pointer input, and Qt 6's graphics pipeline |
422
+ | [Pulse Atlas](examples/cardiac_health_monitor/) | Health visualization, charts, gauges, particles, heatmaps, and scheduled state |
423
+ | [Nocturne](examples/cinematic_music_studio/) | Qt Multimedia playback, seeking, track navigation, mixing controls, and reordering |
424
+ | [Stratos](examples/orbital_weather_console/) | Reactive image effects, radar data, area charts, heatmaps, and briefing dialogs |
425
+ | [Quantum Market](examples/quantum_market_terminal/) | Tables, candlesticks, simulated orders, positions, allocation, and risk state |
426
+ | [Habitat One](examples/smart_home_energy/) | Smart-home simulation, scenes, energy charts, comfort heatmaps, and automation |
427
+
428
+ Run any showcase from the repository root:
248
429
 
249
- ```ruby
250
- animate_sequence card, [
251
- { to: { scale: 1.12 }, duration: 120, easing: :out_back },
252
- { to: { scale: 1.0 }, duration: 160, easing: :out_cubic, pause: 30 }
253
- ]
430
+ ```bash
431
+ omarchy_ui run examples/tesla_drive_dashboard/main.rb
254
432
  ```
255
433
 
256
- Animation durations and delays are milliseconds from `0` to `60_000`. Supported easing names:
434
+ ## Architecture
257
435
 
258
436
  ```text
259
- linear
260
- in_quad, out_quad, in_out_quad
261
- in_cubic, out_cubic, in_out_cubic
262
- in_back, out_back, in_out_back
263
- in_elastic, out_elastic, in_out_elastic
264
- in_bounce, out_bounce, in_out_bounce
437
+ Application Ruby and assets
438
+ │
439
+ ▼
440
+ Zui DSL · state · events · bindings · scheduler
441
+ │
442
+ │ versioned JSON render, patch, event, and effect protocol
443
+ ▼
444
+ Omarchy Service.qml process bridge ───── embedded mruby runtime
445
+ │
446
+ ▼
447
+ Zui ControlNode + native component catalog
448
+ │
449
+ ▼
450
+ App window · Omarchy panel · Omarchy bar widget
451
+ │
452
+ ▼
453
+ Qt Quick / Controls / Multimedia / optional modules
265
454
  ```
266
455
 
267
- All common numeric visual properties and declared numeric custom-adapter properties can be
268
- animated. Properties in the same hash animate in parallel.
456
+ The dependency direction is deliberate:
269
457
 
270
- ## Tasks and commands
458
+ - **Zui owns** the component registry, Ruby builders, state engine, protocol, renderer, neutral
459
+ controls and theme, and native catalog.
460
+ - **Omarchy UI owns** `App.qml`, `Service.qml`, `Panel.qml`, `BarWidget.qml`, the Quickshell
461
+ integration, plugin lifecycle commands, and Omarchy packaging.
462
+ - **Applications own** Ruby source, assets, state, behavior, and reusable UI modules.
271
463
 
272
- ```ruby
273
- after(0.5) { state.message = "Ready" }
274
- every(5, immediate: true) { state.updated_at = Time.now.to_i }
275
- async { state.result = run_command(["uname", "-r"], timeout: 2).stdout.strip }
276
- ```
464
+ At runtime, the adapter locates the compatible Zui gem and loads its protocol renderer, components,
465
+ controls, theme, and fonts directly from `Zui::FRAMEWORK_ROOT`. Bundle, validation, and push install
466
+ only the Omarchy host files and never copy Zui component implementations into an application or
467
+ plugin. Read the full [QML ownership and adapter boundary](docs/qml-support.md).
277
468
 
278
- `after`, `every`, and `async` return cancellable task objects. Command execution always takes an
279
- argv array and does not invoke a shell. Results expose `stdout`, `stderr`, `exitstatus`, and
280
- `success?`; timeout raises `OmarchyUI::CommandTimeout`.
469
+ ## Runtime integrity
281
470
 
282
- ## Custom QML components
471
+ The x86-64 Linux mruby runtime is produced by a pinned GitHub Actions workflow that:
283
472
 
284
- Any QtQuick, QtQuick.Controls, Quickshell, Omarchy `qs.Ui`, Canvas, shader, particle, or
285
- third-party QML component can be exposed through a validated adapter contract:
473
+ 1. checks out every external input at a full commit digest;
474
+ 2. performs two clean builds in separate cache directories;
475
+ 3. requires byte-identical executables;
476
+ 4. publishes the executable and SHA-256 checksum; and
477
+ 5. creates a signed GitHub artifact attestation for the resulting digest.
286
478
 
287
- ```ruby
288
- register_component :sparkline,
289
- qml: "Sparkline.qml",
290
- properties: %i[values color line_width],
291
- property_map: { color: :strokeColor, line_width: :lineWidth },
292
- events: %i[click point_hover],
293
- event_map: { point_hover: :pointHovered },
294
- container: false,
295
- auto_bind: true
296
-
297
- chart = component :sparkline, values: [2, 8, 5], color: "#ff6655"
298
- on(chart, :point_hover) { |event| state.hovered = event.fetch("index") }
479
+ Verify a published runtime independently:
480
+
481
+ ```bash
482
+ gh release download runtime-v0.1.4 \
483
+ --repo AdamMusa/omarchy-ui \
484
+ --pattern 'omarchy-ui-runtime*'
485
+
486
+ sha256sum --check omarchy-ui-runtime.sha256
487
+ gh attestation verify omarchy-ui-runtime --repo AdamMusa/omarchy-ui
299
488
  ```
300
489
 
301
- Place adapter files under `Components/`. Declared properties are assigned to the QML root and
302
- declared signals are forwarded to Ruby. A container adapter can expose an `Item` property named
303
- `contentHost`; framework children are parented into it automatically. See
304
- [the QML support matrix](docs/qml-support.md) and [Sparkline.qml](Components/Sparkline.qml).
490
+ See [runtime build and verification](docs/runtime-build.md) for the pinned source revisions,
491
+ reproduction steps, and provenance contract.
492
+
493
+ The mruby host records a bounded local audit event when an Omarchy UI plugin launches `curl` or
494
+ `wget` through `Zui::Command`. Each event contains the method, a URL with credentials, query, and
495
+ fragment removed, the process exit result, response byte count, and duration. Headers and response
496
+ bodies are never recorded. Per-plugin logs rotate at 128 KiB under
497
+ `~/.local/state/omarchy-ui-audit/`; this is local observability for Plugin Pulse, not telemetry.
305
498
 
306
- ## Safety
499
+ ## Troubleshooting
307
500
 
308
- Component names, files, properties, events, IDs, effects, values, message sizes, and animation
309
- limits are validated. Commands use argv arrays without a shell. Applications and plugins run with
310
- the current user's permissions, so review third-party code before installing it.
501
+ | Symptom | Check |
502
+ | --- | --- |
503
+ | `Ruby file not found` | Pass an existing entry point to `omarchy_ui run`, normally `main.rb` |
504
+ | `Omarchy QML module not found` | Confirm the Omarchy shell installation provides `/usr/share/omarchy/shell/Commons` and `Ui` |
505
+ | A component reports a missing module | Install or enable the Qt module required by that declared component |
506
+ | Plugin validation fails | Run `omarchy_ui validate` and correct the manifest or staged project error before pushing |
507
+ | A pushed plugin is installed but inactive | Run `omarchy plugin enable <id>` and `omarchy restart shell` after resolving the reported shell error |
508
+ | The bundle destination already exists | Review or move the existing `dist/<project-name>` directory before bundling again |
311
509
 
312
- ## Development and verification
510
+ Omarchy UI reports unsupported properties, components, events, paths, manifests, and runtime
511
+ resources directly. Preserve the original error when opening an issue.
512
+
513
+ ## Development
514
+
515
+ Clone Zui and Omarchy UI as sibling repositories, then run the adapter's complete test script:
313
516
 
314
517
  ```bash
315
- ./scripts/test.sh
316
- ruby script/benchmark.rb
317
- ./scripts/smoke-test.sh # live Omarchy session
518
+ git clone https://github.com/AdamMusa/zui.git
519
+ git clone https://github.com/AdamMusa/omarchy-ui.git
520
+ cd omarchy-ui
521
+
522
+ ZUI_SOURCE_DIR=../zui scripts/test.sh
318
523
  ```
319
524
 
320
- The suite covers state, bindings, repeated structures, event persistence, component schemas,
321
- animation tracks and sequences, tasks, command safety, standalone projects, packaging,
322
- manifests, component contracts, linting, and the phone backend.
525
+ The test script verifies the Ruby adapter, CLI lifecycle, framework boundary, synchronized showcase
526
+ applications, source syntax, gemspec, runtime checksum when present, and QML formatting/linting when
527
+ the corresponding Qt tools are available.
528
+
529
+ Use the repository-local command without installing a gem:
530
+
531
+ ```bash
532
+ ZUI_SOURCE_DIR=../zui ruby -Ilib bin/omarchy_ui version
533
+ ZUI_SOURCE_DIR=../zui ruby -Ilib bin/omarchy_ui run examples/nova_pour/main.rb
534
+ ```
535
+
536
+ Framework, DSL, protocol, and component changes belong in
537
+ [Zui](https://github.com/AdamMusa/zui). Omarchy host integration, shell lifecycle, adapter QML,
538
+ runtime packaging, and synchronized Omarchy showcases belong here.
539
+
540
+ ## Project reference
541
+
542
+ | Resource | Purpose |
543
+ | --- | --- |
544
+ | [Zui documentation](https://github.com/AdamMusa/zui#readme) | Core Ruby API, platform workflow, and framework architecture |
545
+ | [Component coverage](https://github.com/AdamMusa/zui/blob/main/docs/component-coverage.md) | Complete list of registered native components |
546
+ | [QML boundary](docs/qml-support.md) | Ownership and dependency direction between Zui and Omarchy UI |
547
+ | [Runtime provenance](docs/runtime-build.md) | Reproducible build inputs, checksum, attestation, and verification |
548
+ | [Showcase catalog](examples/) | Complete application examples and their run instructions |
549
+ | [Issue tracker](https://github.com/AdamMusa/omarchy-ui/issues) | Bug reports and focused feature proposals |
323
550
 
324
551
  ## License
325
552
 
326
- MIT. See [LICENSE](LICENSE).
553
+ Omarchy UI is available under the [MIT License](LICENSE).
554
+
555
+ <p align="right"><a href="#omarchy-ui">Back to top ↑</a></p>