> ## Documentation Index
> Fetch the complete documentation index at: https://docs.otter-shell.org/llms.txt
> Use this file to discover all available pages before exploring further.

# otter-desktop

> Desktop integration: icons, .desktop files, D-Bus, PipeWire, PAM, and sysinfo.

`otter-desktop` is how Otter Shell talks to the host: icon themes, `.desktop` entries, session services, audio, brightness, system metrics.

The bar, settings, greeter, lock, and monitor each import a slice of this library.

## Quick example

```zig theme={null}
const desktop = @import("otter_desktop");

var cache = desktop.IconCache.init(allocator);
defer cache.deinit();
const icon = cache.lookup("firefox");
```

## Documentation map

<CardGroup cols={2}>
  <Card title="Applications" icon="grid" href="/developers/libraries/otter-desktop/applications">
    Icon lookup, `.desktop` parsing, app list, launcher.
  </Card>

  <Card title="D-Bus clients" icon="bus" href="/developers/libraries/otter-desktop/dbus-clients">
    UPower, MPRIS, NetworkManager, notifications, tray, polkit.
  </Card>

  <Card title="System services" icon="gauge" href="/developers/libraries/otter-desktop/system-services">
    Brightness, SysInfo, PipeWire, SCX, Falcond, Monitor collector.
  </Card>

  <Card title="Greeter and auth" icon="lock" href="/developers/libraries/otter-desktop/greeter-and-auth">
    PAM, session catalog, logind, power actions.
  </Card>
</CardGroup>

## Build flags

| Flag                      | Effect                            |
| ------------------------- | --------------------------------- |
| `-Denable_dbus=false`     | Drop D-Bus clients and dependents |
| `-Denable_pipewire=false` | Drop PipeWire audio               |
| `-Denable_pam=false`      | Drop PAM auth                     |

Check `desktop.has_dbus`, `has_pipewire`, `has_pam` at comptime when optional.

<Note>
  `sd_bus_process()` handles one message per call. Loop until the queue is drained.
</Note>

## Dependencies

`otter-utils`. Vendored basu (sd-bus) and PipeWire when enabled.
