# io.github.libtmux.scaladsl.Session

- **Module:** io.github.libtmux.scaladsl
- **Package:** io.github.libtmux:libtmux-scala_3
- **Language:** Scala
- **Kind:** typealias
- **Source:** https://github.com/libtmux/libtmux-java/blob/f56392b5d9bc7f1f9c1631842333fb90f3d82d40/libtmux-scala/src/main/scala/io/github/libtmux/scaladsl/Session.scala#L10
- **Page:** https://libtmux.org/en/scala/latest/reference/io-github-libtmux-scaladsl-session/

```
opaque type Session = JavaSession

object Session
```

A captured session, opaque over the Java handle; every operation beyond equality is an extension, generated from the operation catalog or handwritten where the catalog marks it `WAIT`, `STREAM` or `LIFECYCLE`.

## Members

### Parent objects

- `server` (method): The server this session lives on.

### Collections and queries

- `windows` (method): This session's windows.

### Common operations

- `newWindow` (method): Creates a window in this session and returns that exact window.

### Other members

- `activePane` (method): The active pane of the active window.
- `activeWindow` (method): The window tmux had active in this session.
- `asJava` (method): The underlying Java session. Opaque wrapping is free, so this never copies scope or state.
- `attached` (method): Whether a client was attached when this was captured.
- `detachClients` (method): Detaches every client attached to this session, leaving the session running.
- `environment` (method): This session's own environment, which a process started in it is given on top of the server's.
- `expand` (method): Expands a tmux format in this session's context, and answers with what it came to.
- `given_CanEqual_Session_Session` (constant)
- `hooks` (method): This session's own hooks.
- `id` (method): The session id, as text, so it can be compared and listed.
- `info` (method): The fields this capture stored.
- `kill` (method): Ends this session.
- `lastWindow` (method): Returns to the window that was active before this one.
- `name` (method): The session name.
- `nextWindow` (method): Moves to the next window in this session, wrapping at the end.
- `options` (method): This session's own options.
- `previousWindow` (method): Moves to the previous window in this session, wrapping at the start.
- `refresh` (method): Takes a new capture and returns this session as it is now.
- `rename` (method): Renames this session and returns its replacement capture.
- `selectWindow` (method): Makes a window of this session the active one.
- `setHistoryLimit` (method): Sets the scrollback retained by panes created in this session.
- `windowCount` (method): How many windows this session holds.
