libtmux.Client.attached_session
Python
- Python
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust Unavailable
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- 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 NoneTrue
0 declared, 0 inherited