Expand description
The services a Crabshell bar reads: the clock, Sway’s and Hyprland’s workspaces, audio, the tray, power, notifications, the installed applications, PAM, greetd and a polkit agent.
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. - Audio
Node - A sink or a source: where sound goes out, such as speakers, or comes in, such as a microphone.
- Audio
Stream - An app playing sound: one of the server’s sink inputs.
- Auth
Request - A request from polkit: a program asked to do
action_id, and polkit wants a user to prove they may. - Bluetooth
- Bluetooth from BlueZ, from
cx.bluetooth(). Cloning it is cheap. - Bluetooth
Adapter - A Bluetooth radio BlueZ knows.
- Bluetooth
Device - A device BlueZ knows: one paired before, or one discovery found.
- Desktop
Action - Something more an application can do, as a launcher’s menu offers it.
- Desktop
Entries - The installed applications, from
cx.desktop_entries(). Cloning it is cheap. - Desktop
Entry - An installed application, from its desktop entry.
- File
Error - Why a file can’t be read, from
FileView::error, as Quickshell’sFileViewError. - File
View - A text file, from
cx.file_view(path). Its text is read at once and again when it changes on disk. A clone is cheap and shares it. - Greet
Message - An informative or error message greetd sent while a session was made.
- Greetd
- greetd, from
cx.greetd(). A clone is cheap and shares it. - Hyprland
- The Hyprland service, from
cx.hyprland(). A clone is cheap and shares the one connection. - Hyprland
Event - One line from Hyprland’s event socket, such as
workspacev2>>2,2, as Quickshell’sHyprlandEvent. - Hyprland
Monitor - One of Hyprland’s monitors, as
j/monitorsdescribes it. - Hyprland
Toplevel - One of Hyprland’s windows, as
j/clientsdescribes it. - Hyprland
Workspace - One of Hyprland’s workspaces, as
j/workspacesdescribes it. - Menu
Entry - One entry of a
Menu. - Mpris
- The media players, from
cx.mpris(). A clone is cheap and shares the one connection. - Network
- Networking from NetworkManager, from
cx.network(). Cloning it is cheap. - Network
Device - A network device NetworkManager manages, other than loopback.
- Notification
- One notification an app sent.
- Notifications
- The notifications, from
cx.notifications(). A clone is cheap and shares the one server. - Pam
- Authentication through a PAM service, from
cx.pam(service), as a lock screen does. A clone is cheap and shares it. - Player
- A media player and its track, as MPRIS describes them. Text is cut to 4 KiB.
- Polkit
Agent - The shell’s polkit agent, from
cx.polkit_agent(). A clone is cheap and shares the one agent. - Power
Device - A battery or power supply UPower knows.
- Power
Profiles - The power profile, from
cx.power_profiles(). Cloning it is cheap. - Process
- A program the shell runs, from
cx.process(command). A clone is cheap and shares it. - Saved
Connection - A connection NetworkManager saved, as for a Wi-Fi network joined before.
- Sink
- The default sink: where sound goes unless an app picks another.
- Socket
- A connection to a Unix socket, from
cx.socket(path). It connects at once, passes each line it reads toon_line, and writes whatwriteis given. A clone is cheap and shares the connection. - Socket
Server - A server on a Unix socket, from
cx.socket_server(path), as Quickshell’sSocketServer. It listens from the start and hands each client that connects toon_connectionas aSocket. A clone is cheap and shares the server. - Sway
- The Sway service, from
cx.sway(). A clone is cheap and shares the one connection. - Sway
Event - One event from Sway, as Quickshell’s
I3Event, forSway::on_event. - Sway
Output - One of Sway’s outputs, a monitor, as
GET_OUTPUTSdescribes it and as Quickshell’sI3Monitordoes. - 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. - UPower
- UPower’s batteries and power supplies, from
cx.upower(). Cloning it is cheap. - Wifi
Network - A Wi-Fi network a device sees.
- Workspace
- One of Sway’s workspaces, as
GET_WORKSPACESdescribes it.
Enums§
- Audio
Channel - Where a channel plays, as PulseAudio’s channel map names it, with
Quickshell’s names for
PwAudioChannel. - Auth
State - Where a request’s conversation is.
- Battery
State - How a battery is doing, from UPower’s
State. - Bluetooth
Adapter State - Whether an adapter is on, from BlueZ’s
PowerState. - Bluetooth
Device State - Whether a device is connected, from BlueZ’s
Connectedand the calls made throughBluetooth. - Close
Reason - Why a notification closed, from
Notifications::on_closed. Its app hears the same inNotificationClosed. - Connection
Fail Reason - Why a device’s last try to connect failed, from the reason
NetworkManager gave with its
Failedstate. - Connectivity
- How far the host reaches, from NetworkManager’s
Connectivity. - Device
Kind - What a power device is, from UPower’s
Type. - File
Error Kind - The kinds of
FileError. - Greet
State - Where a session being made stands.
- Loop
Status - What a player does at the end, from MPRIS’s
LoopStatus. - Menu
Toggle - What a toggling menu entry shows.
- Network
Kind - What a network device is, from NetworkManager’s
DeviceType. - Network
State - How a network device is doing, from NetworkManager’s
State. - PamError
- Where an attempt that ended in
PamResult::Errorwent wrong. - PamMessage
- A line PAM sent during an attempt, from
Pam::messages, cut to 4 KiB. - PamResult
- How an attempt ended.
- PamState
- Where an authentication is, from
Pam::state. - Peak
Target - What a peak meter listens to, for
Audio::peaks. - Performance
Degradation - Why the performance profile runs slower than it could, from the
daemon’s
PerformanceDegraded. - Playback
Status - Whether a player plays, from MPRIS’s
PlaybackStatus. - Power
Profile - A power profile power-profiles-daemon can set.
- Precision
- How often a clock changes.
- Sway
Event Kind - A kind of event Sway sends, for
Sway::on_event. sway-ipc(7) says what each one’s data holds. - Timeout
- How long a notification’s popup shows, as its app asks.
- Tray
Category - What kind of app a tray item is, from its
Category, so a bar can group or order its items. - Tray
Status - Whether a tray item wants to be seen.
- Urgency
- How urgent a notification is, from its
urgencyhint. - Wifi
Mode - What a Wi-Fi device does, from NetworkManager’s
NM80211Mode. - Wifi
Security - How a Wi-Fi network is secured, from its access point’s flags.
Traits§
- Into
Command - What
cx.processandcx.exec_detachedrun: aCommand, or the program and its arguments as a list, such as["sleep", "30"], as Quickshell’scommandis. - 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.