Skip to main content

Module tmux

Module tmux 

Source

Structs§

Session

Functions§

apply_layout
capture_pane
Capture the visible content of a single tmux pane as plain text. target is the session:window.pane form. ANSI escapes are stripped by tmux (no -e), which is what we want for pattern matching.
cleanup_sessions
create_session
current_session_id
Return the current tmux session id (e.g. $3), or None if not inside a tmux server or the query fails.
kill_session
kill_session_id
Kill a session by its stable id (e.g. $3). Safer than by name when sessions may be renamed concurrently.
list_sessions
parse_sessions
safe_session_name
Normalise a tmux session name. Mirrors the convention used elsewhere (dots and slashes become safe characters).
session_exists
switch_session
switch_to_pane
Switch the current client to a specific pane (session:window.pane). switch-client -t session:window.pane is unreliable across tmux versions for selecting the window/pane within the session, so we do the dance explicitly: select-pane first (which carries window selection), then switch the client. All errors are surfaced.