# Libtmux_eio.Client.unlink_window_at

- **Module:** Libtmux_eio
- **Package:** libtmux-eio
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/eio/libtmux_eio.mli#L472
- **Public owner:** Libtmux_eio
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_eio-client-unlink_window_at/

```
val unlink_window_at :
  ?allow_kill:bool ->
  t -> Libtmux.Session.target -> index:int -> (unit, Libtmux.Error.t) result
```

Without `allow_kill`, tmux rejects removal of the last link to a window.

## Parameters

- `allow_kill?` (`bool`)
- `arg1` (`t`)
- `arg2` (`Libtmux.Session.target`)
- `index` (`int`)

## tmux command

The tmux commands behind `unlink_window_at`.

- [`unlink-window`](/en/tmux/latest/manual/unlink-window/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_unlink_window_entry`](/en/tmux/latest/reference/c-variable-cmd_unlink_window_entry/) (attribute)
- [`cmd_kill_window_exec`](/en/tmux/latest/reference/c-function-cmd-kill-window-c-cmd_kill_window_exec/) (function)

## In other ports

Unlink a window from a session

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.unlink`](/en/py/latest/reference/libtmux-window-unlink/) (method) |
| Lua | [`libtmux.WindowLink:unlink`](/en/lua/latest/reference/libtmux-windowlink-unlink/) (method) |
| Erlang | [`tmux_window_link:unlink/2`](/en/erlang/latest/reference/tmux_window_link-unlink-2/) (function). Acts on one session-relative membership. |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`window.Window.unlink`](/en/ts/latest/reference/window-window-unlink/) (method) |
| Rust | [`window.Window.unlink`](/en/rs/latest/reference/window-window-unlink/) (method) |
| Go | [`tmux.Window.Unlink`](/en/go/latest/reference/tmux-window-unlink/) (method) |
| Java | [`io.github.libtmux.Window.unlink`](/en/java/latest/reference/io-github-libtmux-window-window-unlink/) (method) |
| C# | [`LibTmux.Window.UnlinkAsync`](/en/csharp/latest/reference/libtmux-window-unlinkasync/) (method) |
| C++ | [`libtmux::Window::unlink`](/en/cxx/latest/reference/libtmux-window-unlink/) (method) |
| Swift | [`Server.unlink(_:)`](/en/swift/latest/reference/server-unlink(_-)/) (method) |
| Perl | [`LibTmux::Server::unlink_window`](/en/perl/latest/reference/libtmux-server-unlink_window/) (method). 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#.
