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

Window.move_to

Move this window to an index, possibly in another session.

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

Description#

The destination is a session and an index rather than a target string, because those are the two things tmux needs and a string could express neither or both.

Errors

Returns Error::ServerMismatch when session() belongs to another server, or an error when the destination is occupied or absent.

Parameters

tmux command#

The tmux commands behind move_to.

tmux C API#

The C declarations in tmux that implement these commands.

In other ports#

Move a window to another session or index

Equivalents of Move a window to another session or index in other languages
Language Equivalent
Python libtmux.Window.move_window
Lua libtmux.WindowLink:move
Erlang tmux_window_link:move/3
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript window.Window.move
Go tmux.Window.Move
Java io.github.libtmux.Window.moveTo
C# LibTmux.Window.MoveAsync
C++ libtmux::Window::move_to
Swift Server.move(_:to:at:)
OCaml Libtmux_unix.Client.move_window_at
Perl LibTmux::Server::move_window Requires an explicit WindowLink or session_id:index context; a physical window alone does not select a session placement.

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

Esc

Type to search.

Reference previewOpen reference