Add sys_monitor.lua example demonstrating live terminal rendering#236
Add sys_monitor.lua example demonstrating live terminal rendering#236Gitkbc wants to merge 1 commit into
Conversation
|
@Tieske Sir, Just wanted to share some thoughts on the motivation behind this! While this example is mainly for demonstration purposes (showcasing a real-time rendering loop with progress bars using terminal.initwrap()), I was thinking about a possible future direction. Turning the system monitoring concept (CPU + memory usage) into a reusable utility or widget (for example, terminal.widgets.system_monitor or a simple status bar). This could allow TUI developers to easily display live resource usage inside their interfaces. For instance, before starting a heavy operation like installing large packages or libraries, the application could show current RAM/CPU usage as a "gateway" step. This would help improve UX and reduce the risk of out-of-memory crashes or stalls during resource-intensive tasks. In real-world scenarios, memory exhaustion is common when running multiple heavy processes or installing large dependencies. A built-in, lightweight monitoring component could help developers create more reliable TUIs. I'd love to hear your thoughts as well as get suggestions on this. If you feel this is a valid feature, I would be more than happy to open an issue and submit a PR to implement it. |
Adds a minimal system monitor example (examples/sys_monitor.lua) demonstrating real-time terminal rendering with terminal.lua.
Key Features
Notes