Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/WIDGET-INTEROP-PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ A user widget is a folder `~/.config/omamobile/widgets/<id>/` with an Omarchy-st
| A capability declaration, refused when missing | Commands are listed, not declared | Approval stores a capability set derived from the list (§3) |
| Network ports off until turned on | Network runs at once | The same opt-in for OWL widgets that use the network (§3) |
| `host.timeFormat`, the system's 12/24-hour setting | `fmtTime(now, "HH:mm")` with a fixed pattern | Propose a `timeFormat` tile variable (Q5). Not overridden by us: that would change rendering against the reference |
| Location from GeoClue, rounded to about 1 km (`useLocation` in 7 ports) | IP location through wttr.in, or a typed city | Propose a coarse `location` source (Q6). Keep those ports until it exists |
| Location from GeoClue, rounded to about 1 km (`useLocation` in 7 ports) | IP location through wttr.in, or a typed city (our copies since 2026-11-02: Open-Meteo, from a typed city or the phone's position) | Propose a coarse `location` source (Q6). Keep those ports until it exists |
| Commands as argv with no shell | `bash -c` strings, with values safe only through `sh()` | Accept `bash -c` for OWL, since the commands are static and listed, and refuse store-rule violations (§3.2) |
| A crash guard per widget (`widget-guard.json`) | "Errors never take the home screen down" (evaluator level) | Our runtime isolates errors and reuses the guard (§2.7) |
| Cache that survives layout edits (`host.cached`) | Not needed | Our runtime instances outlive cell rebuilds (§2.7) |
Expand Down
15 changes: 8 additions & 7 deletions docs/owl-review/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,15 @@ In the Widgets sheet the built-ins keep their names, icons and sizes on our grid
* the first time, the file is kept as `~/.config/omamobile/home.json.before-owl` (never overwritten later);
* it is idempotent: a migrated layout has no ports left, and reading it again changes nothing (tested);
* settings that mean the same carry over as the OWL widget's state: the typed **city** (today, forecast, air and pollen, sun and moon, planes overhead), **habit check-ins**, the **owl's** birth, feeding and pets, the **lava lamp's** wax, the chosen **departure stop**. These don't, because the OWL original keeps them elsewhere or not at all: countdown dates and habit names (the originals read `~/.config/omarchy-proot/countdown` and `…/habits`), exchange rates' currencies, the feeds list, uptime's sites, releases' repositories, Omarchy commits' repository and branch, Home Assistant's address, token and entities (the original reads them from its own file), focus length, calendar's first day, the analog clock's second hand, world clock's cities, Hacker News' and Lobsters' refresh interval, and the todo file's path;
* **"Use my location"** stays with the placement. The weather built-ins (today, forecast, air and pollen, sun and moon, planes overhead) get the phone's position as before (GeoClue at city accuracy, rounded to about 1 km, through the same `locate.sh`), now as their `city` state: wttr.in reads `52.52,13.40` as a place. It goes in only while the city is empty or still the last position put in, so a city you type wins, and only once the widget's internet is allowed. The OWL widget's own city field then shows the coordinates.
* **"Use my location"** stays with the placement. The weather built-ins (today, forecast, air and pollen, sun and moon, planes overhead) get the phone's position as before (GeoClue at city accuracy, rounded to about 1 km, through the same `locate.sh`), now as their `city` state, and our copies of them (below) send `52.52,13.40` straight to Open-Meteo. It goes in only while the city is empty or still the last position put in, so a city you type wins, and only once the widget's internet is allowed. The OWL widget's own city field then shows the coordinates.
* **Weather from Open-Meteo (2026-11-02).** The store's weather widgets asked wttr.in, which also guessed a place from the IP address; it stopped answering. `omamobile-owl-widgets` 0.1.2 ships our own copies of today, forecast, sun and moon, air and pollen and planes overhead (and of two community widgets that used it, red panda and omaprayer), with the weather from Open-Meteo, the same source as the phone's own weather service. A typed city is looked up with Open-Meteo's geocoding ("Town, Region" picked as the lock screen's weather does, US state codes included); the phone's position goes straight in; with neither the widget says "set a city or turn on Location". The unit follows the phone's locale (`phoneUnit`, from `OwlCell.qml`). The moon phase is worked out from the date (Open-Meteo has none). Each copy credits Open-Meteo (CC BY 4.0). Today, forecast, sun and moon, red panda and omaprayer ask for approval again (their command lists changed); air and pollen and planes overhead keep an earlier approval, because the approval compares command strings and theirs are unchanged, so they move to Open-Meteo's place lookup without asking. Omaprayer's "auto" now asks for a city. Details: `packages/omamobile-owl-widgets/README.md`.
* **Tap anywhere to switch views:** the 21 originals with a longer view (the nine leagues, today, forecast, crypto, air and pollen, sun and moon, planes, departures, fetch, IFSC, notifications, Omarchy commits, world clock) open its `screen { }` on a tap anywhere on the tile, in place, with "‹" to go back, as the ports' expanded views did.

**Approval after migration.** A migrated built-in is approved without asking **only when its original needs nothing the port didn't have**: no commands where the port ran none, no internet where it had none, no other hosts than the port's, no files, notifications, vibration or torch, and no risk flag. **A command that installs software (pacman, yay, paru, pip, npm, flatpak and the like) is a risk flag: it is never approved without you, and the sheet shows it in red under "Look twice"** (sudo and the other root tools are refused outright). Automatic approvals stored by an earlier build are checked again at every start with these rules, and withdrawn if they no longer pass (the first phone test had auto-approved Fetch, whose command installs fastfetch when it is missing: that one is withdrawn now, and Fetch asks). Its internet is on only if the port's was. Anything more appears on the tile as "Before it runs: …, Tap to review" and goes through the approval sheet. **17 of 47 pass.** Most of the rest ask because the original fetches with `curl` in a command where our port used the shell's own web requests. The rule applied to every built-in (`tests/owl/port-approvals.js`, the same function the home screen runs):
**Approval after migration.** A migrated built-in is approved without asking **only when its original needs nothing the port didn't have**: no commands where the port ran none, no internet where it had none, no other hosts than the port's, no files, notifications, vibration or torch, and no risk flag. **A command that installs software (pacman, yay, paru, pip, npm, flatpak and the like) is a risk flag: it is never approved without you, and the sheet shows it in red under "Look twice"** (sudo and the other root tools are refused outright). Automatic approvals stored by an earlier build are checked again at every start with these rules, and withdrawn if they no longer pass (the first phone test had auto-approved Fetch, whose command installs fastfetch when it is missing: that one is withdrawn now, and Fetch asks). Its internet is on only if the port's was. Anything more appears on the tile as "Before it runs: …, Tap to review" and goes through the approval sheet. **19 of 47 pass.** Most of the rest ask because the original fetches with `curl` in a command where our port used the shell's own web requests. The rule applied to every built-in (`tests/owl/port-approvals.js`, the same function the home screen runs; for the five weather built-ins, "the port had" is the hosts the catalog lists for them now, Open-Meteo's, since wttr.in was dropped on 2026-11-02):

| Built-in | OWL original | The port had | The original needs | After migration |
| --- | --- | --- | --- | --- |
| Air and pollen | simonschubert/air-and-pollen | internet (wttr.in, air-quality-api.open-meteo.com) | uses the internet (wttr.in, air-quality-api.open-meteo.com) | **approved** |
| Air and pollen | simonschubert/air-and-pollen | internet (geocoding-api.open-meteo.com, air-quality-api.open-meteo.com) | uses the internet (geocoding-api.open-meteo.com, air-quality-api.open-meteo.com) | **approved** |
| Analog clock | simonschubert/analog-clock | nothing | runs nothing, reaches nothing | **approved** |
| Bitcoin (CoinGecko) | simonschubert/crypto | internet (coingecko.com) | uses the internet (api.coingecko.com) | **approved** |
| Bundesliga | simonschubert/bundesliga | internet (espn.com, espncdn.com) | runs 2 commands, uses the internet (site.api.espn.com, a.espncdn.com) | asks: runs commands |
Expand All @@ -42,7 +43,7 @@ In the Widgets sheet the built-ins keep their names, icons and sizes on our grid
| Feeds | simonschubert/feeds | commands, internet (any you listed) | runs 2 commands | **approved** |
| Fetch | simonschubert/fetch | commands | runs 2 commands | asks: installs software (pacman, yay, paru and the like) |
| Focus | simonschubert/focus | nothing | runs nothing, reaches nothing | **approved** |
| Forecast | simonschubert/forecast | internet (wttr.in) | runs 1 command, uses the internet (wttr.in) | asks: runs commands |
| Forecast | simonschubert/forecast | internet (geocoding-api.open-meteo.com, api.open-meteo.com) | uses the internet (geocoding-api.open-meteo.com, api.open-meteo.com) | **approved** |
| Free games | simonschubert/free-games | internet (store.epicgames.com, store-site-backend-static.ak.epicgames.com) | runs 1 command, uses the internet (store-site-backend-static.ak.epicgames.com, store.epicgames.com) | asks: runs commands |
| GitHub | simonschubert/github | commands, internet (github.com) | runs 2 commands | **approved** |
| GitHub trending | simonschubert/github-trending | internet (github.com) | runs 1 command, uses the internet (api.github.com) | asks: runs commands |
Expand All @@ -64,13 +65,13 @@ In the Widgets sheet the built-ins keep their names, icons and sizes on our grid
| Omarchy commits | simonschubert/omarchy-commits | internet (github.com) | uses the internet (api.github.com) | **approved** |
| Owl | simonschubert/owl | nothing | runs nothing, reaches nothing | **approved** |
| Picture of the day | simonschubert/picture-of-the-day | internet (wikimedia.org, commons.wikimedia.org) | runs 1 command, uses the internet (api.wikimedia.org) | asks: runs commands |
| Planes overhead | simonschubert/planes-overhead | internet (wttr.in, opensky-network.org, globe.adsbexchange.com) | uses the internet (wttr.in, opensky-network.org) | **approved** |
| Planes overhead | simonschubert/planes-overhead | internet (geocoding-api.open-meteo.com, opensky-network.org, globe.adsbexchange.com) | uses the internet (geocoding-api.open-meteo.com, opensky-network.org) | **approved** |
| Premier League | simonschubert/premier-league | internet (espn.com, espncdn.com) | runs 2 commands, uses the internet (site.api.espn.com, a.espncdn.com) | asks: runs commands |
| Releases | simonschubert/releases | internet (github.com) | runs 2 commands, uses the internet (api.github.com) | asks: runs commands |
| Rocket launches | simonschubert/launches | internet (spacelaunchnow.me, ll.thespacedevs.com) | runs 1 command, uses the internet (ll.thespacedevs.com, spacelaunchnow.me) | asks: runs commands |
| Serie A | simonschubert/serie-a | internet (espn.com, espncdn.com) | runs 2 commands, uses the internet (site.api.espn.com, a.espncdn.com) | asks: runs commands |
| Sun and moon | simonschubert/sun-and-moon | internet (wttr.in) | runs 1 command, uses the internet (wttr.in) | asks: runs commands |
| Today | simonschubert/today | internet (wttr.in, yr.no) | uses the internet (wttr.in) | **approved** |
| Sun and moon | simonschubert/sun-and-moon | internet (geocoding-api.open-meteo.com, api.open-meteo.com) | uses the internet (geocoding-api.open-meteo.com, api.open-meteo.com) | **approved** |
| Today | simonschubert/today | internet (geocoding-api.open-meteo.com, api.open-meteo.com, yr.no) | uses the internet (geocoding-api.open-meteo.com, api.open-meteo.com) | **approved** |
| Todo | simonschubert/todo | commands | runs 3 commands | asks: runs a command built while it runs |
| Uptime | simonschubert/uptime | internet (any you listed) | runs 2 commands, uses the internet | asks: runs commands |
| Wikipedia | simonschubert/wikipedia | internet (wikimedia.org, en.m.wikipedia.org) | runs 1 command, uses the internet (api.wikimedia.org) | asks: runs commands |
Expand Down
73 changes: 73 additions & 0 deletions packages/omamobile-owl-widgets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<!-- SPDX-License-Identifier: MIT -->
# omamobile-owl-widgets

The OWL widget store ([Simon Schubert's omarchy-widgets](https://github.com/SimonSchubert/omarchy-widgets),
MIT) at the commit pinned in `PKGBUILD`, for the home screen's built-ins and its Store tab: only
the widgets that pass our conformance suite (`status.json`), with an index built by our own
compiler (`update-index.js`, committed as `index.json`). `install` copies each file and checks it
against the index's sha256.

## Our copies diverge from the store (`overrides/`)

A widget with a file in `overrides/<author>/<name>/widget.owl` ships that file instead of the
store's. `update-index.js` indexes it, and `install` checks it the same way. These copies are ours
and differ from the store's:

| Widget | Store version | Ours | What changed |
| --- | --- | --- | --- |
| `simonschubert/today` | 1.1 | 1.1.1 | Weather from Open-Meteo instead of wttr.in: current conditions, the next 24 hours, 3 days, wind, humidity, rain, UV, pressure, visibility, sunrise and sunset. The moon phase is worked out from the date (Open-Meteo has none). Credits "weather: open-meteo.com (cc by 4.0)" on its screen |
| `simonschubert/forecast` | 1.2 | 1.2.1 | The same, through `http()` instead of `curl` and `jq` in a command, so it no longer runs commands or needs those packages |
| `simonschubert/sun-and-moon` | 1.2 | 1.2.1 | Sunrise and sunset from Open-Meteo through `http()` (no commands); the moon from the date |
| `simonschubert/air-and-pollen` | 1.1 | 1.1.1 | Already used Open-Meteo's air-quality API; the place now comes from Open-Meteo's geocoding or the phone's location instead of wttr.in |
| `simonschubert/planes-overhead` | 1.1 | 1.1.1 | The place from Open-Meteo's geocoding or the phone's location instead of wttr.in |
| `ssalentin/red-panda` | 1.1 | 1.1.1 | Rain from the phone's own weather reading (`~/.local/state/omamobile/weather.json`, written by `omamobile-weather` from Open-Meteo) instead of wttr.in by IP; `file()` with `optional` needs `owl: 5` |
| `setiapam/omaprayer` | 1.2 | 1.2.1 | No location by IP (it asked wttr.in): "auto" now shows "set a city" instead of prayer times for a place it guessed; a typed city (Jakarta included) works as before |

Why: wttr.in stopped answering (2026-11-02, refused from the laptop and the phone, so the Today
widget showed only the date), and the phone's own weather service (`omamobile-weather` in
omamobile-shell) already uses Open-Meteo. All weather now comes from Open-Meteo
(`api.open-meteo.com`, `geocoding-api.open-meteo.com`, `air-quality-api.open-meteo.com`; free, no
key, [CC BY 4.0](https://open-meteo.com/en/license), which asks for the credit each copy shows).

How the weather copies find the place, the same in each:

* `city` is "lat,lon" (the home screen puts the phone's position there, rounded to about 1 km,
when "Use my location" is on): it goes straight to Open-Meteo, with no lookup;
* `city` is a name ("Town" or "Town, Region"): Open-Meteo's geocoding looks the town up, and the
first result whose region, county, country or country code matches one of the parts after a
comma wins (a US state code also reads as its state: "Springfield, IL" is Illinois), else the
first result. This is `omamobile-weather`'s `pick_place` rule, and `test/open-meteo.js` checks
the two agree, because the lock screen reads Today's city too;
* neither: Open-Meteo has no IP location, so the widget says "set a city or turn on Location".

Units: a `phoneUnit` state ("C" or "F") that the home screen fills from the phone's locale
(`HomeModel.localeUnit`, °F in the US, as `omamobile-weather`), else the found place's country
(°F in the US, Liberia and Myanmar), else °C. WMO weather codes become the words
`omamobile-weather` uses and the glyphs `weatherIcon()` draws. Today converts visibility from the
unit Open-Meteo reports (`hourly_units`: feet when `precipitation_unit=inch`, else metres); the
other converted fields come in the units asked for (wind, rain) or always in hPa (pressure).

Versions are bumped one step past the store's (1.1 to 1.1.1), so the Store tab doesn't offer the
store's same version as an update over ours, while a newer store release still shows as one.
**Which copies ask for approval again.** An approval holds for one exact list of commands, URLs
and files, as the compiler prints it, and a URL built from widget values is listed without its host.
Today, forecast, sun and moon, red panda and omaprayer changed their lists, so they ask again. Air
and pollen and planes overhead kept theirs (two built URLs each), so an approval given before still
holds and they move from wttr.in to Open-Meteo's place lookup without asking: a typed city name
goes to it, as it went to wttr.in; the phone's position never does. Putting the hosts into the
approval is a change of its own.

The top line of each copy names the store file and commit it was modified from; `overrides/LICENSE`
is the store's MIT licence.

These changes are meant to go upstream: once the store takes them (or its own fix for wttr.in), pin
that commit and delete the copies here.

## Changing the package

* a copy: edit it under `overrides/`, bump its `version` in `meta`, then rebuild the index from a
checkout of the store at the pinned commit:
`node update-index.js <store checkout> > index.json`;
* `test/all` checks the index against `status.json` and every copy, stages the package from a
made-up store, and (beside omamobile-shell) runs `test/open-meteo.js`, which drives each copy
with made-up Open-Meteo answers through our OWL runtime.
Loading