# libtmux::Session

- **Module:** libtmux
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/85e8bd603a322dc32bb8b9aeb1a72bcf36945f1d/include/libtmux/entities.hpp#L273
- **Page:** https://libtmux.org/reference/cxx/libtmux-session/

## Members

- `kNoun` (attribute)
- `kFields` (attribute)
- `Session` (method)
- `id` (method)
- `name` (method)
- `attached` (method) — `session_attached` counts clients rather than rendering a flag, so any count other than zero means attached.
- `client_count` (method)
- `window_count` (method)
- `path` (method) — The directory a new window starts in, not the shell's current directory.
- `created` (method)
- `group` (method) — Empty unless the session belongs to a group sharing its windows.
- `grouped` (method)
- `windows` (method)
- `panes` (method)
- `active_window` (method)
- `active_pane` (method)
- `select_next_window` (method) — Move the selection, and answer with the window it landed on.
- `select_previous_window` (method)
- `select_last_window` (method)
- `new_window` (method) — Created detached: a library call that stole the terminal would be a surprise, and attaching is a separate decision.
- `rename` (method)
- `kill` (method)
- `refresh` (method)
- `options` (method) — Session options.
- `option` (method)
- `set_option` (method)
- `unset_option` (method) — Remove the value set here, so the wider scope shows through again.
- `attach_command` (method) — A command line that attaches a terminal to this session.
- `detach_clients` (method) — Send every client here away, leaving the session running.
- `expand` (method) — Ask tmux to expand a format against this session.
- `show_message` (method) — Put a message on the status line of every client attached here, and send it to a control client as `message`.
- `hooks` (method)
- `set_hook` (method)
