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.

class libtmux latest

Server

tmux(1) Server [server_manual].

Source and package
Qualified name
libtmux.Server
Module
libtmux
Package
libtmux
Source
src/libtmux/server.py
Other languages
Perlclass Erlangmodule PowerShellcmdlet Juliastruct Elixirstruct Haskell Common Lisp RubyLuaTypeScriptRustGoJavaC#C++SwiftKotlinScalaOCamltypealias F#module Clojurefunction
class libtmux.Server

Description#

When instantiated stores information on live, running tmux server.

Examples#

>>> server
Server(socket_name=libtmux_test...)
>>> server.sessions
[Session($1 ...)]
>>> server.sessions[0].windows
[Window(@1 1:..., Session($1 ...))]
>>> server.sessions[0].active_window
Window(@1 1:..., Session($1 ...))
>>> server.sessions[0].active_pane
Pane(%1 Window(@1 1:..., Session($1 ...)))

The server can be used as a context manager to ensure proper cleanup:

>>> with Server() as server:
... session = server.new_session()
... # Do work with the session
... # Server will be killed automatically when exiting the context

References#

[server_manual]

tmux 3.7c manual, Clients and sessions. "The tmux server manages clients, sessions, windows and panes. Clients are attached to sessions to interact with them, either when they are created with the new-session command, or later with the attach-session command. Each session has one or more windows linked into it. Windows may be linked to multiple sessions and are made up of one or more panes, each of which contains a pseudo terminal." Upstream source; OpenBSD tmux(1) manual.

Members74#

Collections and queries11#

Common operations40#

Other members23#

Inherited members24 members#

Reached through libtmux.hooks.HooksMixin, libtmux.options.OptionsMixin, libtmux.common.EnvironmentMixin.

Guides#

Pages that discuss Server.

In other ports#

A tmux server

Equivalents of A tmux server in other languages
Language Equivalent
Ruby LibTmux::Server
Lua libtmux.Server
PowerShell LibTmux\New-TmuxServer This cmdlet constructs a shared .NET LibTmux.Server handle without contacting tmux.
Julia LibTmux.Server Server describes an endpoint without contacting tmux. Read its hierarchy with snapshot.
Erlang tmux_server open/1 observes an existing daemon and starts an endpoint owner. Domain rows remain immutable values.
Elixir LibTmux.Server Server describes an existing server by executable and socket. It neither connects nor reserves the server’s identity.
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript server.Server
Rust server.Server
Go tmux.Server
Java io.github.libtmux.Server
Clojure libtmux.core/open! Opens a closeable Java server client for an explicit endpoint. Acquisitions return persistent maps with explicit Java references for effects.
Kotlin io.github.libtmux.kotlin.Server
Scala io.github.libtmux.scaladsl.Server
C# LibTmux.Server
F# LibTmux.FSharp.Server This F# module provides functions over the shared .NET LibTmux.Server type.
C++ libtmux::Server
Swift Server
OCaml Libtmux_unix.Client.t A client is a live, generation-bound server connection. Endpoint describes a socket without connecting; closing a client releases its resources.
Perl LibTmux::Server Construction records connection settings without tmux I/O. Optional LibTmux::Async::Server returns standard Future results for operations.

No equivalent is recorded in Common Lisp.

Esc

Type to search.

Reference previewOpen reference