# tumix

Interactive terminal UI for building, editing, and applying **tmux** configuration.

Edit every tmux option, key bindings, plugins, raw config lines, **custom workspace definitions**, and **command sequences** — then write `~/.tmux.conf`, spawn workspaces, and generate shell completions.

## Install

```bash
cargo install tumix
```

Requires [Rust](https://rustup.rs/) and, to apply config or spawn workspaces, [tmux](https://github.com/tmux/tmux) on your `PATH`.

## Quick start

```bash
tumix                  # open the TUI (saves to ~/.config/tumix/tumix_config.toml)
TUMIX_CONFIG=my.toml tumix  # use a custom settings file
```

## Screens

| # | Screen | What you can do |
|---|--------|-----------------|
| 1 | **Options** | 100+ known tmux options by category (Server, Session, Keys, Status, Window, Panes, Alerts…); custom/user-defined options; search |
| 2 | **Bindings** | Add/edit/remove `bind-key` entries with key, flags, and command |
| 3 | **Plugins** | Toggle TPM plugins on/off |
| 4 | **Features** | Toggle presets (vim nav, aggressive resize, auto-rename, system monitor, prefix rebind, reload key) |
| 5 | **Extra** | Raw lines appended verbatim to `~/.tmux.conf` |
| 6 | **Preview** | Live preview of the generated `~/.tmux.conf` |
| 7 | **Workspaces** | Define named workspace templates with sessions → windows → panes → commands; **spawn** them live |
| 8 | **Commands** | Define named tmux command sequences; **run** them inline |

## TUI keys

| Key | Action |
|-----|--------|
| `j` / `k` or arrows | Navigate |
| `←` / `→` | Change option category |
| `Tab` / `1`–`8` | Switch screens |
| `/` | Search (list-level screens only) |
| `Enter` | Edit / drill into tree |
| `Esc` | Back / cancel / up tree level |
| `Space` | Toggle bool / cycle enum |
| `a` | Add (item depends on screen context) |
| `d` | Delete selected item |
| `e` | Rename / edit selected item |
| `Ctrl+S` | Save settings TOML |
| `s` | Save + apply `~/.tmux.conf` |
| `S` | **Spawn** selected workspace |
| `r` | **Run** selected command sequence |
| `c` | Generate **shell completions** (bash → zsh → powershell) |
| `q` | Quit |

## Workspace tree navigation

Workspaces are multi-level trees. `Enter` drills in, `Esc` goes back up:

```
Workspace List  →  Sessions  →  Windows  →  Panes  →  (edit commands)
```

At each level `a` adds a child, `d` deletes the current item, `e` renames it.

## Shell completions

Press `c` on the **Workspaces** or **Commands** screen to generate shell completions
for `tumix-spawn` (workspace names) and `tumix-run` (sequence names).
Cycles through bash → zsh → PowerShell on each press.

## Config location

Config is saved to `~/.config/tumix/tumix_config.toml`. Set `TUMIX_CONFIG`
to override.

## License

MIT
