Source: factory.core/ObjTUI.py
Maps ObjPalette semantic colors to TUI display roles.
All fields are Rich-compatible color strings (named colors or #rrggbb hex).
Instantiate via TuiTheme.from_palette() or use the default dataclass values.
| Method | Signature | Description |
|---|---|---|
| panel_style | panel_style() -> str |
Rich style string for panel interior background, or '' if not set. |
| cell | cell(fg: str) -> str |
Combine a foreground colour with the panel background for table cells. |
| from_palette | from_palette(cls, colors: Dict[str, str]) -> 'TuiTheme' |
Build a theme from an ObjPalette.read() color dict. |
| load | load(cls, palette_name: str = '') -> 'TuiTheme' |
Try to load the active palette from ObjPalette; fall back to defaults. |
Manages a Terminal User Interface using rich.layout and rich.live.
| Method | Signature | Description |
|---|---|---|
| start | start() |
Starts the TUI in a background thread. |
| stop | stop() |
Stops the TUI and restores stdout. |
| write | write(text: str) |
Captures stdout and adds it to the console messages. |
| flush | flush() |
Flush method to satisfy the file-like object requirement. |
| set_status | set_status(message: str) |
Sets the status message in the footer. |
Captures raw stdout/stderr writes and routes them into a TUI log.
Replaces sys.stdout / sys.stderr while a Rich Live display is active so
that print() and other raw writes never reach the terminal directly —
preventing the flicker that would result from mixing Raw writes with a
...
| Method | Signature | Description |
|---|---|---|
| write | write(data: str) -> int |
|
| flush | flush() -> None |
|
| isatty | isatty() -> bool |
|
| fileno | fileno() -> int |
Buffers Rich write() calls for one refresh and flushes them atomically.
Rich's Live display sends many small write() calls per refresh cycle.
The terminal emulator renders each one immediately, producing visible
intermediate states (flicker). By collecting every write into a
...
| Method | Signature | Description |
|---|---|---|
| begin | begin() -> None |
|
| end | end() -> None |
|
| write | write(s: str) -> int |
|
| flush | flush() -> None |
|
| isatty | isatty() -> bool |
|
| fileno | fileno() -> int |
Return True if a Rich full-screen TUI can be safely started.
Return a Rich Text neofetch-style aXion logo using theme colors.
Print a one-time startup banner for the named service.