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

client.Client

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

View as Markdown

Module
client
Package
libtmux
Source
crates/libtmux/src/client.rs
struct client.Client
structoverload [source]
structoverload [source]
struct client.Client

One client attached to the tmux server.

Clients have no $-style id. tmux identifies them by the terminal they occupy, so Client::name is the identity and is always present.

Examples

let guard = libtmux::test::TestServer::new().await?;
guard.server().new_session("work").await?;
// A session created without attaching has no client, which is the usual
// shape under test and under automation.
assert!(guard.server().clients().await?.is_empty());
guard.shutdown().await?;

21 declared, 0 inherited

Members

  • attached_session method The session this client is attached to.
  • get method Read one field of this client's snapshot, named by the handle that filters it.
  • is_own method Report whether this process opened this client itself.
  • attached_pane method The active pane of the current window of this client's session.
  • attached_window method The current window of the session this client is attached to.
  • created method Return when the client connected.
  • detach method Detach this client from its server.
  • height method Return the client height in cells.
  • is_control_mode method Report whether the client is a control-mode client.
  • is_readonly method Report whether the client is attached read-only.
  • lock method Lock this client's terminal.
  • name method Return the client name, which is its terminal path.
  • pid method Return the client process id.
  • redraw method Redraw this client's terminal.
  • refresh method Replace this handle's snapshot with the client's current state.
  • refreshed method Return a new handle holding the client's current state.
  • suspend method Suspend this client, as if its user pressed the suspend key.
  • switch_to method Point this client at another session.
  • term_name method Return the terminal type the client reports.
  • tty method Return the client's controlling terminal.
  • width method Return the client width in cells.
Esc

Type to search.