diff options
author | Jörg Thalheim <joerg@higgsboson.tk> | 2015-02-22 11:19:24 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2015-03-28 19:45:44 +0100 |
commit | 9c535a19bdd9c05259c57725af77a21a6d41851c (patch) | |
tree | bafac52ae31e2908ead18933cd06b25ae1779199 /contrib | |
parent | 340883180dcfdc91ee201001f2fc4ccb9c949728 (diff) | |
download | vicious-legacy-9c535a19bdd9c05259c57725af77a21a6d41851c.tar.xz |
fix indentation
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/pulse.lua | 24 |
1 files 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]+)")) |