diff options
author | Arvydas Sidorenko <asido4@gmail.com> | 2012-06-15 20:48:17 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2012-06-18 01:27:53 +0200 |
commit | 8e35a983bf24f6f90df4630b2b55409f0ca1d213 (patch) | |
tree | bec2a7d44b7994c299e82c2348740a11ffeb71a6 /contrib/pulse.lua | |
parent | 41cc2c0e27e6a0860d21754ed9d13f6cd61254ac (diff) | |
download | vicious-legacy-8e35a983bf24f6f90df4630b2b55409f0ca1d213.tar.xz |
Ported vicious.contrib to lua 5.2
Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Diffstat (limited to 'contrib/pulse.lua')
-rw-r--r-- | contrib/pulse.lua | 9 |
1 files changed, 5 insertions, 4 deletions
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 }) |