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
|
||||||
be interpret as an index, if no argument is given, it will take
|
|
||||||
the first-best
|
- Arguments
|
||||||
- to get a list of available sinks use the command: pacmd
|
* takes the name of a sink as an optional argument. a number will
|
||||||
list-sinks | grep 'name:'
|
be interpret as an index, if no argument is given, it will take
|
||||||
- returns 1st value as the volume level
|
the first-best
|
||||||
- vicious.contrib.pulse.add(percent, sink)
|
* to get a list of available sinks use the command: pacmd
|
||||||
- @percent is a number, which increments or decrements the volume
|
list-sinks | grep 'name:'
|
||||||
level by its value in percent
|
- Returns
|
||||||
- @sink optional, same usage as in vicious.contrib.pulse
|
* returns 1st value as the volume level
|
||||||
- returns the exit status of pacmd
|
- vicious.contrib.pulse.add(percent, sink)
|
||||||
- vicious.contrib.pulse.toggle(sink)
|
* @percent is a number, which increments or decrements the volume
|
||||||
- inverts the volume state (mute -> unmute; unmute -> mute)
|
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)
|
||||||
|
* 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
|
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