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
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/search/target/
/bin/omacast-search
/bin/.search.*
# Cartridge is a licensed font: served from the deployed site, never committed (the repo is public
# and ships to every plugin install). Copy the .woff2 files in before deploying; see site/README.md.
site/public/fonts/
# Generated by `node site/build.mjs` from core/*.js and data/emoji.json; run it before previewing or deploying.
site/public/demo/core.js
site/public/demo/emoji.json
# wrangler's local state from deploys and dry runs
site/.wrangler/
6 changes: 5 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,17 @@ bin/omacast # bash CLI (works from a dev checkout or a marketplace
bin/omacast-search # built flea-search helper (gitignored; bin/build-search builds it from search/)
search/ # Rust source of the optional helper; builds into ~/.cache/omacast/search-target
SPEC.md, reference/ # the spec
site/ # the website (omacast.typecraft.dev, Cloudflare Pages, wrangler.jsonc): static public/ plus launcher.js, which runs core/*.js in the browser.
# `node site/build.mjs` bundles core/ into public/demo/core.js (gitignored); see site/README.md. Cartridge fonts are gitignored
tests/*.test.js # node --test unit tests for core/ (ranker, frecency, Omarchy menu, root search, …)
tests/smoke.sh # live acceptance check against the running shell
LICENSE, README.md # marketplace requirements: root license, install/removal instructions
```

The shell loads only the manifest's entry points, so the spec, tests and Rust source ride along harmlessly. Every push to the default branch reaches marketplace users on their next `omarchy plugin update`. `omarchy plugin validate .` must pass and the tree may hold no symlinks.

The website runs `core/*.js` unchanged in a browser, which is one more reason they stay free of Qt and node. `site/public/launcher.js` is a hand port of `Backend.qml` and `ui/LauncherWindow.qml`: when a change there alters behaviour a visitor would see, port it. `tests/site-demo.test.js` loads the bundle the way a browser does.

Rules for `core/*.js`: one self-contained file per module (QML `import "x.js"` and node `require` must both work, so a module never imports another one). Expose functions through the `if (typeof module !== "undefined") module.exports = …` guard. QML wires the modules together.

## Commands
Expand Down Expand Up @@ -109,7 +113,7 @@ Check each of these on the machine instead of assuming it; Omarchy changes often

## Status

Renamed **raylinux → oma-launcher → oma-cast** on 2026-10-19, then **oma-cast → omacast** on 2026-11-01 for the Omarchy plugin marketplace (plugin `typecraft.omacast`, display name `omacast`, CLI `omacast`, IPC target `omacast`, global shortcut `omacast:toggle`, XDG dirs `omacast`). Another marketplace submission is called "Oma Cast" and uses IPC target `oma-cast`. The GitHub repo is still `typecraft-dev/oma-cast`. `core/Paths.js` `legacyMoves` moves the old XDG dirs on first start. `bin/omacast install` removes the old plugin links and CLI link, and `setup hyprland` migrates `oma-cast.lua`. The app icon is Omarchy's logo: glyph `\ue900` in the `omarchy` font, the same one the bar's menu button uses.
Renamed **raylinux → oma-launcher → oma-cast** on 2026-10-19, then **oma-cast → omacast** on 2026-11-01 for the Omarchy plugin marketplace (plugin `typecraft.omacast`, display name `omacast`, CLI `omacast`, IPC target `omacast`, global shortcut `omacast:toggle`, XDG dirs `omacast`). Another marketplace submission is called "Oma Cast" and uses IPC target `oma-cast`. The GitHub repo is still `typecraft-dev/oma-cast`. `core/Paths.js` `legacyMoves` moves the old XDG dirs on first start. `bin/omacast install` removes the old plugin links and CLI link, and `setup hyprland` migrates `oma-cast.lua`. The app icon is omacast's own logo (`ui/logo.svg` through `ui/Logo.qml`, the same drawing as `site/public/icon.svg`; a test keeps the two files identical): Omarchy's square maze in typecraft's stripe colours. It shows in the header at root, the footer and the empty state. Omarchy's logo glyph (`\ue900` in the `omarchy` font) still marks the "Omarchy Menu" command and actions with no icon of their own.

**Phase 1 (Quickshell build): done**, with the gaps listed below. **Phase 0: done.** Omarchy 4.0.0.alpha, Quickshell 0.3.2, Hyprland 0.56.2.

Expand Down
306 changes: 230 additions & 76 deletions README.md

Large diffs are not rendered by default.

123 changes: 123 additions & 0 deletions site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# omacast website

A static site with no dependencies and one small build step (`node build.mjs`, for the in-browser launcher):

```
public/index.html the page
public/styles.css styling and CSS animations (Catppuccin Mocha / Latte, typecraft's stripes)
public/app.js scroll-driven effects (plain JS)
public/launcher.js omacast in the browser: the hero demo and the "Try it" overlay
public/launcher.css its styles
public/demo/ what the launcher runs on (see "The launcher in the browser")
public/icon.svg the icon; favicon-32.png, apple-touch-icon.png and icon-512.png are rendered from it
public/img/ WebP copies of docs/screenshots/
public/fonts/ Cartridge (licensed; not in git, see below)
public/_headers security and cache headers for Cloudflare
build.mjs bundles ../core/*.js for the browser
snapshot.mjs refreshes the Omarchy data in public/demo/
wrangler.jsonc Cloudflare config
```

## The launcher in the browser

The hero demo and the overlay it opens are omacast itself, not a mock-up. The overlay opens only when asked:
the "Try it in your browser" buttons, "Try it yourself" under the demo, a click on the demo, or the `/` key. `build.mjs` wraps the unchanged `core/*.js` modules into `public/demo/core.js`, so search, ranking,
frecency, the calculator, emoji search, Clipboard History and the Omarchy menu tree are the launcher's own code.
`launcher.js` is the part that is QML on the desktop: a backend over `localStorage` (after `Backend.qml`) and the
window (after `ui/LauncherWindow.qml`). When either of those changes behaviour, port the change by hand.

What it runs on:

| File in `public/demo/` | What | In git |
|---|---|---|
| `core.js`, `emoji.json` | `core/*.js` bundled, and a copy of `data/emoji.json`. Written by `node build.mjs` | no |
| `snapshot.json` | Omarchy's menu, which rows are hidden or checked, and ECB exchange rates. Written by `node snapshot.mjs` | yes |
| `emoji-keywords.json` | Omarchy's emoji search keywords. Written by `node snapshot.mjs` | yes |
| `symbols.woff2` | the icon glyphs, subset from JetBrainsMono Nerd Font. Written by `node snapshot.mjs` (needs `uvx`) | yes |
| `NOTICE.md`, `OFL.txt` | licences for the three above | yes |

- **Run `node build.mjs` before previewing or deploying**, and again after changing anything in `core/`. Without
it the page still works, with a screenshot where the demo would be and no "Try it" button.
- Run `node snapshot.mjs` on an Omarchy machine to pick up a new Omarchy menu or new icons in `launcher.js`.
It runs the menu's real guards, then removes what is personal: Remove rows are hidden, nothing reads as
installed, and the default browser, terminal and editor are set to Omarchy's own. Other toggles (dock
position, clock format and the like) are the snapshot machine's. `tests/site-demo.test.js` checks the scrub.
- Apps, fonts and kernels are stand-ins (`APPS` and `PROVIDER_OUTPUT` in `launcher.js`), Clipboard History is
seeded with a few copies, and themes are nine of Omarchy's palettes (`THEMES`).
- Nothing launches. Actions that need a desktop say what they would have done; copies go to the visitor's
clipboard; web searches and links open in a new tab. What a visitor does is stored only in their browser
(`localStorage` keys starting `omacast-demo:`); the overlay's Reset link clears it.
- Differences from the desktop: no typo-tolerant search helper (results are the built-in ranker's, as on an
install without `bin/build-search`), no Super or vim bindings, no compact mode or zoom, and some shortcuts
belong to the browser (Ctrl+T, Ctrl+N, Ctrl+Shift+C/P/K in some browsers). Every action is also in the
action panel, which can be clicked.
- The hero demo is the same launcher with its own in-memory backend, driven by `Autoplay` in `launcher.js`.

## Fonts

Headings use **Cartridge**, which is a licensed font, so `public/fonts/` is gitignored: the repo is public and
is also what every omacast install clones. The site expects these three files there:

```
Cartridge-Regular.woff2 Cartridge-Bold.woff2 Cartridge-Black.woff2
```

Convert them from the licensed `.otf` files with `woff2_compress Cartridge-Bold.otf` (package `woff2`).
Without them the headings fall back to a system font and everything else still works. Because the fonts
aren't in git, deploy from a machine that has them (`wrangler deploy` uploads whatever is in `public/`); a
Cloudflare build connected to the GitHub repo would publish the site without Cartridge.

Body text is Inter and code is JetBrains Mono, both from Google Fonts.

## Animations

- The hero launcher types for itself (`Autoplay.loop` in `launcher.js`): a search, a calculation, the action
panel, opening an app (which then shows up under Suggestions) and Switch Theme. It pauses while it is off
screen, the tab is hidden or the overlay is open.
- Sections fade in as they scroll into view (`.reveal`), a dashed connector draws itself between sections
(after typecraft.dev's landing page), counters count up, calculator rows and install commands type
themselves, and keycaps press now and then.
- Style: Cartridge is always set in capitals (`.display`, `.label`). No pre-header labels above headings, no
emoji tiles, no glows or gradient washes; the hero's only texture is typecraft.dev's dot grid.
- With `prefers-reduced-motion`, everything is shown at once and the hero launcher sits still at its root list.

## Preview

```sh
node site/build.mjs
cd site/public && python3 -m http.server 8765 # then open http://127.0.0.1:8765
```

## Deploy to Cloudflare

The site is the Cloudflare Pages project `omacast`, served at <https://omacast.typecraft.dev> (and
`omacast.pages.dev`). `wrangler.jsonc` points it at `public/`.

```sh
cd site
npx wrangler login # once
node build.mjs # every time: public/demo/core.js is not in git
npx wrangler pages deploy --branch main # main is the production branch; any other name makes a preview
```

Deploy from a machine that has the Cartridge fonts in `public/fonts/`, since they are not in git either.

It is Pages and not a Worker because `typecraft.dev`'s DNS is at Squarespace: a Worker's custom domain needs
the zone on Cloudflare, while Pages takes a subdomain from any DNS host. The domain is set under the project's
Custom domains in the Cloudflare dashboard, and Squarespace has a `CNAME` from `omacast` to `omacast.pages.dev`.
The project was created with `wrangler pages project create omacast --production-branch main --force`; without
`--force`, wrangler 4.162 makes a Worker.

## Icon

`public/icon.svg` is the source: Omarchy's square maze in typecraft's stripe colours, reading as an O, a C and
a cursor. It is drawn on a 30-unit grid, so it is sharpest at multiples of 30px (the page also inlines the same
drawing so its cursor can blink). Regenerate the PNGs after editing it; the touch icon gets a full square
background because iOS fills transparent corners with black:

```sh
cd site/public
rsvg-convert -w 30 icon.svg | magick - -background none -gravity center -extent 32x32 favicon-32.png
rsvg-convert -w 510 icon.svg | magick - -background none -gravity center -extent 512x512 icon-512.png
sed 's|<path d="M1 0[^"]*"|<rect width="30" height="30"|' icon.svg | rsvg-convert -w 180 -o apple-touch-icon.png
```
31 changes: 31 additions & 0 deletions site/build.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env node
// Bundles omacast's own core modules for the in-browser launcher on the site.
// node site/build.mjs [outDir] (default: site/public/demo)
// Writes core.js (window.OmacastCore.<Module>, the unchanged core/*.js sources) and a copy of
// data/emoji.json. Both are gitignored: run this before previewing or deploying.
import fs from "node:fs"
import path from "node:path"
import { fileURLToPath } from "node:url"

const here = path.dirname(fileURLToPath(import.meta.url))
const root = path.join(here, "..")
const out = path.resolve(process.argv[2] || path.join(here, "public/demo"))

// Only what the browser launcher uses. Each module is self-contained (CLAUDE.md), so order is free.
export const MODULES = ["Ranker", "Frecency", "OmarchyMenu", "RootSearch", "Calculator", "Emoji", "Themes", "ClipboardHistory", "Schema"]

export function bundle() {
let js = "// Generated by site/build.mjs from core/*.js. Do not edit; edit the core modules and rebuild.\nwindow.OmacastCore = {};\n"
for (const name of MODULES) {
const source = fs.readFileSync(path.join(root, "core", name + ".js"), "utf8")
js += `window.OmacastCore.${name} = (function () {\nvar module = { exports: {} };\n${source}\nreturn module.exports;\n})();\n`
}
return js
}

if (process.argv[1] === fileURLToPath(import.meta.url)) {
fs.mkdirSync(out, { recursive: true })
fs.writeFileSync(path.join(out, "core.js"), bundle())
fs.copyFileSync(path.join(root, "data/emoji.json"), path.join(out, "emoji.json"))
console.log("wrote " + path.relative(process.cwd(), out) + "/core.js and emoji.json")
}
27 changes: 27 additions & 0 deletions site/public/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Not found · omacast</title>
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<style>
:root { --base: #1e1e2e; --text: #cdd6f4; --sub: #a6adc8; --red: #e74553; color-scheme: dark; }
@media (prefers-color-scheme: light) { :root { --base: #eff1f5; --text: #4c4f69; --sub: #6c6f85; color-scheme: light; } }
body { margin: 0; min-height: 100vh; display: grid; place-items: center; text-align: center;
background: var(--base); color: var(--text); font: 16px/1.6 system-ui, sans-serif; padding: 16px; }
img { width: 90px; height: 90px; }
h1 { font-size: 2rem; margin: 20px 0 8px; }
p { color: var(--sub); margin: 0 0 24px; }
a { display: inline-block; padding: 10px 20px; border-radius: 999px; background: var(--red); color: #fff; text-decoration: none; font-weight: 600; }
</style>
</head>
<body>
<main>
<img src="/icon.svg" alt="">
<h1>Nothing launched here.</h1>
<p>That page doesn't exist.</p>
<a href="/">Back to omacast</a>
</main>
</body>
</html>
17 changes: 17 additions & 0 deletions site/public/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin
X-Frame-Options: DENY
Permissions-Policy: camera=(), microphone=(), geolocation=()

/img/*
Cache-Control: public, max-age=604800

/*.png
Cache-Control: public, max-age=604800

/icon.svg
Cache-Control: public, max-age=604800

/fonts/*
Cache-Control: public, max-age=31536000, immutable
Loading
Loading