diff --git a/README.rst b/README.rst index 491e000..75fb200 100644 --- a/README.rst +++ b/README.rst @@ -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 diff --git a/i3pystatus/temp.py b/i3pystatus/temp.py index 0a62bfb..4639ccf 100644 --- a/i3pystatus/temp.py +++ b/i3pystatus/temp.py @@ -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: