> ## 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-wayland

> Wayland client: connection, layer shell, input, SHM pools, capture, and damage.

`otter-wayland` is the shared Wayland client layer: compositor connection, layer and XDG surfaces, pointer and keyboard input, clipboard, SHM buffers, screen capture.

Poll `Connection.dispatch()` in your main loop with config watchers and timer FDs.

## Quick example

```zig theme={null}
const wl = @import("otter_wayland");

var conn: wl.Connection = .{};
try conn.init();
defer conn.deinit();

while (conn.running) {
    try conn.dispatch();
}
```

## Documentation map

<CardGroup cols={2}>
  <Card title="Connection and surfaces" icon="plug" href="/developers/libraries/otter-wayland/connection-and-surfaces">
    `Connection`, layer shell, `XdgToplevel`, `LayerPopup`, workspaces.
  </Card>

  <Card title="Input" icon="keyboard" href="/developers/libraries/otter-wayland/input">
    Pointer, keyboard, IME, clipboard, virtual keyboard, virtual pointer.
  </Card>

  <Card title="SHM and damage" icon="memory" href="/developers/libraries/otter-wayland/shm-and-damage">
    `DoubleShmPool`, `SingleShmPool`, `DamageTracker`, `Renderer`.
  </Card>

  <Card title="Capture and overlays" icon="camera" href="/developers/libraries/otter-wayland/capture-and-overlays">
    Screen capture, selection overlay, dim overlay.
  </Card>
</CardGroup>

## Protocols

`wl_compositor`, `wl_seat`, `wl_shm`, `wl_output`, `zwlr_layer_shell_v1`, `ext_workspace_manager_v1`, `zwlr_foreign_toplevel_manager_v1`, `zwp_text_input_v3`, `ext_session_lock_v1`, `wl_data_device`, `wp_viewporter`, `wp_cursor_shape_manager_v1`.

Workspace providers also exist for Hyprland IPC, Niri, dwl, and Otter tag layouts.

## Dependencies

`otter-geo`, `otter-render`, `otter-utils`, wayland-client, xkbcommon.
