Module tui

Module tui 

Source
Expand description

Terminal user interface. TUI module for nrs.

Provides the terminal user interface for interactive script selection.

Modules§

widgets
Custom widgets for the TUI.

Structs§

App
Main application state.
GridLayout
Calculate grid layout for scripts.
MainLayout
Main layout areas.
ScriptRun
Information about a script to run after TUI exits.
TerminalGuard
RAII guard for terminal state. Ensures terminal is properly restored even on panic.
Theme
Color theme for the TUI.

Enums§

AppMode
Application mode/state.

Constants§

MIN_HEIGHT
MIN_WIDTH
Minimum terminal dimensions.

Functions§

calculate_column_width
Calculate column width for the scripts grid.
calculate_columns
Calculate grid columns based on terminal width.
centered_rect
Create a centered rectangle for popups/overlays.
centered_rect_fixed
Create a fixed-size centered rectangle for popups/overlays.
handle_event
Handle a terminal event.
render
Render the complete UI.
restore_terminal
Restore terminal to normal state. Call this before running external commands.
run_tui
Run the TUI application.