move pulse widget to new layout
This commit is contained in:
parent
f63ab23583
commit
bd08badccc
|
@ -117,24 +117,28 @@ vicious.contrib.ossvol
|
||||||
vicious.contrib.pop
|
vicious.contrib.pop
|
||||||
-
|
-
|
||||||
|
|
||||||
vicious.contrib.pulse
|
**vicious.contrib.pulse**
|
||||||
- provides volume levels of requested pulseaudio sinks and
|
|
||||||
functions to manipulate them
|
Provides volume levels of requested pulseaudio sinks and functions to
|
||||||
- takes the name of a sink as an optional argument. a number will
|
manipulate them
|
||||||
|
|
||||||
|
- Arguments
|
||||||
|
* takes the name of a sink as an optional argument. a number will
|
||||||
be interpret as an index, if no argument is given, it will take
|
be interpret as an index, if no argument is given, it will take
|
||||||
the first-best
|
the first-best
|
||||||
- to get a list of available sinks use the command: pacmd
|
* to get a list of available sinks use the command: pacmd
|
||||||
list-sinks | grep 'name:'
|
list-sinks | grep 'name:'
|
||||||
- returns 1st value as the volume level
|
- Returns
|
||||||
- vicious.contrib.pulse.add(percent, sink)
|
* returns 1st value as the volume level
|
||||||
- @percent is a number, which increments or decrements the volume
|
- vicious.contrib.pulse.add(percent, sink)
|
||||||
|
* @percent is a number, which increments or decrements the volume
|
||||||
level by its value in percent
|
level by its value in percent
|
||||||
- @sink optional, same usage as in vicious.contrib.pulse
|
* @sink optional, same usage as in vicious.contrib.pulse
|
||||||
- returns the exit status of pacmd
|
* returns the exit status of pacmd
|
||||||
- vicious.contrib.pulse.toggle(sink)
|
- vicious.contrib.pulse.toggle(sink)
|
||||||
- inverts the volume state (mute -> unmute; unmute -> mute)
|
* inverts the volume state (mute -> unmute; unmute -> mute)
|
||||||
- @sink optional, same usage as in vicious.contrib.pulse
|
* @sink optional, same usage as in vicious.contrib.pulse
|
||||||
- returns the exit status of pacmd
|
* returns the exit status of pacmd
|
||||||
|
|
||||||
vicious.contrib.rss
|
vicious.contrib.rss
|
||||||
-
|
-
|
||||||
|
|
|
@ -26,7 +26,7 @@ local math = {
|
||||||
|
|
||||||
-- Pulse: provides volume levels of requested pulseaudio sinks and methods to change them
|
-- Pulse: provides volume levels of requested pulseaudio sinks and methods to change them
|
||||||
-- vicious.contrib.pulse
|
-- vicious.contrib.pulse
|
||||||
local pulse = {}
|
local pulse_all = {}
|
||||||
|
|
||||||
-- {{{ Helper function
|
-- {{{ Helper function
|
||||||
local function pacmd(args)
|
local function pacmd(args)
|
||||||
|
@ -87,7 +87,7 @@ end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Volume control helper
|
-- {{{ Volume control helper
|
||||||
function pulse.add(percent, sink)
|
function pulse_all.add(percent, sink)
|
||||||
sink = get_sink_name(sink)
|
sink = get_sink_name(sink)
|
||||||
if sink == nil then return end
|
if sink == nil then return end
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ function pulse.add(percent, sink)
|
||||||
return os.execute(cmd)
|
return os.execute(cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
function pulse.toggle(sink)
|
function pulse_all.toggle(sink)
|
||||||
sink = get_sink_name(sink)
|
sink = get_sink_name(sink)
|
||||||
if sink == nil then return end
|
if sink == nil then return end
|
||||||
|
|
||||||
|
@ -121,4 +121,4 @@ function pulse.toggle(sink)
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
return setmetatable(pulse, { __call = function(_, ...) return worker(...) end })
|
return setmetatable(pulse_all, { __call = function(_, ...) return worker(...) end })
|
Loading…
Reference in New Issue