# Examples

Source: https://libtmux.org/en/clojure/latest/examples/

> Run complete Clojure programs against private tmux servers.

The [quickstart](https://libtmux.org/en/clojure/latest/) creates a session, renames and splits its window, sends a
shell command, and prints the captured graph and output. Its setup installs
the documented source into an isolated Maven repository. Every view closes
its client and stops the server it created.

The API reference includes complete programs with imports, Tools.deps setup,
an owned-server launcher and expected output:

- [Capture output](https://libtmux.org/en/clojure/latest/reference/libtmux-core-capture/): send literal input,
  wait for an application output marker, and read the screen.
- [Build a layout](https://libtmux.org/en/clojure/latest/reference/libtmux-core-split-pane/): split panes, rename a
  window, move its placement and compare physical identity with link identity.
- [Capture concurrently](https://libtmux.org/en/clojure/latest/reference/libtmux-async-submit/): submit bounded
  work and cancel a wait while checking cleanup.
- [Observe UTF-8 output](https://libtmux.org/en/clojure/latest/reference/libtmux-control-subscribe/): consume a
  bounded stream and inspect its terminal state.
- [Use core.async](https://libtmux.org/en/clojure/latest/reference/libtmux-core-async-observe/): stop the adapter
  and continue using its borrowed control connection.

The stream examples require tmux 3.7 or newer. On an older supported tmux,
they print the capability refusal shown beside the expected output.
