-
-
Notifications
You must be signed in to change notification settings - Fork 720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] - Split pulseaudio module into sink and source modules #925
Comments
Any progress on this? Currently, there is no way to control the the source (microphone) volume using waybar. Scrolling on any pulseaudio module results in changing the sink (speaker) volume, which is very unintuitive IMO. |
@subnut Controlling source volume works for me when repeating the module twice. {
...
"pulseaudio#input": {
"format-source": "",
"format-source-muted": "",
"format": "{format_source}",
"on-click": "volume.sh input-mute",
"on-scroll-up": "volume.sh input-up",
"on-scroll-down": "volume.sh input-down",
"tooltip": false
},
"pulseaudio#output": {
"format": "{volume} {icon}",
"format-icons": {
"default": [
"",
"",
"",
""
]
},
"on-click": "volume.sh mute",
"on-scroll-up": "volume.sh up",
"on-scroll-down": "volume.sh down",
"scroll-step": 1,
"tooltip": false
},
...
} |
Thanks for that - it's not a complete solution though since both will be styled 'muted' whenever the sink is; ignoring the state of the source. |
@OJFord You can use #pulseaudio.input.source-muted {
background: red;
} |
Thanks @subnut, (though that should be |
Does this work now? In my testing it does not. |
Thanks to the comments above, I was able to control the style of the icons for input and output separately. Here's my "modules-right": [
"pulseaudio#output",
"pulseaudio#input",
],
"pulseaudio#input": {
"format-source": "<span size='large'></span>",
"format-source-muted": "<span size='large'></span>",
"format": "{format_source}"
},
"pulseaudio#output": {
"format": "<span size='large'>{icon}</span> {volume}%",
"format-muted": "<span size='large'> </span>",
"format-bluetooth": "<span size='large'>{icon}</span> {volume}% <span size='large'>{format_source}</span>",
"format-icons": {
"headphone": "",
"headset": "",
"phone": "",
"hdmi": "",
"default": ["", "", ""]
},
"on-click": "$HOME/.config/waybar/scripts/module-actions/pulseaudio click-left",
"on-click-right": "$HOME/.config/waybar/scripts/module-actions/pulseaudio click-right",
"on-click-middle": "$HOME/.config/waybar/scripts/module-actions/pulseaudio click-middle",
"on-scroll-up": "$HOME/.config/waybar/scripts/module-actions/pulseaudio scroll-up",
"on-scroll-down": "$HOME/.config/waybar/scripts/module-actions/pulseaudio scroll-down",
"smooth-scrolling-threshold": 5
}, ...and #pulseaudio.input.source-muted {
color: @fg-inactive;
background: @bg-inactive;
}
#pulseaudio.output.muted {
color: @fg-inactive;
background: @bg-inactive;
} |
Just adding an alternative solution -- to change the text color based on the muted status of sink/source separately, one can also use Pango markup in the
Pango markup docs: https://docs.gtk.org/Pango/pango_markup.html |
Hi, most of all, thanks for all the work on waybar.
For most mobile system the way the pulseaudio module currently works is perfectly practical, but as soon as you start using multiple sinks and sources you run into configuration problems. That's why I wanted to ask if it was feasible to split it into separate modules for sink and source and make the actual device it's referring to configurable and just use default/fallback if no device is specified by the user.
That way you could also have separate left-, middle-, right-click and on-scroll actions for sinks and sources.
The text was updated successfully, but these errors were encountered: