amanusk / s-tui

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

Set default threshold to self.THRESHOLD_TEMP #89

Closed mkesper closed 5 years ago

mkesper commented 5 years ago

If no custom threshold is set we need something to compare to.

amanusk commented 5 years ago

The value of temp_thresh is currently used for 2 things, triggering a hook that invokes a script, and for some "eye candy" which changes the temperature graph to red. By default, this is chosen to be the value of high returned by psutil.sensors_temperatures(). It is possible for this value to be None if it is not available. Currently, some places use THRESHOLD_TEMP, which is set to 80 degrees. This is an arbitrary value, but it is better if it is consistent.

mkesper commented 5 years ago

New commit, combining possible errors. Fixed whitespace...

amanusk commented 5 years ago

Sorry for the long delay. This looks good. I will review and approve this shortly.

amanusk commented 5 years ago

@mkesper thank you for you contribution. Now merged.

mkesper commented 5 years ago

Thanks a lot!