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 latest

Window.move_window

Move current Window object $ tmux move-window.

Source and package
Qualified name
libtmux.Window.move_window
Module
libtmux
Declared in
Window
Package
libtmux
Source
src/libtmux/window.py
Other languages
Perlmethod Erlang PowerShell Julia Elixir Haskell Common Lisp Ruby LuaTypeScriptRustGoJavaC#C++Swift Kotlin Scala OCaml F# Clojure
move_window ( self, destination: str = "", session: str | None = None, after: bool | None = None, before: bool | None = None, no_select: bool | None = None, kill_target: bool | None = None, renumber: bool | None = None, ) → Window
Parameters
  • destination (str) # – The target window or index to move the window to, default: empty string.

  • session (str | None) # – The target session or index to move the window to, default: current session.

  • after (bool | None) # – Insert after the target window (-a flag). added 0.56

  • before (bool | None) # – Insert before the target window (-b flag). added 0.56

  • no_select (bool | None) # – Do not make the moved window the current window (-d flag). added 0.56

  • kill_target (bool | None) # – Kill the target window if it exists (-k flag). added 0.56

  • renumber (bool | None) # – Renumber all windows in sequential order (-r flag). This is a standalone operation — when used, no move is performed and other parameters are ignored. added 0.56

Returns

Window Self, for method chaining.

Raises

tmux command#

The tmux commands behind move_window.

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
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
Rust window.Window.move_to
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