aboutsummaryrefslogtreecommitdiff
path: root/hddtemp.lua
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2009-10-05 00:10:47 +0200
committerAdrian C. (anrxc) <anrxc@sysphere.org>2009-10-05 00:10:47 +0200
commit4602ca2fa5e8e2e408713f72ae7e4cd14480bc01 (patch)
treebfbf75b8afd738f5a036737404f3eafe87586c66 /hddtemp.lua
parentaf4e85f99d0ac63127f19640ef47d768d7bed7cd (diff)
downloadvicious-legacy-4602ca2fa5e8e2e408713f72ae7e4cd14480bc01.tar.xz
Lots of coding style changes
Diffstat (limited to 'hddtemp.lua')
-rw-r--r--hddtemp.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/hddtemp.lua b/hddtemp.lua
index 7bdb764..9e35b5f 100644
--- a/hddtemp.lua
+++ b/hddtemp.lua
@@ -6,6 +6,7 @@
-- {{{ Grab environment
local io = { popen = io.popen }
local setmetatable = setmetatable
+local string = { match = string.match }
-- }}}
@@ -23,7 +24,7 @@ local function worker(format, port)
local hdd_temp = {}
for line in f:lines() do
- local disk, temp = line:match("|([%/%a]+)|.*|([%d]+)|[CF]+|")
+ local disk, temp = string.match(line, "|([%/%a]+)|.*|([%d]+)|[CF]+|")
if disk ~= nil and temp ~= nil then
hdd_temp["{"..disk.."}"] = temp