Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Python API

Python documentation

libtmux.Session.next_window

Python

View as Markdown

Module
libtmux
Declared in
Session
Package
libtmux
Source
src/libtmux/session.py
Other languages
Ruby Lua TypeScript RustGoJava.NETC++Swift
next_window ( self ) → Window
method [source]
method [source]
next_window

Select the next window.

Wraps $ tmux next-window.

Returns

Window The newly active window.

In other ports Move to the next window of a session

Examples

>>> w = session.new_window(window_name='nw_test')
>>> session.next_window()
Window(...)
let guard = libtmux::test::TestServer::new().await?;
let session = guard.server().new_session("moving").await?;
// One window, so there is nowhere to go and nothing broke.
assert!(session.next_window().await?.is_none());
session.new_window("second").await?;
assert!(session.next_window().await?.is_some());
guard.shutdown().await?;

0 declared, 0 inherited

Esc

Type to search.