Skip to content
Open
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 SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ bin/omacast bash CLI → omarchy-shell omacast <fn> (socket), plu
How the rest of this spec maps onto it:
- **§3 IPC.** There is no wire protocol between UI and backend; both live in one QML engine. The *method surface* stays: services register `namespace.method` handlers in one registry (`core/Rpc.js`), using Raycast's names (§3.4). `call()` returns a Promise and `callSync()` returns `{ok,data|error}`. Notifications (`window.visibilityChanged`, `settings.generalSettingsChanged`) go through `subscribe()`/`emit()`. External callers use `ShellIpc` (`omacast call <method> <json>`). The NDJSON host↔backend contract and supervisor (§3.3) are **deferred to Phase 5**: only Raycast extensions need Node, and they will run as a supervised child `Process` that speaks §3.3/§9.2.
- **§4 platform.** Omarchy = Hyprland, so Phase 0 targets Hyprland only. Its config is **Lua** (`hyprland.lua`, `o.bind(...)`, `hl.dsp.global(...)`), not `.conf`.
- **§5.1 window.** It uses Omarchy's `OverlayWindow`: a fullscreen transparent layer surface with exclusive keyboard focus, and the 750×475 card drawn inside it. Clicking outside the card counts as focus loss. The surface is mapped fresh on every open, which is how Omarchy avoids stale surfaces when monitors change.
- **§5.1 window.** It uses Omarchy's `OverlayWindow`: a fullscreen transparent layer surface with exclusive keyboard focus, and the 750×475 card drawn inside it. Clicking outside the card counts as focus loss. The surface stays mapped between opens; it is remapped when it moves to another monitor or its monitor goes away, and a launcher open on a lost monitor closes [D].
- **§6 data.** Persisted state is one versioned JSON document per store under `$XDG_DATA_HOME/omacast/db/` (`core/Migrate.js`: numbered migrations, history, atomic writes, never overwrite an unreadable or newer file). There is **no encryption at rest** and no libsecret key: Qt's FileView has no cipher, and full-disk encryption is the Omarchy default. If a store outgrows JSON (clipboard history, file index), revisit with Qt's built-in `QtQuick.LocalStorage` (SQLite) before adding a native dependency.
- **§10 frontend.** QML instead of React, with themes from Omarchy's tokens. The 8 Raycast themes (§10.4) become optional palettes over the same tokens.
- **Logging** goes to the shell's log (`qs log -n -p "$OMARCHY_PATH/shell"`, lines prefixed `[omacast]`), with the level from `config.json`. There are no separate log files.
Expand Down
15 changes: 14 additions & 1 deletion ui/LauncherWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ PanelWindow {
// The surface stays mapped once opened: hidden, it is fully transparent,
// takes no input and no keyboard. Mapping a new surface costs ~130 ms (the
// output's size and scale arrive a few frames late); flipping these is one
// commit. It is remapped only to move to another monitor.
// commit. It is remapped to move to another monitor, or after its monitor
// goes away.
property bool mapped: false
visible: window.mapped
screen: window.pinnedScreen
Expand Down Expand Up @@ -255,6 +256,18 @@ PanelWindow {
else { popTimer.interval = seconds * 1000; popTimer.restart() }
}

// A lost monitor takes the surface but not `shown`, so the "omacast" submap
// would keep every global bind dead. Unmap so the next open maps a fresh
// surface, and close rather than follow focus to another monitor [D].
Connections {
target: Quickshell
function onScreensChanged() {
if (Quickshell.screens.indexOf(window.pinnedScreen) >= 0) return
window.mapped = false
if (window.shown) window.dismissRequested()
}
}

// Where the card is while open, for Superwhisper: its recording glow (or
// pill) then draws on the launcher, as on any focused window, instead of on
// the window under it. Idle without Superwhisper or PyGObject.
Expand Down