-
Notifications
You must be signed in to change notification settings - Fork 172
feat: add control for alerts volume/mute (fixes #1017) #1653
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
base: master
Are you sure you want to change the base?
Conversation
Using an approach based on the System Sounds setting in pavucontrol, this gets and sets route-settings metadata that adjusts the volume of media with the Notification media-role.
|
I've now tested this with a new user, and it seems like it works without a problem. It will create the metadata if it doesn't already exist, with a 100% volume setting (the current default anyway). My only concern is if there's no route-settings metadata at all, but I'm not sure if that's possible? |
jacobgkau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what this currently looks like:
@pop-os/ux Do you have thoughts on this? This is a slider controlling the volume of system sounds (e.g. the volume adjustment blip).
It does seem like something that could just be part of the Output section since it's controlling the volume of sounds being output, but not sure if we have any future plans for e.g. per-app volume adjustment, which is where this would really fit in.
|
From my perspective: I hadn't thought about having the control in the outputs section; that could make sense, especially as there is currently only one output volume in output. But there are perhaps wider questions:
|
Yeah, I think the decision's been made to generally keep it to one default output device and one default input device for now. It's possible to configure volumes for various devices, but COSMIC Settings currently only aims to configure volumes for the devices set as the defaults. (Some apps can use and configure non-default devices themselves.)
This is a good thing to keep in mind, but I don't think we need to overthink it, personally. Somehow visually nesting the |
|
Also, I ran cargo fmt, but it caused unrelated changes to |
|
Thanks for posting screenshots of what those other configurations would look like. I'll wait for @pop-os/ux to check in on this. |
|
As to how we can call it, maybe "System alerts" or "System sounds"? Regarding placement we probably shouldn't overthink it. I checked what other systems are doing in their UI and system alerts are in a separate section even though they are controlled by the output volume slider. So shouldn't be an unexpected behavior. That said I don't have many objections to placing the slider under Output other than the examples of other systems and the potential future features. For example, options for alert sounds. But since there is no definite plan to have those right now it's probably okay to keep the setting under Output. No need to indent though since this raises more questions than serves to explain. |


Using an approach based on the System Sounds setting in pavucontrol, this gets and sets route-settings metadata that adjusts the volume of media with the Notification media-role.
This works for me. However, I suspect that it may only be working because pavucontrol has already added the right metadata for this code to modify. I'm also not sure that my handling of finding the metadata is the best approach. I'm leaving this as a draft for now until I can test it in a way that avoids the potential for the route-settings already being there.
Some other points I'm unsure of: