Skip to content

Implement media volume handling#2557

Open
Scrumplex wants to merge 3 commits intonoctalia-dev:mainfrom
Scrumplex:feat/media-volume
Open

Implement media volume handling#2557
Scrumplex wants to merge 3 commits intonoctalia-dev:mainfrom
Scrumplex:feat/media-volume

Conversation

@Scrumplex
Copy link
Copy Markdown
Contributor

@Scrumplex Scrumplex commented Apr 25, 2026

Pull Request

Motivation

I used to change my media volume by scrolling over my MPD component when I was
using waybar.

This adds that behavior to MediaMini and hooks the media volume up to OSD.

Type of Change

Mark the relevant option with an "x".

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring

Related Issue

  • Closes #(issue number) (if any)

Testing

I was running my code and used mpdris2 to change the volume of my music. It
works in both directions, so changes through mpc get shown in the OSD and vice
versa.

Note that Quickshell exposes volume and volumeSupported. I have not tested how this behaves with volumeSupported = false

See https://github.com/noctalia-dev/noctalia-qs/blob/75d180c28a9ab4470e980f3d6f706ad6c5213add/src/services/mpris/player.hpp#L147-L149

  • Tested on niri
  • Tested on Hyprland
  • Tested on sway
  • Tested with different bar positions and density settings
  • Tested at different interface scaling values
  • Tested with multiple monitors (if applicable)

Screenshots / Videos

If applicable, include screenshots or videos to help illustrate your changes.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my code
  • No new warnings or errors
  • Documentation or comments updated (if relevant)

Additional Notes

I think this should have other icons in the OSD, but I wasn't sure how to add
new icons to the ttf. At the same time, Tabler does not have any other volume
icons, though we could use music and music-off kinda like how the input
volume OSD works.
I chose to use music and music-off

One oddity I noticed is that onWheel of MouseArea gives different values
than onWheel of Item (as used in the Volume widget). The magic number 120
probably needs to be tweaked due to this. Alternatively, we could switch all
other widgets to use MouseArea to make this more consistent.

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
@Scrumplex
Copy link
Copy Markdown
Contributor Author

I guess I could also add a volume bar to the popup of MediaMini

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
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.

1 participant