# v0.8.2

URL: https://tuios.dev/releases/v0-8-2

> tuios 0.8.2 adds the scratch terminal and command keys. It also brings file editing and file search in the sidebar, hints on all panes and the fixes merged since v0.8.1.

tuios 0.8.2 adds the scratch terminal and command keys. It also brings file
editing and file search in the sidebar, hints on all panes and the fixes
merged since v0.8.1.

Before you upgrade, read
[Breaking changes and migration](https://tuios.dev/releases/v0-8-2#breaking-changes-and-migration). A session
rename now changes the name of the session.

The full list is at [tuios.dev/releases](https://tuios.dev/releases).

## Install

```bash
brew install tuios                     # Homebrew (macOS, Linux)
yay -S tuios-bin                       # AUR (tuios-web-bin for the web server)
nix run github:Gaurav-Gosain/tuios     # Nix
curl -fsSL https://raw.githubusercontent.com/Gaurav-Gosain/tuios/main/install.sh | bash
go install github.com/Gaurav-Gosain/tuios/cmd/tuios@v0.8.2
docker run -it --rm ghcr.io/gaurav-gosain/tuios:v0.8.2
```

A binary installed by the script or from an archive updates with
`tuios update`.

## New features

- **Scratch terminal.** `Ctrl+B g` shows a scratch terminal in a popup over
  the current layout. Press `Ctrl+B g` again to hide it.
  - Each session has one scratch terminal. The shell keeps running while the
    terminal is hidden.
  - The shell starts in the folder of the focused pane. The terminal opens on
    the workspace you are on.
  - The scratch terminal is shown only while it has the focus. A click
    outside it or a focus on a different pane hides it.
  - Esc in window mode, the close key and the close button hide it.
    `tuios kill-window` closes it.
  - The mouse does not move or resize it. Window keys do not act on a
    different pane from inside it.
  - The dock, the sidebar and the tiled layout do not show it.
    `tuios list-windows --json` marks it with `"scratch": true`.
  - It stays when you detach. After a daemon restart, it comes back hidden
    with a new shell.
  - `[scratch]` sets `width` and `height`, in cells or percent. The default
    is `80%`.
- **Command keys.** A `[[keybindings.command]]` entry binds a key to a
  command that you write.
  - `type` is `scratch`, `popup`, `pane` or `shell`. The default is `popup`.
  - A `scratch` entry is a popup that stays, as the scratch terminal does.
    Each entry has its own popup.
  - A key that starts with `prefix+` works after the leader. Any other key
    works in window mode and in terminal mode.
  - The command runs with `sh -c` in the folder of the focused pane.
  - The command gets `TUIOS_SESSION`, `TUIOS_SOCKET`, `TUIOS_ACTIVE_PANE_ID`
    and `TUIOS_ACTIVE_PANE_CWD`.
  - The command palette lists each entry. `tuios keybinds list` shows them
    under Commands.
  - `tuios keybinds doctor` shows an entry as dead when its key is taken. A
    command key never takes a key from a tuios action or the leader.
  - When a scratch command stops in its first moments, the dock shows its
    exit code.
- **Hints on all panes.** The new action `hints_all_panes` puts labels on all
  panes that the workspace shows. It has no default key.
  - The focused pane gets the shortest labels.
  - tuios gives no label to text that you cannot see.
  - Set `hints.all_panes = true` to make `Ctrl+B F` put labels on all panes.
- **Sidebar file editor.** `Shift+Enter` on a file in the sidebar opens it in
  a new pane with an editor.
  - Set the editor under Settings, Sidebar, File editor. With no editor set,
    tuios uses `$EDITOR`.
  - The context menu of a file has an Edit row.
  - For a session on a different machine, the dock names the editor and the
    machine.
- **File search.** `Ctrl+B f` searches file names below the folder of the
  focused pane. `Ctrl+F` searches below the folder that the sidebar shows.
  - Type a name or a relative path and press `Enter`. The sidebar opens the
    folder and selects the file.
  - The search skips build folders and stops after a time limit.
- **Session rename.** The new command
  `tuios rename-session [session] <new-name>` changes the name of a session
  in the daemon.
  - The session picker, the sidebar and the rename key use it too.
  - `tuios ls` lists the new name. The state file, mail and Inbox items move
    to the new name.
- **Workspace cycling.** The actions `next_workspace` and `prev_workspace`
  now work. They have no default key.
  - They skip empty workspaces and wrap at the ends.
  - They also work in terminal mode.
- **Attach flags.** `tuios attach --hold` now works for a local session.
  `--terminal-mode` starts the client in terminal mode.

## Fixes

- **Kitty graphics.** tuios holds the images of a pane until the pane ends
  its synchronized update
  ([#247](https://github.com/Gaurav-Gosain/tuios/pull/247),
  [#249](https://github.com/Gaurav-Gosain/tuios/pull/249),
  [#250](https://github.com/Gaurav-Gosain/tuios/pull/250)).
  - The Magick Arena demo and terminal-browser do not flicker.
  - A move, resize or zoom of a pane moves its image at once.
  - A hold ends after 1 second or when the pane holds too much data.
- **Status reports.** A pane answers `CSI 5 n` with `CSI 0 n` and
  `CSI ? 5 n` with `CSI ? 0 n`
  ([#257](https://github.com/Gaurav-Gosain/tuios/pull/257)). ratatui-image no
  longer waits forever.
- **Input method text.** Text from an input method reaches a pane that uses
  the kitty keyboard protocol as text
  ([#259](https://github.com/Gaurav-Gosain/tuios/pull/259)). This fixes CJK
  punctuation, ideographs and emoji in Claude Code.
- **OSC 66.** A program that sends OSC 66 text sizing, such as opencode,
  does not break the title bar of its pane
  ([#245](https://github.com/Gaurav-Gosain/tuios/pull/245)).
- **OSC 99.** Builds with the ghostty backend now show OSC 99 notifications
  ([#242](https://github.com/Gaurav-Gosain/tuios/pull/242)).
- **macOS ghostty builds.** The release now includes macOS archives with the
  ghostty backend ([#244](https://github.com/Gaurav-Gosain/tuios/pull/244)).
- **tuios-web.** sip v0.8.3 fixes a race when a web session closes
  ([#246](https://github.com/Gaurav-Gosain/tuios/pull/246)).
- **`keybinds list-custom`.** The command finds a rebind in every
  `[keybindings]` section
  ([#261](https://github.com/Gaurav-Gosain/tuios/pull/261)). Before, it
  looked at nine sections only.
- **Nested tuios.**
  - The daemon answers a kitty frame edit in order with its other replies.
    The reply no longer reaches a nested shell as keys.
  - The daemon refuses frame edits unless every attached client supports
    them.
- **Popups.** A popup command starts at the size of the popup.
- **Hints.** tuios gives no label to text that a different pane or the
  screen edge hides.

## Breaking changes and migration

### Session rename

- The session picker, the sidebar and the rename key now change the name of
  the session. Before, they changed a display label only.
- A process that runs in a pane keeps the old `TUIOS_SESSION`. tuios
  commands with the old name still reach the session.
- `tuios attach` with the old name fails. The message names the new name.
- `tuios set-session-name` still sets a display label. `tuios ls` shows the
  label beside the name.

### Mixed versions

- The scratch terminal, command keys of type `scratch` and session rename
  need a v0.8.2 daemon. To start a v0.8.2 daemon, run `tuios kill-server`
  after the upgrade. This closes every pane in every session, so save your
  work first.

## Contributors

Thank you to everyone who sent a pull request for this release:

- @alepspizzetti: sidebar file editor and file search
  ([#258](https://github.com/Gaurav-Gosain/tuios/pull/258))
- @davidreuss: workspace cycling actions
  ([#267](https://github.com/Gaurav-Gosain/tuios/pull/267))
- @NotAFlightRisk: `keybinds list-custom` in every section
  ([#261](https://github.com/Gaurav-Gosain/tuios/pull/261))
