Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Minimum Real Estate Requirements

Overview

The app checks terminal dimensions at startup and refuses to run if the terminal is too small to render correctly. The minimums are stored in ~/.config/rstype.toml as min_cols and min_rows.


Per-screen analysis

ScreenMin widthMin heightNotes
Toolbarany1Always 1 row
Status barany1Always 1 row
Train475Text (43 chars) + box borders + blank lines
Train + progress bar478Box + progress + stats rows
Results528Fixed-size results box
Config6010Fixed-size config box
Calendar74237 cells × 10 chars + borders; 6 weeks × 3 rows + headers + borders

Overall minimum (most demanding screen: Calendar)

min_cols = 76    # 74 (calendar box) + 2 side margin
min_rows = 26    # 23 (calendar box) + 2 (toolbar + statusbar) + 1 top/bottom margin

These are the default values. They can be changed in ~/.config/rstype.toml:

mode = "forward"
min_cols = 76
min_rows = 26

Behaviour when terminal is too small

On startup, the app queries the terminal size. If either dimension is below the configured minimum, it prints an error to stderr and exits with code 1:

Error: terminal too small (current: 60×20, required: 76×26)

Rationale

  • Config option rather than hard-coded constant: allows users with small terminals to lower the minimum if they accept degraded rendering, and allows future screens with different requirements to raise it without code changes.
  • Startup check rather than per-frame: simpler, no need to handle the app being “paused” mid-session because the window was resized.