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.
- Grid
Layout - Calculate grid layout for scripts.
- Main
Layout - Main layout areas.
- Script
Run - Information about a script to run after TUI exits.
- Terminal
Guard - 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.