From 8e35a983bf24f6f90df4630b2b55409f0ca1d213 Mon Sep 17 00:00:00 2001 From: Arvydas Sidorenko Date: Fri, 15 Jun 2012 20:48:17 +0200 Subject: Ported vicious.contrib to lua 5.2 Signed-off-by: Arvydas Sidorenko Signed-off-by: Adrian C. (anrxc) --- contrib/pulse.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'contrib/pulse.lua') diff --git a/contrib/pulse.lua b/contrib/pulse.lua index 4b0260f..8b3298b 100644 --- a/contrib/pulse.lua +++ b/contrib/pulse.lua @@ -24,7 +24,8 @@ local math = { -- Pulse: provides volume levels of requested pulseaudio sinks and methods to change them -module("vicious.contrib.pulse") +-- vicious.contrib.pulse +local pulse = {} -- {{{ Helper function local function pacmd(args) @@ -79,7 +80,7 @@ end -- }}} -- {{{ Volume control helper -function add(percent, sink) +function pulse.add(percent, sink) sink = get_sink_name(sink) if sink == nil then return end @@ -96,7 +97,7 @@ function add(percent, sink) return os.execute(cmd) end -function toggle(sink) +function pulse.toggle(sink) sink = get_sink_name(sink) if sink == nil then return end @@ -111,4 +112,4 @@ function toggle(sink) end -- }}} -setmetatable(_M, { __call = function(_, ...) return worker(...) end }) +return setmetatable(pulse, { __call = function(_, ...) return worker(...) end }) -- cgit v1.2.3