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.
- checksums.yaml +4 -4
- data/App.qml +4 -3
- data/BarWidget.qml +2 -2
- data/Panel.qml +7 -4
- data/README.md +456 -227
- data/Service.qml +122 -5
- data/ZuiRenderer.qml +37 -0
- data/lib/omarchy_ui/cli.rb +7 -17
- data/lib/omarchy_ui/generator.rb +105 -0
- data/lib/omarchy_ui/runtime.rb +33 -0
- data/lib/omarchy_ui.rb +117 -17
- data/vendor/runtime/x86_64-linux/RUNTIME_PROVENANCE.md +16 -6
- data/vendor/runtime/x86_64-linux/omarchy-ui-runtime +0 -0
- data/vendor/runtime/x86_64-linux/omarchy-ui-runtime.sha256 +1 -1
- data/vendor/runtime/x86_64-linux/runtime-provenance.json +12 -0
- metadata +21 -21
- data/Components/README.md +0 -40
- data/Components/Sparkline.qml +0 -36
- data/ControlNode.qml +0 -754
- data/lib/omarchy_ui/animation.rb +0 -24
- data/lib/omarchy_ui/application.rb +0 -322
- data/lib/omarchy_ui/builder.rb +0 -247
- data/lib/omarchy_ui/command.rb +0 -95
- data/lib/omarchy_ui/component_registry.rb +0 -87
- data/lib/omarchy_ui/components.rb +0 -43
- data/lib/omarchy_ui/node.rb +0 -30
- data/lib/omarchy_ui/project.rb +0 -108
- data/lib/omarchy_ui/protocol.rb +0 -29
- data/lib/omarchy_ui/scheduler.rb +0 -136
- data/lib/omarchy_ui/source_bundle.rb +0 -59
- data/lib/omarchy_ui/state_store.rb +0 -100
- data/lib/omarchy_ui/value.rb +0 -44
- data/manifest.json +0 -27
data/README.md
CHANGED
|
@@ -1,326 +1,555 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
11
|
-
require "omarchy_ui" unless Object.const_defined?(:OmarchyUI)
|
|
60
|
+
## Requirements
|
|
12
61
|
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
##
|
|
72
|
+
## Quick start
|
|
27
73
|
|
|
28
|
-
|
|
74
|
+
### 1. Install the adapter
|
|
29
75
|
|
|
30
76
|
```bash
|
|
31
77
|
gem install omarchy-ui
|
|
32
78
|
```
|
|
33
79
|
|
|
34
|
-
The gem
|
|
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
|
-
|
|
82
|
+
### 2. Generate an application
|
|
39
83
|
|
|
40
84
|
```bash
|
|
41
|
-
omarchy_ui new
|
|
42
|
-
cd
|
|
43
|
-
omarchy_ui launch main.rb
|
|
85
|
+
omarchy_ui new Counter
|
|
86
|
+
cd counter
|
|
44
87
|
```
|
|
45
88
|
|
|
46
|
-
|
|
89
|
+
The generator creates a small, host-independent project:
|
|
47
90
|
|
|
48
91
|
```text
|
|
49
|
-
|
|
92
|
+
counter/
|
|
93
|
+
├── app.rb # reusable Zui application
|
|
50
94
|
├── components/
|
|
51
|
-
│ └── welcome.rb
|
|
52
|
-
├──
|
|
53
|
-
└──
|
|
95
|
+
│ └── welcome.rb # application-owned Ruby UI module
|
|
96
|
+
├── main.rb # Omarchy launcher
|
|
97
|
+
└── README.md
|
|
54
98
|
```
|
|
55
99
|
|
|
56
|
-
|
|
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
|
-
|
|
61
|
-
|
|
102
|
+
```bash
|
|
103
|
+
omarchy_ui run main.rb
|
|
104
|
+
```
|
|
62
105
|
|
|
63
|
-
|
|
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
|
-
|
|
109
|
+
## Application model
|
|
66
110
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
-
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
146
|
+
```ruby
|
|
147
|
+
# main.rb
|
|
148
|
+
require "omarchy_ui"
|
|
149
|
+
require_relative "app"
|
|
78
150
|
|
|
79
|
-
|
|
80
|
-
omarchy_ui validate path/to/plugin
|
|
81
|
-
omarchy_ui push path/to/plugin
|
|
151
|
+
OmarchyUI.run(Counter)
|
|
82
152
|
```
|
|
83
153
|
|
|
84
|
-
`
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
on_click { open_panel :weather }
|
|
94
|
-
end
|
|
169
|
+
state :status, "Ready"
|
|
170
|
+
state :progress, 0
|
|
95
171
|
|
|
96
|
-
|
|
97
|
-
text
|
|
98
|
-
|
|
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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
`
|
|
117
|
-
`
|
|
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
|
-
|
|
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
|
-
|
|
123
|
-
state :profile, { "name" => "Ada" }
|
|
197
|
+
query = text_field placeholder: "Search devices"
|
|
124
198
|
|
|
125
|
-
|
|
126
|
-
|
|
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
|
-
|
|
204
|
+
button("Refresh") { state.status = "Refreshing" }
|
|
205
|
+
```
|
|
131
206
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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
|
-
|
|
139
|
-
|
|
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
|
-
##
|
|
230
|
+
## Omarchy plugins
|
|
144
231
|
|
|
145
|
-
|
|
146
|
-
|
|
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
|
-
|
|
236
|
+
```text
|
|
237
|
+
system-status/
|
|
238
|
+
├── manifest.json
|
|
239
|
+
├── main.rb
|
|
240
|
+
└── assets/
|
|
241
|
+
```
|
|
149
242
|
|
|
150
|
-
###
|
|
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
|
-
|
|
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
|
-
|
|
195
|
-
|
|
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
|
-
|
|
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
|
-
|
|
308
|
+
`validate` checks a fully staged copy, including the bundled Ruby entry point and generated adapter.
|
|
309
|
+
`push` then:
|
|
202
310
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
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
|
-
|
|
317
|
+
During development, suppress either lifecycle action when needed:
|
|
210
318
|
|
|
211
|
-
|
|
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
|
-
|
|
214
|
-
|
|
215
|
-
|
|
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
|
-
|
|
218
|
-
|
|
219
|
-
|
|
328
|
+
## Command-line reference
|
|
329
|
+
|
|
330
|
+
```text
|
|
331
|
+
omarchy_ui <command> [arguments]
|
|
220
332
|
```
|
|
221
333
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
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
|
-
|
|
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
|
-
|
|
346
|
+
## Packaging
|
|
229
347
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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
|
-
|
|
355
|
+
The bundle contains:
|
|
238
356
|
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
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
|
-
|
|
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
|
-
```
|
|
250
|
-
|
|
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
|
-
|
|
434
|
+
## Architecture
|
|
257
435
|
|
|
258
436
|
```text
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
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
|
-
|
|
268
|
-
animated. Properties in the same hash animate in parallel.
|
|
456
|
+
The dependency direction is deliberate:
|
|
269
457
|
|
|
270
|
-
|
|
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
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
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
|
-
|
|
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
|
-
|
|
471
|
+
The x86-64 Linux mruby runtime is produced by a pinned GitHub Actions workflow that:
|
|
283
472
|
|
|
284
|
-
|
|
285
|
-
|
|
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
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
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
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
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
|
-
##
|
|
499
|
+
## Troubleshooting
|
|
307
500
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
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
|
-
|
|
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
|
-
|
|
316
|
-
|
|
317
|
-
|
|
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
|
|
321
|
-
|
|
322
|
-
|
|
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
|
-
|
|
553
|
+
Omarchy UI is available under the [MIT License](LICENSE).
|
|
554
|
+
|
|
555
|
+
<p align="right"><a href="#omarchy-ui">Back to top ↑</a></p>
|