Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Python API

Python documentation

libtmux.Client.attached_session

Python
  • Python
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
libtmux
Declared in
Client
Package
libtmux
Source
src/libtmux/client.py
attached_session ( self ) → Session | None
property [source]
property [source]
attached_session

Return the Session this client is currently attached to.

Re-reads the client from list-clients before resolving, so the returned Session reflects the client's *live* attachment rather than the snapshot captured when this Client was read. Returns None when tmux no longer reports this client_name through list-clients, when the client is not attached to any session, or when the snapshot session_id no longer names a live session.

Examples

>>> with control_mode() as ctl:
... client = server.clients.get(client_name=ctl.client_name)
... attached = client.attached_session
>>> attached is not None
True

0 declared, 0 inherited

Esc

Type to search.