Terminal

grüt includes an embedded terminal panel so you can run shell commands without leaving the explorer. Switch between normal navigation and command input with a single keystroke.

Overview

The terminal panel starts a shell process (cmd.exe on Windows, $SHELL on Linux/macOS) and pipes input and output directly inside the TUI. Output is displayed in a scrollable buffer with configurable scrollback depth.

Modes

The terminal operates in two modes:

  • Normal mode — scroll through output with j/k. Press i or Enter to switch to insert mode and start typing commands.
  • Insert mode — type commands directly into the shell. Press the prefix key (Ctrl+B by default) to return to normal mode.

Keybindings

Terminal — Normal Mode

KeyAction
i / EnterEnter insert mode (start typing)
j / kScroll output down / up
GJump to bottom of output
gJump to top of output

Terminal — Insert Mode

KeyAction
Ctrl+BExit insert mode (configurable prefix key)
EnterExecute command
Ctrl+CSend interrupt signal

Scrollback Buffer

Terminal output is kept in a line buffer with a configurable maximum. When the buffer fills, the oldest lines are discarded. The render loop is throttled to approximately 30 fps so rapid output doesn't block the rest of the UI.

Configuration Reference

[terminal]
shell = ""            # Shell to launch (default: cmd.exe or $SHELL)
scrollback = 1000     # Maximum output lines to retain
render_fps = 30       # Render frame rate
prefix_key = "ctrl+b" # Key to exit insert mode

Related