Sort id of HDD & fan
This commit is contained in:
6
sysFanTemp.py
Normal file → Executable file
6
sysFanTemp.py
Normal file → Executable file
@@ -1,3 +1,5 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import hddtemp
|
||||
import cpufantemp
|
||||
from rich.console import Console
|
||||
@@ -40,7 +42,7 @@ def buildTable_HddTemperature():
|
||||
"style": "magenta",
|
||||
},
|
||||
],
|
||||
[[f"{hddKey}", f"{hddtempDict[hddKey].get('temp', -999.9)}°C"] for hddKey in hddtempDict.keys()]
|
||||
[[f"{hddKey}", f"{hddtempDict[hddKey].get('temp', -999.9)}°C"] for hddKey in sorted(hddtempDict.keys())]
|
||||
)
|
||||
return table
|
||||
|
||||
@@ -82,7 +84,7 @@ def buildTable_FanSpeed():
|
||||
"style": "magenta",
|
||||
},
|
||||
],
|
||||
[[f"{fanKey}", f"{fanTempDict['fan'][fanKey]}"] for fanKey in fanTempDict["fan"].keys()]
|
||||
[[f"{fanKey}", f"{fanTempDict['fan'][fanKey]}"] for fanKey in sorted(fanTempDict["fan"].keys())]
|
||||
)
|
||||
return table
|
||||
|
||||
|
||||
Reference in New Issue
Block a user