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

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/f02a4668570e1cc5198c941413750e021f42c214/Sources/LibTmux/Creation.swift#L117
- **Page:** https://libtmux.org/reference/swift/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`
