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.pulse
|
||||
- provides volume levels of requested pulseaudio sinks and
|
||||
functions to manipulate them
|
||||
- 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
|
||||
the first-best
|
||||
- to get a list of available sinks use the command: pacmd
|
||||
list-sinks | grep 'name:'
|
||||
- returns 1st value as the volume level
|
||||
- vicious.contrib.pulse.add(percent, sink)
|
||||
- @percent is a number, which increments or decrements the volume
|
||||
level by its value in percent
|
||||
- @sink optional, same usage as in vicious.contrib.pulse
|
||||
- returns the exit status of pacmd
|
||||
- vicious.contrib.pulse.toggle(sink)
|
||||
- inverts the volume state (mute -> unmute; unmute -> mute)
|
||||
- @sink optional, same usage as in vicious.contrib.pulse
|
||||
- returns the exit status of pacmd
|
||||
**vicious.contrib.pulse**
|
||||
|
||||
Provides volume levels of requested pulseaudio sinks and functions to
|
||||
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
|
||||
the first-best
|
||||
* to get a list of available sinks use the command: pacmd
|
||||
list-sinks | grep 'name:'
|
||||
- Returns
|
||||
* returns 1st value as the volume level
|
||||
- vicious.contrib.pulse.add(percent, sink)
|
||||
* @percent is a number, which increments or decrements the volume
|
||||
level by its value in percent
|
||||
* @sink optional, same usage as in vicious.contrib.pulse
|
||||
* returns the exit status of pacmd
|
||||
- vicious.contrib.pulse.toggle(sink)
|
||||
* inverts the volume state (mute -> unmute; unmute -> mute)
|
||||
* @sink optional, same usage as in vicious.contrib.pulse
|
||||
* returns the exit status of pacmd
|
||||
|
||||
vicious.contrib.rss
|
||||
-
|
||||
|
|
|
@ -26,7 +26,7 @@ local math = {
|
|||
|
||||
-- Pulse: provides volume levels of requested pulseaudio sinks and methods to change them
|
||||
-- vicious.contrib.pulse
|
||||
local pulse = {}
|
||||
local pulse_all = {}
|
||||
|
||||
-- {{{ Helper function
|
||||
local function pacmd(args)
|
||||
|
@ -87,7 +87,7 @@ end
|
|||
-- }}}
|
||||
|
||||
-- {{{ Volume control helper
|
||||
function pulse.add(percent, sink)
|
||||
function pulse_all.add(percent, sink)
|
||||
sink = get_sink_name(sink)
|
||||
if sink == nil then return end
|
||||
|
||||
|
@ -106,7 +106,7 @@ function pulse.add(percent, sink)
|
|||
return os.execute(cmd)
|
||||
end
|
||||
|
||||
function pulse.toggle(sink)
|
||||
function pulse_all.toggle(sink)
|
||||
sink = get_sink_name(sink)
|
||||
if sink == nil then return end
|
||||
|
||||
|
@ -121,4 +121,4 @@ function pulse.toggle(sink)
|
|||
end
|
||||
-- }}}
|
||||
|
||||
return setmetatable(pulse, { __call = function(_, ...) return worker(...) end })
|
||||
return setmetatable(pulse_all, { __call = function(_, ...) return worker(...) end })
|
Loading…
Reference in New Issue