diff --git a/system-status.py b/system-status.py index 5c5687f..3a20a0a 100644 --- a/system-status.py +++ b/system-status.py @@ -106,10 +106,12 @@ class SystemStatus: adjusted = max(0, temp - MIN_TEMP) percent = min(1, adjusted / (MAX_TEMP - MIN_TEMP)) - return round(self.height * percent) + return max(1, round(self.height * percent)) def getCpuValue(self): - return round(self.height * (psutil.cpu_percent() / 100)) + percent = psutil.cpu_percent() / 100 + + return round(self.height * percent) def getNetworkValue(self): connections = psutil.net_connections(kind='inet')