package miaou-driver-term

  1. Overview
  2. Docs

Module Miaou_driver_term.Term_size_detectionSource

Sourceval detect_size : unit -> LTerm_geom.size

Portable terminal size detection. Tries multiple methods in priority order: 1. Environment variables (MIAOU_TUI_ROWS, MIAOU_TUI_COLS) 2. Lambda-term direct query 3. stty size 4. tput 5. stty -a parsing Falls back to 24x80 if all methods fail.

Results are cached to avoid spawning subprocesses on every render. Call invalidate_cache on SIGWINCH to pick up terminal resize.

Sourceval invalidate_cache : unit -> unit

Invalidate the cached terminal size. Call this on SIGWINCH.