# Server.newWindow(in:named:startDirectory:)

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/254f8b2be7eb60cacc3ffcb3ea8e456784f582df/Sources/LibTmux/Creation.swift#L142
- **Page:** https://libtmux.org/en/swift/latest/reference/server-newwindow(in-named-startdirectory-)/

```
Server.newWindow(in:named:startDirectory:)(in: Session, named: String?, startDirectory: String?) -> WindowAppearance
```

Creates a window in a session and returns its exact appearance.

The appearance is read from the creation reply, after the windows
already in the session when no relative placement is given.

## Raises

- `TmuxError`
