Window.unlink
Unlink this window from the current session via $ tmux unlink-window.
Source and package
-
Examples#
>>> w = session.new_window(window_name='unlink_test')>>> s2 = server.new_session(session_name='unlink_s2')>>> w.link(s2)>>> linked = [x for x in s2.windows if x.window_name == 'unlink_test']>>> linked[0].unlink()- Parameters
-
-
kill_if_last(bool | None) # – Kill the window if it is the last window in the session (-k).
-
tmux command#
The tmux commands behind unlink.
tmux C API#
The C declarations in tmux that implement these commands.
In other ports#
Unlink a window from a session
| Language | Equivalent |
|---|---|
| Lua | libtmux |
| Erlang | tmux Acts on one session-relative membership. |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | window |
| Rust | window |
| Go | tmux |
| Java | io |
| C# | Lib |
| C++ | libtmux:: |
| Swift | Server |
| OCaml | Libtmux |
| Perl | Lib 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#.