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.

method libtmux-rs latest

Session.active_window

Return the session's active window.

Source and package
Qualified name
libtmux::session::Session::active_window
Module
session
Declared in
Session
Package
libtmux
Source
crates/libtmux/src/session.rs
Other languages
Perl Erlang PowerShell Julia Elixir Haskell Common Lisp Python Ruby Lua TypeScriptGoJavaC#C++ Swift Kotlin Scala OCaml F# Clojure
pub async fn active_window(&self) -> Result< Option<Window>, Error >

Description#

Errors

Returns an error when the window listing fails. A session always has an active window, so Ok(None) means the session disappeared between the snapshot and this call.

Guides#

Pages that discuss active_window.

In other ports#

The session's active window

Equivalents of The session's active window in other languages
Language Equivalent
Python libtmux.Session.active_window
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript session.Session.activeWindow
Go tmux.Session.ActiveWindow
Java io.github.libtmux.Session.activeWindow
C# LibTmux.Session.ActiveWindow
C++ libtmux::Session::active_window
Swift no accessor; Pane.isActive is a flag on the pane, so the active one is found by filtering a listing
OCaml No direct public OCaml equivalent is recorded for this operation.
Perl Select the active captured WindowLink, then resolve its physical window.

No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Esc

Type to search.

Reference previewOpen reference