omarchy-ui 0.0.1-x86_64-linux → 0.0.2-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d11e68e81c3b65cc3b41b2dae80f301e7ffb3e29f44cfdde1495a92a6a562e8d
4
- data.tar.gz: c7baff4c2f09d68dad37f3b0742c00d3abca2a661fa71f425443db9ae1850b85
3
+ metadata.gz: d8c832cd4301f1b237ef13b46fea6eed08cafdae66a1411eae88a887a59a5cf0
4
+ data.tar.gz: 60b933f9795e67a7b6c1ce2d8e90cb15716dbc9821250bbd8e85a4c7e840d1f1
5
5
  SHA512:
6
- metadata.gz: 3f256ebcdcc59f1c4bf984900e8f0f1f51896c719f5b956677bb734be45139349d56ee6a05ee6d117c7d79fa325ca13348f0e9088317a49d8ac03829d9d3d3c6
7
- data.tar.gz: dc8c3e1df89667cc9204218cb39b9c80ef50599cb78858041650202135a80a98424b08cdfe7932a6854f2e39de3e40a76e0e7466e8d0e8f35a73e7012830a994
6
+ metadata.gz: 415009fe051699cef4821e70e394dec94b883aa86dfd325a8c2e8afd38a7a3076c9ec21df6efea747ae791b715c5a5de92ef837ccef84f458683f49d805e295e
7
+ data.tar.gz: 3a017f0872adcec2dff15d35f03e7ac40a2d463dcee56a978e2e514aee187c804ecfce9e8573e3cf1b4312fad5364ec0686af3e7e9e6f7f9eab9ea09a45a1eab
data/README.md CHANGED
@@ -3,10 +3,9 @@
3
3
  > **Experimental:** the API and packaging format are being validated with real Omarchy apps.
4
4
  > Pin the gem version for production projects and review release notes before upgrading.
5
5
 
6
- Omarchy UI is the official-style Ruby application framework for building native Omarchy
7
- interfaces. Ruby owns application state, events, tasks, commands, and models; a shared mruby
8
- runtime communicates with QML over a validated protocol. Applications do not need system Ruby
9
- and do not copy the framework runtime into every project.
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.
10
9
 
11
10
  ```ruby
12
11
  require "omarchy_ui" unless Object.const_defined?(:OmarchyUI)
@@ -33,19 +32,9 @@ gem install omarchy-ui
33
32
  omarchy_ui new "My App"
34
33
  ```
35
34
 
36
- The gem includes the CLI, QML bridge, and a prebuilt mruby runtime with Omarchy UI embedded.
37
- Developers do not install mruby, compile the runtime, copy framework files, or require Ruby on
38
- machines that run a bundled application. Omarchy with Quickshell is the only host requirement.
39
-
40
- Framework maintainers can rebuild the pinned mruby 4.0 binary with:
41
-
42
- ```bash
43
- ./scripts/build-mruby-runtime.sh
44
- install -Dm755 build/runtime/omarchy-ui-runtime ~/.local/bin/omarchy-ui-runtime
45
- ```
46
-
47
- The stripped prebuilt runtime is approximately 1.8 MB and embeds the Ruby framework, JSON, regular
48
- expressions, process support, and the native safe-command bridge.
35
+ The gem contains everything required to create, launch, and bundle an application. Developers do
36
+ not need to install a separate runtime or copy framework files. Bundled applications require only
37
+ an Omarchy computer to run.
49
38
 
50
39
  ## Create and run an application
51
40
 
@@ -77,9 +66,8 @@ omarchy_ui bundle
77
66
  ./dist/my-app/run
78
67
  ```
79
68
 
80
- `bundle` copies the working application, framework QML bridge, and prebuilt mruby executable into
81
- `dist/<project-name>/`. The generated `run` launcher invokes Quickshell directly with the bundled
82
- runtime, so the destination computer does not need Ruby or the `omarchy-ui` gem.
69
+ `bundle` creates a self-contained application under `dist/<project-name>/`. The generated `run`
70
+ launcher works on another Omarchy computer without Ruby or the `omarchy-ui` gem.
83
71
 
84
72
  An Omarchy Shell plugin is a separate packaging mode. It requires `manifest.json` so the shell
85
73
  can discover its ID, entry points, bar placement, and lifecycle. For a project that intentionally
@@ -90,7 +78,7 @@ omarchy_ui validate path/to/plugin
90
78
  omarchy_ui push path/to/plugin
91
79
  ```
92
80
 
93
- `push` stages and validates the project, injects the shared QML bridge files, backs up an existing
81
+ `push` stages and validates the project, adds the framework support files, backs up an existing
94
82
  installation, installs atomically, optionally enables it, and restarts Omarchy Shell. Use
95
83
  `--no-enable` or `--no-restart` when needed.
96
84
 
@@ -146,25 +134,13 @@ end
146
134
 
147
135
  State accepts protocol-safe values: `nil`, booleans, finite numbers, strings, arrays, and hashes
148
136
  with string/symbol keys. Bindings are reevaluated after changes and emit small property patches.
137
+ Ruby blocks passed to `text`, `property`, or `bind` are reactive; no wrapper is required.
149
138
  `transaction` batches related state writes.
150
139
 
151
- Use `dynamic` when state changes the structure rather than only a property:
152
-
153
- ```ruby
154
- dynamic id: :results, spacing: 8 do
155
- if state.items.empty?
156
- text "Nothing found"
157
- else
158
- state.items.each { |item| text item.fetch("name") }
159
- end
160
- end
161
- ```
162
-
163
140
  ## Common properties
164
141
 
165
142
  Every component supports `visible`, `enabled`, `opacity`, `scale`, `rotation`, `z`, `width`, and
166
- `height`. Component-specific properties are listed below. Names use Ruby `snake_case`; the QML
167
- bridge maps them to native property names.
143
+ `height`. Component-specific properties are listed below. Property names use Ruby `snake_case`.
168
144
 
169
145
  ## Built-in component reference
170
146
 
@@ -227,7 +203,7 @@ Typical event payloads are:
227
203
  - `list_view` change/activate: value, index, and original item
228
204
  - `list_view` scroll: x and y offsets
229
205
 
230
- Only declared and subscribed events cross the QML/Ruby boundary.
206
+ Only declared and subscribed events are delivered to application handlers.
231
207
 
232
208
  ## Bindings and properties
233
209
 
@@ -286,7 +262,7 @@ in_bounce, out_bounce, in_out_bounce
286
262
  ```
287
263
 
288
264
  All common numeric visual properties and declared numeric custom-adapter properties can be
289
- animated. Parallel property hashes become parallel QML animation tracks.
265
+ animated. Properties in the same hash animate in parallel.
290
266
 
291
267
  ## Tasks and commands
292
268
 
@@ -296,10 +272,9 @@ every(5, immediate: true) { state.updated_at = Time.now.to_i }
296
272
  async { state.result = run_command(["uname", "-r"], timeout: 2).stdout.strip }
297
273
  ```
298
274
 
299
- `after`, `every`, and `async` return cancellable task objects. MRI uses worker threads; mruby
300
- uses cooperative ticks from the QML host. Command execution always takes an argv array and does
301
- not invoke a shell. Results expose `stdout`, `stderr`, `exitstatus`, and `success?`; timeout raises
302
- `OmarchyUI::CommandTimeout`.
275
+ `after`, `every`, and `async` return cancellable task objects. Command execution always takes an
276
+ argv array and does not invoke a shell. Results expose `stdout`, `stderr`, `exitstatus`, and
277
+ `success?`; timeout raises `OmarchyUI::CommandTimeout`.
303
278
 
304
279
  ## Custom QML components
305
280
 
@@ -325,16 +300,11 @@ declared signals are forwarded to Ruby. A container adapter can expose an `Item`
325
300
  `contentHost`; framework children are parented into it automatically. See
326
301
  [the QML support matrix](docs/qml-support.md) and [Sparkline.qml](Components/Sparkline.qml).
327
302
 
328
- ## Architecture and safety
329
-
330
- `Service.qml` supervises one long-lived mruby process and exchanges versioned NDJSON through
331
- stdin/stdout. `ControlNode.qml` recursively renders validated component nodes. Property changes
332
- send incremental patches; dynamic branches replace only affected children; animations run in
333
- QML. Closing a window or panel does not evaluate Ruby or QML received over the protocol.
303
+ ## Safety
334
304
 
335
- Component names, QML filenames, properties, events, IDs, effects, values, message sizes, and
336
- animation limits are validated. Commands use argv arrays without a shell. Applications and
337
- plugins still run with the current user's permissions.
305
+ Component names, files, properties, events, IDs, effects, values, message sizes, and animation
306
+ limits are validated. Commands use argv arrays without a shell. Applications and plugins run with
307
+ the current user's permissions, so review third-party code before installing it.
338
308
 
339
309
  ## Omarchy Phone example
340
310
 
@@ -354,8 +324,8 @@ ruby script/benchmark.rb
354
324
  ```
355
325
 
356
326
  The suite covers state, bindings, repeated structures, event persistence, component schemas,
357
- animation tracks and sequences, tasks, command safety, mruby compatibility, standalone project
358
- generation, packaging, manifests, QML contracts, QML lint, and the phone backend.
327
+ animation tracks and sequences, tasks, command safety, standalone project generation, packaging,
328
+ manifests, component contracts, linting, and the phone backend.
359
329
 
360
330
  ## License
361
331
 
@@ -31,6 +31,8 @@ module OmarchyUI
31
31
  @err.puts("Usage: omarchy_ui <new NAME|run FILE|launch FILE|bundle [DIRECTORY]|push [DIRECTORY]|validate [DIRECTORY]|version>")
32
32
  command.nil? ? 0 : 64
33
33
  end
34
+ rescue Interrupt
35
+ 130
34
36
  rescue ArgumentError, SystemCallError, JSON::ParserError => error
35
37
  @err.puts("omarchy_ui: #{error.message}")
36
38
  1
@@ -64,7 +66,8 @@ module OmarchyUI
64
66
  environment = ENV.to_h.merge(
65
67
  "OMARCHY_UI_PROJECT_DIR" => project_dir,
66
68
  "OMARCHY_UI_RUBY_PROGRAM" => file,
67
- "OMARCHY_UI_RUNTIME" => Runtime.executable
69
+ "OMARCHY_UI_RUNTIME" => Runtime.executable,
70
+ "QT_LOGGING_RULES" => qt_logging_rules
68
71
  )
69
72
  success = system(environment, "quickshell", "--path", File.join(runtime_dir, "App.qml"))
70
73
  return success ? 0 : ($?&.exitstatus || 1)
@@ -117,6 +120,7 @@ module OmarchyUI
117
120
  export OMARCHY_UI_RUNTIME="$app_dir/omarchy-ui-runtime"
118
121
  export OMARCHY_UI_PROJECT_DIR="$app_dir"
119
122
  export OMARCHY_UI_RUBY_PROGRAM="$app_dir/main.rb"
123
+ export QT_LOGGING_RULES="${QT_LOGGING_RULES:+$QT_LOGGING_RULES;}qt.qpa.services.warning=false"
120
124
  exec quickshell --path "$app_dir/App.qml"
121
125
  SH
122
126
  FileUtils.chmod(0o755, launcher)
@@ -127,6 +131,10 @@ module OmarchyUI
127
131
  raise
128
132
  end
129
133
 
134
+ def qt_logging_rules
135
+ [ENV["QT_LOGGING_RULES"], "qt.qpa.services.warning=false"].compact.reject(&:empty?).join(";")
136
+ end
137
+
130
138
  def push(arguments)
131
139
  enable = !arguments.delete("--no-enable")
132
140
  restart = !arguments.delete("--no-restart")
data/lib/omarchy_ui.rb CHANGED
@@ -15,7 +15,7 @@ require_relative "omarchy_ui/project"
15
15
  require_relative "omarchy_ui/runtime"
16
16
 
17
17
  module OmarchyUI
18
- VERSION = "0.0.1"
18
+ VERSION = "0.0.2"
19
19
  FRAMEWORK_ROOT = File.expand_path("..", __dir__)
20
20
 
21
21
  def self.plugin(&definition)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omarchy-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Adam Moussa Ali
@@ -9,8 +9,7 @@ bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
- description: A persistent Ruby runtime, reactive UI model, and safe QML renderer for
13
- Omarchy.
12
+ description: The application framework for building native Omarchy apps with Ruby.
14
13
  executables:
15
14
  - omarchy_ui
16
15
  extensions: []