[GH-ISSUE #50] Volume module #4252

Closed
opened 2026-05-23 00:52:13 +01:00 by JakeStanger · 14 comments
Owner

Originally created by @aquifolly on GitHub (Jan 11, 2023).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/50

A volume module with a popup widget that has a slider. option to choose backend (wpctl, pactl, etc). usage of on-scroll events to change volume without opening the widget.

Originally created by @aquifolly on GitHub (Jan 11, 2023). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/50 A volume module with a popup widget that has a slider. option to choose backend (wpctl, pactl, etc). usage of on-scroll events to change volume without opening the widget.
Author
Owner

@JakeStanger commented on GitHub (Jan 11, 2023):

Happy to add this. I'd like to see if I can get a proper mixer too (like the Win7 one) allowing you to change input/output/program volumes individually where supported (ie Pulse or Pipewire).

<!-- gh-comment-id:1379389063 --> @JakeStanger commented on GitHub (Jan 11, 2023): Happy to add this. I'd like to see if I can get a proper mixer too (like the Win7 one) allowing you to change input/output/program volumes individually where supported (ie Pulse or Pipewire).
Author
Owner

@aquifolly commented on GitHub (Jan 12, 2023):

That would be nice

<!-- gh-comment-id:1379859692 --> @aquifolly commented on GitHub (Jan 12, 2023): That would be nice
Author
Owner

@dchinmay2 commented on GitHub (Mar 18, 2023):

Happy to add this. I'd like to see if I can get a proper mixer too (like the Win7 one) allowing you to change input/output/program volumes individually where supported (ie Pulse or Pipewire).

What if you just open pavucontrol on click

<!-- gh-comment-id:1474548285 --> @dchinmay2 commented on GitHub (Mar 18, 2023): > Happy to add this. I'd like to see if I can get a proper mixer too (like the Win7 one) allowing you to change input/output/program volumes individually where supported (ie Pulse or Pipewire). What if you just open pavucontrol on click
Author
Owner

@JakeStanger commented on GitHub (Mar 18, 2023):

That could be achieved currently with the custom module without much work.

My intention for any "proper" modules is that they offer a more integrated experience, and don't rely on external software where possible. Also, I've started work on the client code for this already :)

<!-- gh-comment-id:1474549388 --> @JakeStanger commented on GitHub (Mar 18, 2023): That could be achieved currently with the `custom` module without much work. My intention for any "proper" modules is that they offer a more integrated experience, and don't rely on external software where possible. Also, I've started work on the client code for this already :)
Author
Owner

@JakeStanger commented on GitHub (Apr 1, 2023):

Going to push this back to the next milestone because PulseAudio is painful to work with and it's draining. Want to work through some of the issues to avoid stagnation. I'll stick up a temporary custom module config that works with pavucontrol in the meantime.

<!-- gh-comment-id:1492944633 --> @JakeStanger commented on GitHub (Apr 1, 2023): Going to push this back to the next milestone because PulseAudio is painful to work with and it's draining. Want to work through some of the issues to avoid stagnation. I'll stick up a temporary custom module config that works with pavucontrol in the meantime.
Author
Owner

@Phant80m commented on GitHub (May 6, 2023):

how do i get the buttom to display the audio.

<!-- gh-comment-id:1537058525 --> @Phant80m commented on GitHub (May 6, 2023): how do i get the buttom to display the audio.
Author
Owner

@JakeStanger commented on GitHub (May 6, 2023):

Nothing has been implemented yet

<!-- gh-comment-id:1537111390 --> @JakeStanger commented on GitHub (May 6, 2023): Nothing has been implemented yet
Author
Owner

@yavko commented on GitHub (Jun 30, 2023):

I think a good starting point would be replicating what kde does, though I think kde's design isn't perfect so maybe could be built on

<!-- gh-comment-id:1615106572 --> @yavko commented on GitHub (Jun 30, 2023): I think a good starting point would be replicating what kde does, though I think kde's design isn't perfect so maybe could be built on
Author
Owner

@Phant80m commented on GitHub (Jul 4, 2023):

hmmmm

<!-- gh-comment-id:1620076531 --> @Phant80m commented on GitHub (Jul 4, 2023): hmmmm
Author
Owner

@Pyvonix commented on GitHub (Nov 13, 2023):

A bar that already implement a good volume's widget is the waybar with its PulseAudio plugin that offer an easy to:

  • format the current volume,
  • select an icon depending the used sound output/input,
  • let the user choose its sound mixer.

That could be a good reflection way.
And will be amazing to see something similar in Ironbar!

<!-- gh-comment-id:1809223713 --> @Pyvonix commented on GitHub (Nov 13, 2023): A bar that already implement a good volume's widget is [the waybar with its PulseAudio plugin](https://github.com/Alexays/Waybar/wiki/Module:-PulseAudio) that offer an easy to: - format the current volume, - select an icon depending the used sound output/input, - let the user choose its sound mixer. That could be a good reflection way. And will be amazing to see something similar in Ironbar!
Author
Owner

@yavko commented on GitHub (Nov 13, 2023):

A bar that already implement a good volume's widget is the waybar with its PulseAudio plugin that offer an easy to:

  • format the current volume,
  • select an icon depending the used sound output/input,
  • let the user choose its sound mixer.

That could be a good reflection way.
And will be amazing to see something similar in Ironbar!

Waybar's doesn't have a GUI tho. Plus you could already do the same as waybar does with ironbar's built in features.

<!-- gh-comment-id:1809314163 --> @yavko commented on GitHub (Nov 13, 2023): > A bar that already implement a good volume's widget is [the waybar with its PulseAudio plugin](https://github.com/Alexays/Waybar/wiki/Module:-PulseAudio) that offer an easy to: > - format the current volume, > - select an icon depending the used sound output/input, > - let the user choose its sound mixer. > > That could be a good reflection way. > And will be amazing to see something similar in Ironbar! Waybar's doesn't have a GUI tho. Plus you could already do the same as waybar does with ironbar's built in features.
Author
Owner

@Pyvonix commented on GitHub (Nov 14, 2023):

Waybar's doesn't have a GUI tho.

Both bars are made on the top of GTK. It's true that Waybar doesn't have real "GUI" (if you mean possibility to pop a box or container), but with some Wayland's trick (catching the window' name) you could make the mixer appear as floating windows the desired position. Realized with pavucontrol on Sway the result is transparent.

Plus you could already do the same as waybar does with ironbar's built in features.

Not completely agree.
After a very painful configuration, I was able to achieve something "like" a mixer using: button, label and progress based on the doc's example. But why doesn't offering {volume} keyword like the sys_info module did?

And I will point out for the moment I haven't found a way dynamically changes an icon depending the audio output (e.g. headphones, speakers, etc... ) or the audio level (e.g. mute, low, high, ...).
I didn't look into using an external script because I really don't like doing it that way.

I'd really like ironbar and there are little things that could make it even better.

<!-- gh-comment-id:1809957421 --> @Pyvonix commented on GitHub (Nov 14, 2023): > Waybar's doesn't have a GUI tho. Both bars are made on the top of GTK. It's true that Waybar doesn't have real "GUI" _(if you mean possibility to pop a box or container)_, but with some Wayland's trick _(catching the window' name)_ you could make the mixer appear as floating windows the desired position. Realized with `pavucontrol` on Sway the result is transparent. > Plus you could already do the same as waybar does with ironbar's built in features. Not completely agree. After a very painful configuration, I was able to achieve something "_like_" a mixer using: `button`, `label` and `progress` based on the doc's example. But why doesn't offering `{volume}` keyword like the `sys_info` module did? And I will point out for the moment I haven't found a way dynamically changes an icon depending the audio output (e.g. headphones, speakers, etc... ) or the audio level (e.g. mute, low, high, ...). I didn't look into using an external script because I really don't like doing it that way. I'd really like ironbar and there are little things that could make it even better.
Author
Owner

@JakeStanger commented on GitHub (Nov 14, 2023):

But why doesn't offering {volume} keyword like the sys_info module did?

This is achievable using an ironvar and/or script currently.

And I will point out for the moment I haven't found a way dynamically changes an icon depending the audio output (e.g. headphones, speakers, etc... ) or the audio level (e.g. mute, low, high, ...).

Image sources in the custom module are dynamic strings, which means you can set them via script or ironvar and they will update automatically (in theory).

I understand not wanting to rely heavily on scripts, as it does add some performance and maintenance overhead. That's why I want a native module :)

The thing is with the volume module is almost all the work is getting a working client. Once that's done, the rest of the implementation should be relatively straightforward; I may not release a full mixer interface immediately but I'd want the ability to show and change master volume for the current output device at a minimum. Unfortunately I've not had much time recently to look at this, and any previous attempts have mostly involved banging my head against walls so it might be a while still.

<!-- gh-comment-id:1811355892 --> @JakeStanger commented on GitHub (Nov 14, 2023): > But why doesn't offering {volume} keyword like the sys_info module did? This is achievable using an ironvar and/or script currently. > And I will point out for the moment I haven't found a way dynamically changes an icon depending the audio output (e.g. headphones, speakers, etc... ) or the audio level (e.g. mute, low, high, ...). Image sources in the custom module are dynamic strings, which means you can set them via script or ironvar and they will update automatically (in theory). I understand not wanting to rely heavily on scripts, as it does add some performance and maintenance overhead. That's why I want a native module :) The thing is with the volume module is almost all the work is getting a working client. Once that's done, the rest of the implementation *should* be relatively straightforward; I may not release a full mixer interface immediately but I'd want the ability to show and change master volume for the current output device at a minimum. Unfortunately I've not had much time recently to look at this, and any previous attempts have mostly involved banging my head against walls so it might be a while still.
Author
Owner

@JakeStanger commented on GitHub (Feb 18, 2024):

I've just opened a draft PR (linked above) with the initial version of the module. It's not quite complete, but stable enough to start playing around with. Full details in the PR.

<!-- gh-comment-id:1951391046 --> @JakeStanger commented on GitHub (Feb 18, 2024): I've just opened a draft PR (linked above) with the initial version of the module. It's not quite complete, but stable enough to start playing around with. Full details in the PR.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#4252
No description provided.