rustimal 0.5.0

A minimal, GPU-rendered terminal for Windows that runs Git Bash, with animated split panes and a glass look
<img src="assets/icon.svg" width="64" height="64" alt="">

# rustimal

A minimal, GPU-rendered terminal for Windows that runs Git Bash, with animated split panes.

- Terminal emulation: [`alacritty_terminal`](https://crates.io/crates/alacritty_terminal) (VT parser, grid, scrollback, ConPTY)
- Rendering: `wgpu` (DX12) with one instanced-quad shader. Text goes through a glyph atlas built with `cosmic-text`, and box-drawing/block characters are drawn procedurally so lines join without gaps
- Window: `winit`, with a custom title bar and a blurred, see-through "liquid glass" backdrop

## Install

Needs Windows 10 or later, [Git for Windows](https://git-scm.com/download/win) (rustimal runs Git Bash, and falls back to PowerShell without it) and Rust 1.90+.

```powershell
cargo install rustimal    # builds and puts rustimal.exe in ~\.cargo\bin
rustimal --install        # adds the Start menu, right-click and Win+R entries
```

`rustimal --install --desktop` also adds a desktop shortcut, and `rustimal --uninstall` removes the entries again (the exe and your config stay). To update, run `rustimal --update` (see Updating below); the entries point at the exe in `~\.cargo\bin`, so there's nothing to redo.

`rustimal --install` adds:

- a Start menu entry (pin it to the taskbar from there)
- **Open in rustimal** in Explorer's right-click menu, for folders, folder backgrounds and drives
- `rustimal` in Win+R

From a clone of the repo, `.\install.ps1` does the same but builds the repo and copies the exe to `%LOCALAPPDATA%\Programs\rustimal` (add `-Desktop` for a desktop shortcut, `-Uninstall` to remove). Re-run it after pulling changes; it works even while rustimal is open.

## Build & run (dev)

```sh
cargo build --release
./target/release/rustimal.exe [start-directory]
```

## Shortcuts

| Keys | Action |
| --- | --- |
| `Ctrl+Shift+←/→/↑/↓` | Split the focused pane in that direction |
| `Alt+Shift+←/→/↑/↓` | Move the nearest divider (resize) |
| `Alt+←/→/↑/↓` | Move focus to the neighbouring pane |
| `Ctrl+Shift+W` | Close the focused pane |
| `Ctrl+Shift+Z` | Zoom the focused pane to the whole window; again to bring the others back |
| `Ctrl+Shift+P` | Command palette |
| `Ctrl+,` | Settings |
| `Ctrl+A` | Select the command line being typed |
| `Shift+←/→` (`Ctrl+Shift+←/→`, `Shift+Home/End`) | Select by character (by word, to the ends of the line) while typing a command |
| `Ctrl+Shift+F` | Find in the pane's screen and scrollback |
| `Ctrl+Shift+O` | Copy the last command's output |
| `Ctrl+Shift+E` | Open the pane's folder in Explorer |
| `Backspace` twice | At an empty prompt, go up a folder (`cd .. && ls`) |
| `Ctrl+C` | Copy if text is selected, otherwise interrupt |
| `Ctrl+Shift+C` | Copy |
| `Ctrl+V` / `Ctrl+Shift+V` / `Shift+Insert` | Paste (passes `^V` through when the clipboard holds an image) |
| `Shift+Enter` | Newline (for Claude Code) |
| `Ctrl+=` / `Ctrl+-` / `Ctrl+0` | Font size bigger / smaller / reset |
| `Shift+PgUp/PgDn/Home/End` | Scroll back |

Every one of these can be changed in Settings (the Shortcuts tab), or with a `[keys]` table in `config.toml` (see Config).

Mouse: click on the command line you're typing to move the cursor there, and drag to move it with the mouse. Double-click and drag selects text with the cursor following the mouse (it works like a text field; typing replaces the selection). Elsewhere, drag to select (double-click selects a word, triple-click a line; triple-click works on the command line too). Right-click copies the selection, or pastes if nothing is selected; on a link it opens a menu instead. Middle-click pastes. The wheel scrolls the pane under the pointer. Drop a file on a pane to type its path.

New panes open in the focused pane's directory.

## Editing the command line

The command you're typing behaves like a text field:

- `Shift+←/→` selects a character at a time, `Ctrl+Shift+←/→` a word at a time (words stop at separators, so `src/main.rs` is `src`, `/`, `main`, `.`, `rs`), and `Shift+Home/End` to the start or end of the line. The selection is highlighted and the cursor moves with it.
- `Ctrl+A` selects the whole command line, and nothing else. With nothing typed it does nothing special (the key goes to the shell).
- With something selected, typing or pasting replaces it, `Backspace` or `Delete` deletes it, `Ctrl+X` cuts it, `Ctrl+C` copies it, and `←`/`→` drop the selection with the cursor at that end of it.

`Ctrl+Shift+←/→` (split the pane) and `Shift+Home/End` (scroll) keep those jobs when nothing is typed at the prompt; once there is a command to select, they select. Programs that have the screen (vim, less, Claude) get every key as before, and `Ctrl+A` goes to them too. This needs the shell integration, and a command that wraps onto a second row isn't covered. Don't want `Ctrl+A` to select? Rebind or clear `select_all` in Settings.

## Find

`Ctrl+Shift+F` opens a search bar in the focused pane. Type to search the screen and all scrollback; matches are highlighted and the current one is scrolled into view. `Enter` jumps to the next older match, `Shift+Enter` to the next newer one, and `Esc` closes the bar. The search ignores case unless your query has a capital letter, and a match never spans a wrapped line.

## Links

Hover a URL, a file or a folder in the output and it's underlined; click it to open it. This covers `https://` links and OSC 8 hyperlinks, paths like `src/main.rs:12:5` (relative to the pane's folder, absolute, `~/…` or Git Bash `/c/…`), the names `ls` prints (including `ls -F` markers and quoted names with spaces), and the folder in the prompt, which opens in Explorer. Only things that exist on disk are links, and only names in the pane's own folder are found, so the entries of `ls some/other/dir` aren't clickable.

Clicking a name that `ls` printed works like typing the command: a folder runs `cd folder && ls`, and a readable text file (txt, md, json, jsx, js, ts, css, html, yaml, toml, rs, py, sh and other code, or a file with no extension, up to 1 MB and without binary content) runs `cat file`. The command is typed at an empty prompt (a click right after another command waits for it), read back from the screen, and only run once it shows up intact; if it doesn't, rustimal clears the line and tries again, and after a few tries opens the item instead. Other files (images, PDFs, …), and clicks while a program has been running for a few seconds or has the screen to itself (vim, Claude), open with the default app instead. `Ctrl+click` always opens in Explorer or the default app.

Programs, scripts and shortcuts are never run by a click: they're shown in Explorer instead. Programs that use the mouse (vim, htop) keep their plain clicks; hold `Ctrl` to click links there. To always require `Ctrl`, set `links_need_ctrl = true`.

`open` in the shell opens the current folder in Explorer, `open path` opens a file or folder with its default app, and `open https://…` opens a URL. `open app.css:20` (or `app.css:20:5`) opens the file in your editor at that line, using the `editor` setting; `rustimal --open app.css:20` does the same from any shell. (Shells started before you updated don't have it until you open a new pane.)

## Notifications

When a command that ran for 10 seconds or more finishes while rustimal is in the background, its taskbar button flashes and the window title (the taskbar tooltip) says what finished and how long it took. The same happens when Claude finishes a reply. Focusing the window clears it. Set `notify_after_secs` to change the threshold, or to `0` to turn it off.

## Command palette and settings

`Ctrl+Shift+P` opens the command palette: type a few letters of anything rustimal can do (every shortcut is in it, with its keys) and press Enter. It also reloads or opens the config file, restores layouts, and updates rustimal.

`Ctrl+,` opens Settings, with three tabs:

- **Features:** switches and numbers for the glass look, animations, the font, padding, scrollback, notifications, links, the editor, the global hotkey and more. Click a switch, use `-`/`+` or the arrow keys, or press Enter to type a value.
- **Theme:** ready-made color sets (Rustimal dark, Light, Solarized dark, Nord, Dracula, Gruvbox dark) and every color, each editable as `#rrggbb`.
- **Shortcuts:** every action and its keys. Select one, press Enter, then press the new keys. `Delete` restores a default.

Changes apply as you make them and are saved to `config.toml`, which keeps only what differs from the defaults (your hand-written file is kept once as `config.toml.bak`). Editing `config.toml` by hand works too: rustimal notices and applies it without a restart. A few settings (the glass window, the shell integration) take effect the next time rustimal starts.

## Layouts

A layout is a set of panes with their folders. rustimal reopens the last session's layout when it starts without a folder (`restore_session = true`).

To keep one, type a name in the command palette and choose "Save the layout as …". Saved layouts are listed in the palette as "Layout: name", and `rustimal --layout name` opens one at startup. They are JSON files in `%APPDATA%\rustimal\layouts` ("Open the folder of saved layouts" in the palette), so you can also write one by hand and give panes a command to run:

```json
{ "root": { "split": "right", "ratio": 0.5,
            "a": { "cwd": "C:/work/frontend", "run": "npm run dev" },
            "b": { "split": "down",
                   "a": { "cwd": "C:/work/backend", "run": "cargo watch -x run" },
                   "b": { "cwd": "C:/work", "run": "claude" } } } }
```

A pane is `{ "cwd": ..., "run": ... }` (both optional). A split puts `a` and `b` side by side (`"right"`) or stacked (`"down"`), at `ratio`. Commands are typed into the shell once it is ready, and checked like clicks are. Up to 12 panes.

## Errors, editors and the right-click menu

Compiler errors and stack traces are links to the exact place: `src/main.rs:12:5` (rustc, gcc, Go, Node), `src/app.ts(12,5)` (tsc), `at fn (C:\proj\a.js:3:9)` and `file:///` URLs (Node), `File "x.py", line 12` (Python) and `./src/a.js 12:5` (webpack). Paths relative to the project root are found from any folder below it. Clicking one opens your editor at that line: the `editor` setting is the command to run, `code -g "{file}:{line}:{col}"` by default (VS Code); empty uses the default app. If the command fails, the file opens in the default app.

Right-click a link or a name in an `ls` listing for a menu: open, go into the folder or print the file, show in Explorer, copy the path.

## Copying output, dragging files

`Ctrl+Shift+O` copies everything the last command printed (found from the prompts on screen, so it works as far back as the scrollback goes).

Drop a file or folder on a pane and its path is typed at the cursor: in Git Bash form (`/c/Users/me/a b.txt`, quoted when needed), or as a quoted Windows path in a Claude pane.

## Global hotkey

Set `hotkey = "ctrl+alt+space"` (or pick it in Settings) and that key shows rustimal from anywhere, and hides it again when it's in front. With `dropdown = true` it docks across the top of the screen, `dropdown_height` tall, like a drop-down terminal. The key needs Ctrl, Alt or Shift (or Win, when written in `config.toml`), so it can't take a plain key away from every program. If another program already has it, rustimal says so in its log and carries on.

## Updating

`rustimal --update` asks crates.io for the newest version and installs it with `cargo install` (so it needs the Rust toolchain, and takes a few minutes to compile). `rustimal --update --check` only says whether there is one. Windows won't overwrite a running program, so the installed exe is moved aside first (and put back if the install fails); windows you have open keep running the version they started with, and new ones use the new one. "Update rustimal" in the command palette runs it in a new pane.

## Shell integration (bash)

rustimal loads a small script through `PROMPT_COMMAND`, so your normal Git Bash login setup still runs. It does these things:

- **Prompt:** replaces the prompt with `folder branch ❯`. The chevron turns red when the last command fails.
- **Header:** reports the current folder, which appears in the title bar and is used for new splits.
- **Claude:** wraps `claude`. Running it with no arguments opens a session picker over the pane, listing your past sessions for that folder (read from `~/.claude/projects`). Type to filter, then press Enter to resume a session or start a new one. With arguments (`claude -c`, `claude -p …`), it passes through unchanged.
- **PATH:** when an installer changes PATH in the Windows registry, open shells pick it up before your next command, with no restart. rustimal watches the registry and Git Bash's own folders stay in front. (New panes always start with the PATH from the registry, even if Explorer's copy is out of date.) This uses the `DEBUG` trap, unless something like bash-preexec already does; then it applies at the next prompt instead.
- **Commands:** tells rustimal which command is starting, so it can say when it's done (see Notifications), and adds `open` (see Links). Tab on an empty line lists the files in the folder instead of every command on `PATH`, all at once rather than a page at a time.
- **Bare names:** typing just a name does the obvious thing, as long as it isn't also a command (a real command, alias or function always wins). A folder is entered and listed (`src`, `..`, `'My Folder'`), a text file is printed, a program is run (`.exe`, `.bat`, scripts with the executable bit or a `#!` line), and any other file opens with its default app. Names with a `/` in them aren't covered; use `cd`, or `./` for a program.

While Claude runs, the pane gets a warm focus ring, Claude's grays are re-tinted to match the theme, and the header shows the session topic.

A usage bar sits at the bottom of every Claude pane. It shows the model, 5-hour and weekly plan usage with time until reset, context window fill, and lines changed. The meters go green, then amber, then red as they fill.

How it gets the data: when you start Claude from rustimal, it passes an extra `--settings` file that sets a small status-line script. Claude hands that script its session data, and rustimal reads it. Your own Claude settings aren't changed. Usage is per account, so the last numbers are cached in `%APPDATA%\rustimal\state` and a new session shows them before its first reply.

Turn this off with `shell_integration = false` in the config.

## Config

`%APPDATA%\rustimal\config.toml` is created with commented defaults on first run, and Settings edits it for you. Options: `font_family`, `font_size`, `line_height`, `shell`, `shell_args`, `padding`, `gap`, `radius`, `scrollback`, `cursor_blink`, `animation_speed` (`0` turns animations off), `copy_on_select`, `shell_integration`, `glass`, `glass_opacity`, `notify_after_secs`, `links_need_ctrl`, `editor`, `restore_session`, `hotkey`, `dropdown`, `dropdown_height`, and the `[theme]` colors.

Shortcuts go in a `[keys]` table, by action name, as one chord or a list:

```toml
[keys]
split_right = "ctrl+alt+right"
paste = ["ctrl+v", "shift+insert"]
```

A chord is modifiers joined with `+` (`ctrl`, `alt`, `shift`) and a key: a character (`f`, `=`, `,`) or a name (`left`, `pageup`, `enter`, `f5`, ...). Rebinding an action replaces its default keys, and a key given to one action is taken from any other. The action names are `split_left`, `split_right`, `split_up`, `split_down`, `focus_left/right/up/down`, `resize_left/right/up/down`, `close_pane`, `zoom`, `copy`, `copy_or_interrupt`, `paste`, `find`, `copy_output`, `open_folder`, `font_bigger`, `font_smaller`, `font_reset`, `select_all`, `scroll_page_up`, `scroll_page_down`, `scroll_top`, `scroll_bottom`, `palette` and `settings`.

## Glass

The window is see-through, with the desktop behind it blurred by Windows. Panes are tinted glass with lit edges: a crisp rim (brightest where light hits from the top left) inside a dark hairline, so the edge reads over light and dark backgrounds alike, and a soft glow inside. The focused pane's rim takes the accent color (warm for Claude).

- `glass_opacity` (default `0.66`) sets how solid the panes are. Raise it if busy wallpapers make text hard to read.
- `glass = false` turns it off and brings back the solid look.

Windows 10 uses the compositor's blur. Windows 11 22H2 and later get the system acrylic backdrop, which hasn't been tested yet.