'file' attribute of 'temp' class changed to a setting
This commit is contained in:
parent
774e38561c
commit
b97279bab1
@ -889,7 +889,7 @@ Settings:
|
||||
:format: format string used for output. {temp} is the temperature in degrees celsius (default: ``{temp} °C``)
|
||||
:color: (default: ``#FFFFFF``)
|
||||
:interval: (default: ``5``)
|
||||
|
||||
:file: file where the temperature is read from
|
||||
|
||||
|
||||
text
|
||||
|
@ -15,12 +15,11 @@ class Temperature(IntervalModule):
|
||||
("format",
|
||||
"format string used for output. {temp} is the temperature in degrees celsius"),
|
||||
"color",
|
||||
"file",
|
||||
)
|
||||
format = "{temp} °C"
|
||||
color = "#FFFFFF"
|
||||
|
||||
def init(self):
|
||||
self.file = "/sys/class/thermal/thermal_zone0/temp"
|
||||
file = "/sys/class/thermal/thermal_zone0/temp"
|
||||
|
||||
def run(self):
|
||||
with open(self.file, "r") as f:
|
||||
|
Loading…
Reference in New Issue
Block a user