amanusk / s-tui

Terminal-based CPU stress and monitoring utility
https://amanusk.github.io/s-tui/
GNU General Public License v2.0
4.01k stars 139 forks source link

Add an option to command line to set refresh_rate at launch #196

Closed SchDvr closed 1 year ago

SchDvr commented 1 year ago

This pull request adds the possibility to set the refresh rate from the command line, at launch. This can be useful for integrating s-tui in an automated workflow. Thanks to the well designed code, only a few changes were necessary.

The default value is still 2.0. I tested the following:

$ s-tui -r1
$ s-tui -r0.5
$ s-tui -r.5

All work as expected.

PS : Thank you for this great monitoring tool !

amanusk commented 1 year ago

Thank you for the PR! Looks good. Merging :)