From d81eed6d310bce28b3709980d80c433a04eefaae Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Mon, 5 Oct 2009 00:10:47 +0200 Subject: Lots of coding style changes --- mpd.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mpd.lua') 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 -- cgit v1.2.3