mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-21 09:55:39 +02:00
Add initial pulseaudio module support
This seems to work quite well including hotplugging of devices, changes to default sinks/sources etc. So far I only provided percentage values for sink/source since they seem most useful. Defaults are set to DEFAULT_SINK/DEFAULT_SOURCE which means it will follow whatever defaults are at the moment (instead of being fixed to a given device). One thing currently left unhandled is when pulseaudio/pipewire gets disconnected/restarted. In such a case we mark the sink/source as offline but there is no reconnect attempted later. Added man page + more complex example which includes mixed usage of both input and output.
This commit is contained in:
parent
6250360c58
commit
04d47cba3c
8 changed files with 566 additions and 2 deletions
|
@ -9,6 +9,7 @@ foreach man_src : ['yambar.1.scd', 'yambar.5.scd', 'yambar-decorations.5.scd',
|
|||
'yambar-modules-foreign-toplevel.5.scd',
|
||||
'yambar-modules-i3.5.scd', 'yambar-modules-label.5.scd',
|
||||
'yambar-modules-mpd.5.scd', 'yambar-modules-network.5.scd',
|
||||
'yambar-modules-pulse.5.scd',
|
||||
'yambar-modules-removables.5.scd', 'yambar-modules-river.5.scd',
|
||||
'yambar-modules-script.5.scd', 'yambar-modules-sway-xkb.5.scd',
|
||||
'yambar-modules-sway.5.scd', 'yambar-modules-xkb.5.scd',
|
||||
|
|
62
doc/yambar-modules-pulse.5.scd
Normal file
62
doc/yambar-modules-pulse.5.scd
Normal file
|
@ -0,0 +1,62 @@
|
|||
yambar-modules-pulse(5)
|
||||
|
||||
# NAME
|
||||
pulse - Monitors one pulseaudio source and sink for volume and mute/unmute changes
|
||||
|
||||
# TAGS
|
||||
|
||||
[[ *Name*
|
||||
:[ *Type*
|
||||
:[ *Description*
|
||||
| online
|
||||
: bool
|
||||
: True when the Pulseaudio connection has successfully been opened
|
||||
| sink_online
|
||||
: bool
|
||||
: True when the Pulseaudio sink (output) exists and is usable
|
||||
| source_online
|
||||
: bool
|
||||
: True when the Pulseaudio source (input) exists and is usable
|
||||
| sink_percent
|
||||
: range
|
||||
: Sink (output) volume level in percentage, with min and max as start and end range values
|
||||
| source_percent
|
||||
: range
|
||||
: Source (input) volume level in percentage, with min and max as start and end range values
|
||||
| sink_muted
|
||||
: bool
|
||||
: True if sink is muted, otherwise false
|
||||
| source_muted
|
||||
: bool
|
||||
: True if source is muted, otherwise false
|
||||
|
||||
|
||||
# CONFIGURATION
|
||||
|
||||
[[ *Name*
|
||||
:[ *Type*
|
||||
:[ *Req*
|
||||
:[ *Description*
|
||||
| sink_name
|
||||
: string
|
||||
: no
|
||||
: Sink name to monitor. Defaults to _@DEFAULT\_SINK@_
|
||||
| source_name
|
||||
: string
|
||||
: no
|
||||
: Source name to monitor. Defaults to _@DEFAULT\_SOURCE@_
|
||||
|
||||
|
||||
# EXAMPLES
|
||||
|
||||
```
|
||||
bar:
|
||||
left:
|
||||
- pulse:
|
||||
content: {string: {text: "{sink_percent} %"}}
|
||||
```
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
*yambar-modules*(5), *yambar-particles*(5), *yambar-tags*(5), *yambar-decorations*(5)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue