From 9c535a19bdd9c05259c57725af77a21a6d41851c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 22 Feb 2015 11:19:24 +0100 Subject: fix indentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörg Thalheim Signed-off-by: Adrian C. (anrxc) --- contrib/pulse.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/pulse.lua b/contrib/pulse.lua index 8b3298b..413b767 100644 --- a/contrib/pulse.lua +++ b/contrib/pulse.lua @@ -18,7 +18,7 @@ local string = { gmatch = string.gmatch } local math = { - floor = math.floor + floor = math.floor } -- }}} @@ -29,15 +29,15 @@ local pulse = {} -- {{{ Helper function local function pacmd(args) - local f = io.popen("pacmd "..args) - local line = f:read("*all") - f:close() - return line + local f = io.popen("pacmd "..args) + local line = f:read("*all") + f:close() + return line end local function escape(text) - local special_chars = { ["."] = "%.", ["-"] = "%-" } - return text:gsub("[%.%-]", special_chars) + local special_chars = { ["."] = "%.", ["-"] = "%-" } + return text:gsub("[%.%-]", special_chars) end local cached_sinks = {} @@ -47,10 +47,10 @@ local function get_sink_name(sink) local key = sink or 1 -- Cache requests if not cached_sinks[key] then - local line = pacmd("list-sinks") - for s in string.gmatch(line, "name: <(.-)>") do - table.insert(cached_sinks, s) - end + local line = pacmd("list-sinks") + for s in string.gmatch(line, "name: <(.-)>") do + table.insert(cached_sinks, s) + end end return cached_sinks[key] @@ -69,7 +69,7 @@ local function worker(format, sink) -- If mute return 0 (not "Mute") so we don't break progressbars if string.find(data,"set%-sink%-mute "..escape(sink).." yes") then - return {0, "off"} + return {0, "off"} end local vol = tonumber(string.match(data, "set%-sink%-volume "..escape(sink).." (0x[%x]+)")) -- cgit v1.2.3