From b97279bab127f4e7b50e0aef5843f32464b9bee3 Mon Sep 17 00:00:00 2001 From: tomasm Date: Wed, 9 Jul 2014 17:14:44 +0000 Subject: [PATCH] 'file' attribute of 'temp' class changed to a setting --- README.rst | 2 +- i3pystatus/temp.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) 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: