diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-03-15 17:54:00 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-03-15 17:54:00 +0100 |
commit | f50ad217ea8db1f21ef6561ec01e4bae387273e5 (patch) | |
tree | b24f30da4b76adb14d0fff9ce0b9ff5393b86249 /widgets/thermal.lua | |
parent | 4f86e28ec38cd9f53718e0b34c6d9f15de99fb23 (diff) | |
download | vicious-legacy-f50ad217ea8db1f21ef6561ec01e4bae387273e5.tar.xz |
thermal: function argument is already local
Diffstat (limited to 'widgets/thermal.lua')
-rw-r--r-- | widgets/thermal.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/widgets/thermal.lua b/widgets/thermal.lua index 6ba8c69..4d837c8 100644 --- a/widgets/thermal.lua +++ b/widgets/thermal.lua @@ -25,10 +25,11 @@ local function worker(format, warg) ["core"] = {"/sys/devices/platform/", file = "temp1_input",div = 1000}, ["proc"] = {"/proc/acpi/thermal_zone/",file = "temperature"} } -- Default to /sys/class/thermal - local warg = type(warg) == "table" and warg or {warg, "sys"} - local thermal = helpers.pathtotable(zone[warg[2]][1] .. warg[1]) + warg = type(warg) == "table" and warg or { warg, "sys" } -- Get temperature from thermal zone + local thermal = helpers.pathtotable(zone[warg[2]][1] .. warg[1]) + if thermal[zone[warg[2]].file] then if zone[warg[2]].div then return {thermal[zone[warg[2]].file] / zone[warg[2]].div} |