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-ts latest

Window

One window on one tmux server, as a handle rather than a copy of it.

Source and package
Qualified name
Window
Module
window
Package
libtmux
Source
packages/libtmux/src/window.ts
Other languages
PowerShellcmdlet Juliastruct Elixirstruct PythonRubyLuaRustGoJavaC#C++SwiftKotlinScalaF#module
class window.Window

Description#

Reached from Session.windows() or Session.activeWindow(); the constructor throws. The tmux format row the handle was built from reads back through format, and by tmux's own field names directly on the handle — a snapshot taken when the handle was made, not a live view.

A window can be linked into more than one session, so Window.session() is the session this handle was reached through rather than the only one showing it.

Members37#

Parent objects2#

  • session method The session this placement belongs to.
  • server: Server attribute The server this handle addresses.

Collections and queries1#

  • panes method Panes of this window placement; a linked window keeps each set apart.

Common operations30#

  • split method Split this window and resolve the created pane.
  • selectLayout method Apply a named or custom layout.
  • kill method Destroy this window, unlinking it from every session it is in.
  • rename method Rename this window.
  • link method Link this window into another session, giving it a second placement.
  • unlink method Remove this placement, leaving the window's other placements intact.
  • select method Make this window active in its session.
  • showOptions method Every option set on this window itself, not the ones it inherits.
  • resize method Resize this window, by a direction, to a size, or to what its clients allow.
  • move method Move this window to another session or index without selecting it.
  • rotate method Rotate the panes within this window.
  • showHooks method Read hooks set on this window itself.
  • nextLayout method Apply this window's next layout preset.
  • respawn method Restart the command running in this window's active pane.
  • swapWith method Exchange positions with another window.
  • activePane method The pane tmux marks active in this window.
  • setOption method Set an option on this window.
  • unsetOption method Remove an option from this window.
  • refreshed method This window placement, read again at a new instant.
  • previousLayout method Apply this window's previous layout preset.
  • setHook method Bind a tmux command to a window-scoped hook.
  • unsetHook method Remove every command bound to a window-scoped hook.
  • linkedSessions method Every session this window is linked into.
  • cmd method Run a tmux command this package does not model, addressed at this window.
  • equals method Whether other is this same window on this same server.
  • plan method The same mutations, described instead of run.
  • removePlacement method Remove this placement, destroying an unshared window but refusing a group.
  • sameTmuxIdAs method Whether other carries the same @n, wherever it came from.
  • showResolvedOptions method The option values that govern this window, own and inherited together.
  • unzoom method Restore this window's layout, whichever of its panes was zoomed.

Other members4#

Guides#

Pages that discuss Window.

Topics

In other ports#

A tmux window

Equivalents of A tmux window in other languages
Language Equivalent
Python libtmux.Window
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.
Elixir LibTmux.Window Window is a physical window. WindowLink records its session index and active state.
Rust window.Window
Go tmux.Window
Java io.github.libtmux.Window
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
Esc

Type to search.

Reference previewOpen reference