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

Window

tmux(1) Window [window_manual].

Source and package
Qualified name
libtmux.Window
Module
libtmux
Package
libtmux
Source
src/libtmux/window.py
Other languages
Perlclass Erlangstruct PowerShellcmdlet Juliastruct Elixirstruct Haskell Common Lispclass RubyLuaTypeScriptRustGoJavaC#C++SwiftKotlinScalaOCamltypealias F#module Clojurefunction
class libtmux.Window

Description#

Holds Pane objects.

Examples#

>>> window = session.new_window('My project', attach=True)
>>> window
Window(@2 2:My project, Session($... ...))

Windows have panes:

>>> window.panes
[Pane(...)]
>>> window.active_pane
Pane(...)

Relations moving up:

>>> window.session
Session(...)
>>> window.window_id == session.active_window.window_id
True
>>> window == session.active_window
True
>>> window in session.windows
True

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

>>> with session.new_window() as window:
... pane = window.split()
... # Do work with the pane
... # Window will be killed automatically when exiting the context

References#

[window_manual]

tmux 3.7c manual, Description. "Each session has one or more windows linked to it. A window occupies the entire screen and may be split into rectangular panes..." Create a window with new-window or divide it into panes with split-window. Upstream source; OpenBSD tmux(1) manual.

Members56#

Parent objects2#

Collections and queries2#

  • panes property Panes contained by window.
  • search_panes method Panes in this window, optionally filtered by tmux.

Common operations30#

Other members22#

Inherited members198 members#

Reached through libtmux.options.OptionsMixin, libtmux.hooks.HooksMixin, libtmux.neo.Obj.

Guides#

Pages that discuss Window.

In other ports#

A tmux window

Equivalents of A tmux window in other languages
Language Equivalent
Ruby LibTmux::Window
Lua libtmux.Window
PowerShell LibTmux\Get-TmuxWindow This cmdlet reads shared .NET LibTmux.Window placements. Use -Server for all sessions or -Session for one session.
Julia LibTmux.WindowSnapshot WindowSnapshot holds captured physical-window data. WindowLink records a placement in a session; actions use WindowRef.
Erlang #tmux_model:window{} A physical window can have several session memberships. window_link holds the session-relative index and active flag.
Elixir LibTmux.Window Window is a physical window. WindowLink records its session index and active state.
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
Common Lisp libtmux:window window is a physical captured window. window-link preserves each session placement.
TypeScript window.Window
Rust window.Window
Go tmux.Window
Java io.github.libtmux.Window
Clojure libtmux.data/windows Traverses captured window-placement maps without I/O; the window value is a map with an explicit Java reference for effects.
Kotlin io.github.libtmux.kotlin.Window
Scala io.github.libtmux.scaladsl.Window
C# LibTmux.Window
F# LibTmux.FSharp.Window This F# module identifies shared .NET LibTmux.Window placements and builds deferred pane queries. Query.list acquires their results from tmux.
C++ libtmux::Window
Swift Window
OCaml Libtmux.Window.t A global window can have several session placements. Window_link holds the session, index and current flag.
Perl LibTmux::Window Physical window identity. WindowLink owns each session/index placement.
Esc

Type to search.

Reference previewOpen reference