Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

struct libtmux-rs latest

Client

One client attached to the tmux server.

Source and package
Qualified name
libtmux::client::Client
Module
client
Package
libtmux
Source
crates/libtmux/src/client.rs
struct client.Client

Description#

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?;

Members21#

Parent objects1#

Common operations2#

  • 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.

Other members18#

  • 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.

Guides#

Pages that discuss Client.

Esc

Type to search.

Reference previewOpen reference