On this page
libtmux.Client.attached_session
- Module
- libtmux
- Declared in
- Client
- Package
- libtmux
- Source
- src/libtmux/client.py
-
Return the
Sessionthis client is currently attached to.Re-reads the client from
list-clientsbefore resolving, so the returnedSessionreflects the client's *live* attachment rather than the snapshot captured when thisClientwas read. ReturnsNonewhen tmux no longer reports thisclient_namethroughlist-clients, when the client is not attached to any session, or when the snapshotsession_idno 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