Skip to main content

Module status

Module status 

Source
Expand description

The app’s presence outside its windows (docs/status-item.md): status items, progress on the Dock or taskbar icon, the macOS Dock icon itself, and whether the app keeps running when its last window closes.

Enums§

KeepRunning
Whether the app keeps running when its last window closes (docs/windows.md “Keeping the app running”), set with set_keep_running.

Functions§

begin_menu_tracking
Backend hook: freeze a status item’s installed model and handlers during native menu tracking. Updates are coalesced until end_menu_tracking. The token prevents a delayed close callback from ending a later session (including removal and recreation of the id).
end_menu_tracking
Backend hook: finish tracking after the native selection has dispatched, then install the most recent pending update. AppKit calls this on the next main-loop turn because menuDidClose: precedes the selected item’s action.
keep_running_policy
The policy as set (default KeepRunning::Automatic).
remove_status_item
Remove the status item id, if shown.
reset_status
Forget everything (tests; pairs with uninstall_tree).
set_app_progress
Show progress on the app’s Dock or taskbar icon (Cap::AppProgress, docs/status-item.md).
set_dock_visible
Show or hide the app’s Dock icon while it runs (Cap::DockVisibility, macOS). A menu-bar app hides it and lives in its status item; [app.macos] dock = false in Day.toml hides it from launch, before the first frame.
set_keep_running
Choose whether the app keeps running when its last window closes (docs/windows.md).
set_status_item
Show spec, or update the shown item with the same id (docs/status-item.md). Replacing an item drops the closures its previous menu and click held. While a backend is tracking the menu, keep the installed snapshot and coalesce updates until selection has finished.
status_items
The status items currently shown, in order.