Elyra
Elyra The coding agent eTerm The terminal that knows where each command ends Huskarl AI colleagues on your own Mac Starf An activity monitor for Apple silicon that never invents a number etrans An SSH and SFTP client for macOS Elyra VM Virtual machines for macOS, Linux and Windows on your Mac Litr A small, native web browser for macOS Notr A notebook for macOS e The native code editor Elyra Grove Native local development environment Askr The real server for Laravel & PHP Elyra Framework Rust + Svelte 5 framework for desktop apps Elyra Conductor Local project conductor Refr Local-first PDF workspace for macOS Elyra Workspace A desktop workspace for coding agents eDock A container runtime for the Mac Elyra SQL Server MySQL-compatible SQL server in Rust Elyra Félagi Agents as teammates on one board Elyra SQL Client Native desktop SQL workbench Elyra SQL Anywhere Replication-ready SQL engine Elyra Sjá SEO & GEO workspace for macOS Elyra DataGrid Server-driven data grid for Laravel
Reference
Ratatosk CLI
Roadmap
RFC 0001: make:resource
RFC 0002: live queries
RFC 0003: MCP server
RFC 0004: MCP resource templates
RFC 0005: a Laravel backend
RFC 0006: Laravel broadcasting
RFC 0007: offline and sync
RFC 0008: Laravel notifications
RFC 0009: Files
RFC 0010: Laravel abilities
RFC 0011: an assistant in the app
RFC 0012: @elyra/ui
RFC 0013: the assistant sees the window
RFC 0014: Elyra Inspector
RFC 0015: presence
RFC 0016: capabilities per window
RFC 0017: record invalidation
RFC 0018: the assistant's answer, streamed
RFC 0019: a window from the tray
RFC 0020: an app that stays in the tray
RFC 0021: a server chosen at sign-in
RFC 0022: signed in to more than one server
RFC 0023: private channels a window listens to
RFC 0024: updates from the backend
RFC 0025: commands and configuration
RFC 0026: the running app, for coding agents
RFC 0027: the assistant's code mode
RFC 0028: the tray's icon, and the app's
RFC 0029: installers
RFC 0030: the app's identity on Windows
RFC 0031: a token per workspace
RFC 0032: the microphone
RFC 0033: diagnostics the user can send
RFC 0034: one screen in several states at once
RFC 0035: point at it, and hand it to the agent
RFC 0036: rata check, the app checked as a whole
RFC 0037: Theme Studio
RFC 0038: edit it in its own app
RFC 0039: a write shown at once in every window
RFC 0040: the two halves agree
RFC 0041: Quick Look
RFC 0042: follow a colleague
RFC 0043: every write seen
RFC 0044: composite keys
RFC 0045: bigint all the way
RFC 0046: pivot columns
RFC 0047: relations on any key
RFC 0048: more providers
RFC 0049: OpenAI web search
RFC 0050: integer-keyed arguments
RFC 0051: citations
RFC 0052: open documents
RFC 0053: exit hooks
RFC 0054: the gui feature
RFC 0055: menus that change
RFC 0056: the framework's own words
RFC 0057: rata upgrade
RFC 0058: @elyra/charts
RFC 0059: all of WireCharts
RFC 0060: exporting a chart
RFC 0061: zoom
RFC 0062: printing
RFC 0063: linked charts
RFC 0064: report pages
RFC 0065: marks
RFC 0066: taking a table out
RFC 0067: totals
RFC 0068: columns the user picks
RFC 0069: filters
RFC 0070: saved views
RFC 0071: lists over Laravel
RFC 0072: targets
RFC 0073: every row out
RFC 0074: grouped rows
RFC 0075: pinned columns
RFC 0076: views on the server
RFC 0077: every match selected
RFC 0078: editing in the table
RFC 0079: many cells at once
RFC 0080: a value for the selected rows
RFC 0081: a new row in the table
RFC 0082: a related record in a cell
RFC 0083: a filter by a related record
RFC 0084: one write for many rows
RFC 0085: the keys shown
RFC 0086: many rows in Laravel
RFC 0087: many rows deleted
RFC 0088: the trash
Release notes
Changelog
Elyra

System tray

Feature-gated behind tray (tao dropped its built-in tray in 0.35, so this wraps the tray-icon crate).

elyra = { …, features = ["tray"] }

Configuring the tray

use elyra::TrayConfig;

App::new()
    .tray(
        TrayConfig::new()
            .tooltip("My App")
            .title("My App")            // short text next to the icon (macOS/Linux)
            .item("open", "Open")       // custom item -> emits "open" on the "tray" channel
            .separator()
            .quit("Quit"),              // closes the app
    )
    .run();

Builder: new(), tooltip, title, item(id, label), separator(), quit(label), popover(window), and icon, template, icon_named, no_unread. Without an icon, the tray takes the app's (App::icon), else a blue square, so no image asset is required.

The icon

Give the tray its own icon, a PNG, read when the app is built (RFC 0028):

use elyra::{Icon, TrayConfig};

TrayConfig::new()
    .icon(Icon::png(include_bytes!("../icons/tray.png")))
    .template()
    .icon_named("syncing", Icon::png(include_bytes!("../icons/syncing.png")))
  • Size: square, 32 px or more; 44 px is sharp in a Retina menu bar (it's drawn at 22 pt).
  • template(): macOS draws the icon in the menu bar's colour, black on a light bar and white on a dark one, like the system's own. Draw it black on transparency; only its alpha counts. On Windows and Linux the icon is drawn as it is, so pick one that reads on both a light and a dark taskbar, or skip template() and use colour everywhere.
  • icon_named(name, icon): other icons, to show while the app runs (below). Drawn as templates too when the tray's icon is.

A PNG that can't be read, or two icons with one name, is a configuration problem: App::run stops before anything starts and lists it with the rest.

Changing it while the app runs

ctx.get::<Tray>() changes the tray from a command, a provider's task or anywhere the container reaches (it's bound when the app has a tray):

use elyra::Tray;

#[command]
async fn start_sync(ctx: Ctx) {
    let tray = ctx.get::<Tray>();
    tray.set_icon("syncing");
    tray.set_tooltip(Some("Syncing…"));
    // … the work …
    tray.reset_icon();
    tray.set_tooltip(None);              // back to the config's, else the app's name
}
set_title(Option<&str>) the text beside the icon (macOS, Linux; Windows' tray has none)
set_tooltip(Option<&str>) the tooltip; None puts back the config's, else the app's name
set_icon(name) an icon from icon_named; a name it wasn't given is refused (false) and the icon stays
reset_icon() the tray's own icon again

A timer updates its title from a task, once a second:

let tray = ctx.get::<Tray>();
tokio::spawn(async move {
    let start = std::time::Instant::now();
    loop {
        let s = start.elapsed().as_secs();
        tray.set_title(Some(&format!("{:02}:{:02}", s / 60, s % 60)));
        tokio::time::sleep(std::time::Duration::from_secs(1)).await;
    }
});

Use ctx.try_get::<Tray>() in code that also runs without a tray (a test with TestApp, an app built without the tray feature).

The unread count

Windows::set_badge(n) (Laravel's notifications set it) shows on the tray as well as the Dock, the launcher or the taskbar, so an app that stays in the tray with its windows closed still shows it:

  • macOS, Linux: after the title, 01:24 · 3, or 3 alone (9+ past nine).
  • Windows: a red dot on the icon's lower-right corner.
  • The tooltip, everywhere: My App — 3 unread.

TrayConfig::no_unread() leaves it off the tray: for a timer whose title is the time, say.

Handling clicks (frontend)

A custom item click emits its id on the "tray" event channel; a Quit item closes the app.

<script>
  import { channel } from "@elyra/runtime";
  const tray = channel("tray");   // e.g. "open"
  $effect(() => { if ($tray === "open") { /* focus / navigate */ } });
</script>

A window that opens from the icon

A popover (RFC 0019): a small window under the tray icon for what's asked at a glance (today's hours, a quick note, what's due). A left click on the icon shows it; a click elsewhere, Esc, or another click on the icon hides it. A right click shows the menu, as before.

use elyra::{TrayConfig, WindowConfig};

App::new()
    .tray(
        TrayConfig::new()
            .tooltip("Timer")
            .popover(
                WindowConfig::new("quick")
                    .title("Timer")                  // its item in Linux's menu
                    .path("#/quick")                 // a route of the app's router
                    .size(320.0, 420.0)
                    .only_abilities(["time.*"]),     // only what it needs
            )
            .item("open", "Open Timer")
            .quit("Quit"),
    )
    .run();
  • Placed by the icon: below it in a top bar (macOS's menu bar), above it with the taskbar at the bottom, beside it with the taskbar at a side, and kept on the monitor.
  • A window like any other: the app's own page at path, scoped as any window. It's over every other app while it's shown, so give it only what it needs.
  • Made at start, hidden, so the first click shows it at once, loaded. It hides rather than closes; its page stays, and its live queries keep running, so it's current when shown. It doesn't keep the app running: the app ends with its last other window.
  • Undecorated, on top, out of the taskbar. It draws its own frame.
  • On macOS showing it activates the app without bringing its other windows forward.
  • On Linux the icon sends no clicks (AppIndicator), so the tray's menu gets an item at the top, the window's title, that shows it: by the cursor on X11, at the top of the screen on Wayland.

From code, for a global shortcut say:

ctx.get::<Windows>().toggle_popover();   // or show_popover(), hide_popover()

Without an icon click it opens where it last opened, or by the cursor.

In the page, appWindow.onState says when it's shown, to refresh or focus an input:

import { appWindow } from "@elyra/runtime";

appWindow.onState((s) => {
  if (s.label === "quick" && s.visible && s.focused) input.focus();
});

Esc hides it unless something on the page handled the key first (a dialog, an open list): those call preventDefault() or stop it.

It doesn't open over a full-screen app on macOS (it opens in the current space), and there's one popover, for the one tray icon.

An app that stays in the tray

For an app whose home is the icon (a timer, a sync client, an inbox watched all day), stay_in_tray() (RFC 0020):

App::new()
    .title("Timer")
    .stay_in_tray()
    .tray(
        TrayConfig::new()
            .tooltip("Timer")
            .popover(WindowConfig::new("quick").path("#/quick").size(320.0, 420.0))
            .item("open", "Open Timer")
            .quit("Quit Timer"),
    )
    .run();
<!-- the main window's page: hidden, but loaded -->
<script>
  import { appWindow, channel } from "@elyra/runtime";
  const tray = channel("tray");
  $effect(() => { if ($tray === "open") appWindow.show(); });
</script>
  • It starts with the icon only. Its windows are made, hidden, so showing one is at once.
  • Closing the main window hides it, its page and live queries kept; appWindow.close() on it does the same. Other windows close as before.
  • It runs until a quit: the tray's Quit item, ⌘Q, or quit() from the runtime (Windows::quit() in Rust), under the window capability.
  • Showing a window brings it in front of the app in front.
  • On macOS it's out of the Dock (and ⌘Tab, and the menu bar) while no window is shown, and in it while one is. The popover doesn't count. rata bundle asks the app, and writes LSUIElement into the .app so its Dock icon doesn't show for a moment at launch.
  • It's a single instance: opening the app again (a second launch, or Finder, Spotlight or the Dock on macOS) shows the main window.
  • It needs a tray: without .tray(..) it doesn't start. If the icon can't be made, the app falls back to an ordinary one: the main window shows, and the app ends when it closes.

GNOME shows no tray icons without an AppIndicator extension, and the app can't tell: there, opening the app again from the launcher is the way back to its window. Say so in your app's docs, or offer the window on first run.

Notes

  • The tray is created after the event loop initializes (required on macOS) and held for the program's lifetime.
  • Menu clicks are routed through the event loop and re-emitted on the bus, so your frontend reacts the same way it does to any other event.

Related