# tmux.Pane.SetTitle

- **Module:** tmux.Pane
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/pane_geometry.go#L173
- **Page:** https://libtmux.org/reference/go/tmux-pane-settitle/

```
tmux.Pane.SetTitle(ctx: context.Context, title: string) -> (Pane, error)
```

SetTitle sets the title of the receiver's exact linked pane. tmux expands format expressions in title; the value is not a shell command. SetTitle then refreshes by PaneID, so the returned canonical [Pane] may carry a different linked-session or winlink context. If the mutation is accepted but refresh fails, SetTitle returns the original receiver with that error.

Completed stderr produces a redacted [CommandError]; nonzero exits without
stderr are followed by refresh. Transport errors return zero and are
delivery-ambiguous.
