aboutsummaryrefslogtreecommitdiff
path: root/mpd.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 /mpd.lua
parentaf4e85f99d0ac63127f19640ef47d768d7bed7cd (diff)
downloadvicious-legacy-4602ca2fa5e8e2e408713f72ae7e4cd14480bc01.tar.xz
Lots of coding style changes
Diffstat (limited to 'mpd.lua')
-rw-r--r--mpd.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/mpd.lua b/mpd.lua
index 73412eb..350858f 100644
--- a/mpd.lua
+++ b/mpd.lua
@@ -8,6 +8,7 @@
local io = { popen = io.popen }
local setmetatable = setmetatable
local helpers = require("vicious.helpers")
+local string = { find = string.find }
-- }}}
@@ -23,7 +24,8 @@ local function worker(format)
f:close()
-- Check if it's stopped, off or not installed
- if np == nil or (np:find("MPD_HOST") or np:find("volume:")) then
+ if np == nil
+ or (string.find(np, "MPD_HOST") or string.find(np, "volume:")) then
return {"Stopped"}
end
@@ -31,7 +33,7 @@ local function worker(format)
local nowplaying = helpers.escape(np)
-- Don't abuse the wibox, truncate
- local nowplaying = helpers.truncate(nowplaying, 30)
+ nowplaying = helpers.truncate(nowplaying, 30)
return {nowplaying}
end