Expand description
The services a Crabshell bar reads: the clock, Sway’s workspaces, audio and the tray.
The shell calls provide once, with its root context and event loop.
After that, any context hands out services through ServicesExt,
such as cx.clock(Precision::Minute). Each service starts the first
time a config asks for it and is shared by every caller, so two outputs
never mean two connections. Its signals belong to the root context’s
owner: bars on every output share them, and they go when the shell does.
Asked for on a context the shell didn’t set up, as in a ui test, a service logs once and hands out a value that never changes.
Structs§
- Audio
- The audio service, from
cx.audio(). Cloning it is cheap. - Menu
Entry - One entry of a
Menu. - Sink
- The default sink: where sound goes unless an app picks another.
- Sway
- The Sway service, from
cx.sway(). A clone is cheap and shares the one connection. - Tray
- The system tray: one icon button per tray item, in the order the items registered. A left click activates an item, or opens its menu when the item is only a menu. A right click opens the menu, a middle click is the item’s secondary activation, and scrolling over an icon scrolls it.
- Tray
Host - The tray, from
cx.tray(). A clone is cheap and shares the one connection. - Tray
Item - One app’s tray icon, as its StatusNotifierItem describes it.
- Tray
Menu - A tray item’s open menu, from
TrayHost::menu. - Workspace
- One of Sway’s workspaces, as
GET_WORKSPACESdescribes it.
Enums§
- Menu
Toggle - What a toggling menu entry shows.
- Precision
- How often a clock changes.
- Tray
Status - Whether a tray item wants to be seen.
Traits§
- Services
Ext - The services a context hands out.
Functions§
- provide
- Makes the services reachable from
cxand every context made from it. The shell calls this once, with its root context and its event loop.