Skip to content

feat(audio): implement volume change audio notifications#558

Draft
romanstingler wants to merge 1 commit intoMalpenZibo:mainfrom
romanstingler:feature/audio-beep
Draft

feat(audio): implement volume change audio notifications#558
romanstingler wants to merge 1 commit intoMalpenZibo:mainfrom
romanstingler:feature/audio-beep

Conversation

@romanstingler
Copy link
Copy Markdown
Collaborator

@romanstingler romanstingler commented Mar 27, 2026

Based on the discussion in #525

and taking into consideration @MalpenZibo concerns and also his POV to keep external dependencies to a minimum,
I thought we could provide this feature as an opt-in and who wants to use it, can do it but has some prerequisites.

Required packages: pipewire + sound-theme-freedesktop (If you want to use the default sound)

I added the option to add this to the config

[settings]
audio_feedback = true
#audio_feedback_sound = "/usr/share/sounds/freedesktop/stereo/bell.oga"  // this one is the default one but users can chose

For now I wanted to have your feedback on this idea.

I added a audio feedback mechanism that triggers beep sounds during volume adjustments through sliders, scroll and mute toggle.
It utilizes pw-cat for playback with built-in rate-limiting
(I had some issues with throttling that external command, so that it doesn't overlap too much, so I tried to track the PID and not dispatch a next one too early, but this is still a WIP ).

For now I just took /usr/share/sounds/freedesktop/stereo/bell.oga as a fallback (should be the Gnome/Cosmic one if I am not mistaken).

For now I am checking if the executable pw-cat is present and also if the configured path for
audio_feedback_sound = "/usr/share/sounds/freedesktop/stereo/bell.oga"
is valid.

WARN [ashell::modules::settings::audio] Audio feedback enabled but 'pw-cat' is not available. Install PipeWire.

WARN [ashell::modules::settings::audio] Audio feedback sound file not found: /usr/share/sounds/alsa/Front_Cen. Install 'sound-theme-freedesktop' or set 'audio_feedback_sound' in config.

There are a few known issues like. beep on mic mute (this is because the audio volume is still not 0). I don't know where to put the default path, for now I just kept the audio stuff together.

But I wanted your feedback before I do any further stuff,

closes #525

@MalpenZibo
Copy link
Copy Markdown
Owner

I was thinking that now that we were able to reduce the number of dependencies we could evaluate to use rodio.

We should probably need to add some dependency in the package and nix config to be able to compile.

So we could proceed by step. If this solution is acceptable let's merge and see, then if it's used and adding rodio is not a pain in the ass we can proceed adding a "real" audio support

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request] Audio slider beep

2 participants