Skip to content

Conversation

@cgevans
Copy link

@cgevans cgevans commented Dec 16, 2025

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:

  • Since there was already a commented out "Alerts" section, I used that. I'm not sure if there's a preferred term here for Cosmic (if I recall, Pipewire uses the Alert media-role for something else).
  • I added the slider at the top here, but it could equally well go at the bottom. The awkwardness of it being at the bottom is that it would be away from the other volume sliders, and underneath "Device profiles"; as Device profiles currently has no heading, and applies to both Output and Input, the arrangement would be a bit awkward, as it might make Device profiles seem like it was part of Input. There may be better options here I'm not thinking of at the moment.

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.
@cgevans cgevans marked this pull request as ready for review December 17, 2025 19:08
@cgevans
Copy link
Author

cgevans commented Dec 17, 2025

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 jacobgkau requested review from a team December 17, 2025 19:48
Copy link
Member

@jacobgkau jacobgkau left a 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:

Image

@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.

@jacobgkau jacobgkau requested a review from a team December 17, 2025 20:18
@cgevans
Copy link
Author

cgevans commented Dec 17, 2025

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:

  • Pipewire has multiple media roles that could have volumes set. Notification is important because Cosmic itself uses them, but some systems also use things like Alarm or Music. I don't think any of them are necessarily important here, however.
  • Per-app volume adjustment is of course possible, and things like pavucontrol support it.
  • Right now the sounds panel has only one output and one input controllable, but it could alternatively make sense to have controls for all/some outputs and inputs, with the user might be using. If there were multiple volumes, having the alerts there might be confusing. But while I often do actually need to control multiple volumes, I feel like this might be more something for separate, specialized applications, with the settings here left for default output/input; that might also apply to per-app adjustment.
  • The Alerts Volume here is an adjustment to the output volume, so alerts become quieter when the output volume is turned down. This might actually suggest that having it in the Output section would be preferable. It also might be best to make this clear somehow, as it differs from, eg, the Android role-based volumes. I'm just not sure of what wording would be best. "Alert volume adjustment" doesn't quite work for me.

@jacobgkau
Copy link
Member

jacobgkau commented Dec 17, 2025

Right now the sounds panel has only one output and one input controllable, but it could alternatively make sense to have controls for all/some outputs and inputs, with the user might be using. If there were multiple volumes, having the alerts there might be confusing. But while I often do actually need to control multiple volumes, I feel like this might be more something for separate, specialized applications, with the settings here left for default output/input; that might also apply to per-app adjustment.

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.)

The Alerts Volume here is an adjustment to the output volume, so alerts become quieter when the output volume is turned down. This might actually suggest that having it in the Output section would be preferable. It also might be best to make this clear somehow, as it differs from, eg, the Android role-based volumes. I'm just not sure of what wording would be best. "Alert volume adjustment" doesn't quite work for me.

This is a good thing to keep in mind, but I don't think we need to overthink it, personally. Somehow visually nesting the Alerts volume slider underneath the Output volume slider would make what you're talking about clear. But I don't think adding the word "adjustment" would make clear what you're trying to communicate (someone reading it with no context could just think you mean adjusting the alert volume in the general sense, not having anything to do with the output volume).

@cgevans
Copy link
Author

cgevans commented Dec 19, 2025

Here it is directly under the output volume:

image

And here it is with a \t before the title to indent it:

image

I think the indentation works, but I'm not sure it's used anywhere else, so it might be something to be cautious about.

@cgevans
Copy link
Author

cgevans commented Dec 19, 2025

Also, I ran cargo fmt, but it caused unrelated changes to cosmic-settings/src/pages/system/info.rs, the same formatting that caused the CI failure for the previous commit.

@jacobgkau
Copy link
Member

Thanks for posting screenshots of what those other configurations would look like. I'll wait for @pop-os/ux to check in on this.

@maria-komarova
Copy link
Contributor

maria-komarova commented Dec 19, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants