# LibTmux.Session.attached

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Elixir
- **Kind:** property
- **Source:** https://github.com/libtmux/libtmux-elixir/blob/5bacf40788b43a5af27bb3656e727a921ba2db40/lib/libtmux/entities.ex
- **Page:** https://libtmux.org/en/elixir/pr-173/reference/libtmux-session-attached/

```elixir
LibTmux.Session.attached: LibTmux.Schema.observed(boolean()) = :unloaded
```

## Guides

Pages that discuss `attached`.

### Concepts

- [Captured tmux state](/en/elixir/pr-173/concepts/observations/)

### Topics

- [Observation and filter schema](/en/elixir/pr-173/topics/schema/)

## In other ports

Whether a client was attached when captured

| Port | API | Differs from Elixir |
| --- | --- | --- |
| Elixir | `LibTmux.Session.attached` | This page |
| Python | [`libtmux.Session.session_attached`](/en/py/latest/reference/libtmux-session-session_attached/) (attribute) | None recorded in the model |
| Ruby | [`LibTmux::SessionSnapshot#attached`](/en/ruby/latest/reference/libtmux-sessionsnapshot-attached/) (method). Behavior: Captured records. | None recorded in the model |
| Lua | [`libtmux.SnapshotSession.attached`](/en/lua/latest/reference/libtmux-snapshotsession-attached/) (attribute) | None recorded in the model |
| Rust | [`session.Session.is_attached`](/en/rs/latest/reference/session-session-is_attached/) (method). Report whether any client is attached. | None recorded in the model |
| Go | [`tmux.Session.Attached`](/en/go/latest/reference/tmux-session-attached/) (method). Attached returns tmux #{session_attached} as int from this Session's materialized session-scoped fields. | None recorded in the model |
| Java | [`io.github.libtmux.Session.attached`](/en/java/latest/reference/io-github-libtmux-session-session-attached/) (method). Whether a client was attached when this was captured. | None recorded in the model |
| C# | [`LibTmux.Session.Attached`](/en/csharp/latest/reference/libtmux-session-attached/) (property). Gets whether a client was attached when this session was read. | None recorded in the model |
| C++ | [`libtmux::Session::attached`](/en/cxx/latest/reference/libtmux-session-attached-a5b8/) (method). session_attached counts clients rather than rendering a flag, so any count other than zero means attached. | readonly |
| Swift | [`Session.isAttached`](/en/swift/latest/reference/session-isattached/) (property). Whether any client is looking at this session. Opening a connection attaches one, so this reads differently from inside Server/connected(attachingTo:_:) — see <doc:Modes>. | None recorded in the model |
| OCaml | [`Libtmux.Session.attached`](/en/ocaml/latest/reference/libtmux-session-attached/) (function) | None recorded in the model |
| Perl | [`LibTmux::Session::attached`](/en/perl/latest/reference/libtmux-session-attached/) (method). integer. Local captured data; no I/O. | Returns the captured attached-client count; zero means no attached client. |

No Haskell equivalent. No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.

No TypeScript equivalent. no accessor; the field is read from `Session.format`, tmux's own row

No Raku equivalent. No direct Raku mapping is recorded for this operation; consult the native API reference.

No equivalent is recorded in PowerShell, Julia, Erlang, Common Lisp, Clojure, Kotlin, Scala or F#.
