# Server.swap(_:with:)

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/f02a4668570e1cc5198c941413750e021f42c214/Sources/LibTmux/Navigation.swift#L66
- **Page:** https://libtmux.org/reference/swift/server-swap(_-with-)/

```
Server.swap(_:with:)(link: WindowLink, with: WindowLink) -> ()
```

Swaps two window appearances. Their underlying window ids do not change, but both links move to new indices.

## Raises

- `TmuxError`
