# Server.swap(_:with:)

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/254f8b2be7eb60cacc3ffcb3ea8e456784f582df/Sources/LibTmux/Navigation.swift#L64
- **Page:** https://libtmux.org/en/swift/latest/reference/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`
