Better screenshot, yuzzit magic space
This commit is contained in:
@@ -209,7 +209,12 @@ def monitor_stats():
|
||||
cpu_percent = psutil.cpu_percent(interval=2)
|
||||
mem_percent = psutil.virtual_memory().percent
|
||||
battery = psutil.sensors_battery()
|
||||
temps = psutil.sensors_temperatures(fahrenheit=False).get('k10temp')
|
||||
all_temps = psutil.sensors_temperatures(fahrenheit=False)
|
||||
|
||||
temps = all_temps.get('k10temp', None)
|
||||
if temps is None:
|
||||
temps = all_temps.get('coretemp')
|
||||
|
||||
temp = max([x.current for x in temps if x.label != 'Tctl'])
|
||||
|
||||
temp_percent = 100 * min(max([temp - min_temp, 0]) / (max_temp - min_temp), 1)
|
||||
|
||||
Reference in New Issue
Block a user