# io.github.libtmux.WindowSpec.WindowSpec

- **Module:** io.github.libtmux.WindowSpec
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-java/blob/842228310449e879ebcaa3f910597757c9dbffd6/libtmux/src/main/java/io/github/libtmux/WindowSpec.java#L23
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-windowspec-windowspec/

How a window should be made.

The shape {@link SplitSpec} uses, for the same reasons: a description that contacts nothing, so
it can be named, reused, and applied wherever it fits.

## Example

```java
Window logs = session.newWindow(w -> w.named("logs").running("journalctl", "-f"));
```

## Members

- `builder` (method): A builder holding tmux's own defaults: a detached window at the end, running a shell.
- `name` (method): The name the window is created with, or empty to let tmux choose.
- `directory` (method): Where the window's first pane starts, or empty to inherit.
- `environment` (method): Variables set for the new window, in the order they were given.
- `detached` (method): Whether the window is left unselected.
- `placement` (method): Where the window is inserted, or empty for tmux's own choice of index.
- `index` (method): The index the window is created at, or empty for the next one tmux has free.
- `replaceExisting` (method): Whether a window already at the target index is destroyed to make room.
- `reuseExisting` (method): Whether a window that already carries this name is selected instead of a second being made.
- `command` (method): What the window's first pane runs, empty for the session's shell.
- `argv` (method): The command that makes this window, reporting it through {@code format}.
- `toString` (method)
- `Builder` (class): Collects the choices, each named for what it does rather than for the field it sets.
