---
title: tmux
description: Files and commands used by the tmux target.
---

The tmux target writes a generated tmux theme file, updates the active source line, and reloads tmux.

By default the status bar shows the plain tmux session name (`#{session_name}`). You can override this per theme — see [Session name formatting](#session-name-formatting) below.

This page is generated from the adapter plan used by `otheme set vesper --dry-run`. Paths are shown exactly as otheme prints them; `~` means your home directory.

## Compatibility

Author mode. otheme generates a tmux theme file from the shared theme palette and points tmux at it.

## Files

| Order | File | What otheme writes |
| --- | --- | --- |
| 1 | `~/.config/tmux/themes/vesper.conf` | write generated tmux theme for Vesper |
| 2 | `~/.config/tmux/tmux.conf` | ensure active tmux source-file line points to ~/.config/tmux/themes/vesper.conf |

## Commands

| Order | Command | Why it runs |
| --- | --- | --- |
| 1 | `tmux source-file ~/.config/tmux/tmux.conf` | reload tmux so the active theme changes immediately |

## Session name formatting

By default, otheme renders the tmux status bar with the plain session name (`#{session_name}`).

You can customize this via the `overrides` field in `~/.config/otheme/config.json`:

### `sessionFormatter`

Run a custom binary to format the session name. otheme injects it as `#(<formatter> '#{session_name}')` in both the prefix and non-prefix branches of the status right.

```json
{
  "overrides": {
    "vesper": {
      "tmux": {
        "sessionFormatter": "~/.config/tmux/tools/format-session/target/release/format-session"
      }
    }
  }
}
```

### `statusRight`

Replace the entire status-right string. Supports `{{placeholder}}` substitution (e.g. `{{accent}}`, `{{muted}}`). This wins over `sessionFormatter` when both are set.

```json
{
  "overrides": {
    "vesper": {
      "tmux": {
        "statusRight": "#[fg={{muted}}]my custom status"
      }
    }
  }
}
```
