nicklan / pnmixer

Volume mixer for the system tray
GNU General Public License v3.0
152 stars 32 forks source link

[FeatureRequest] Multiple channels sliders #140

Closed nado closed 8 years ago

nado commented 8 years ago

Hi,

It would be nice to be able to pick some channels we’d like to see accessible from the click on the trayer icon. Example, I’d pick Master and Beep and I would be able to change both of them with the mouse from the trayer icon.

For now, I’m using custom command to get a amixer -D hw:0 sset Beep toggle when using the middle click action. I like it now but I’d prefer a more generic thing to be able to switch hdmi sound config. Tell me if I’m not clear enough, I’m not an english native speaker.

Thank you

elboulangero commented 8 years ago

Hi Nado, thanks for your feedback !

First, let me remind you that you can always configure the middle click to open the volume control, where you will see every channels. But you know that, right ?

Second, allowing multiple channels in the popup window would be quite some work, from a UI point of view. I'm not so keen on going in this direction, since we try to keep PNMixer simple (and low on maintenance).

Third, can you tell me more about your HDMI thing ? I started to use HDMI also these last days, therefore if you explain me what you're trying to achieve with HDMI, I might be able to help.

Cheers !

hasufell commented 8 years ago

Yeah, I think this would basically be replicating a fully-fledged mixer like xfce4-mixer.

nado commented 8 years ago

Hi,

@elboulangero It is already accessible from right-clicking, so it is the same, and my point here is to not use the volume control (alsamixer) since I want something in 2-3 clicks.

Then, about that hdmi thing, it would be to simply (un)mute/change volumes of my cards to use one or the other and simply mute any program that would use the wrong card so it doesnt annoy me while watching a movie for example. So really simple, and doable in alsamixer.

And finally, concerning the use of xfce4-mixer suggested by @hasufell, i simply dont want to install a shitload of dependencies (i run under xmonad) only to be able to do a thing in 3 clicks or in 2 cli commands.

If this request is refused, no problem, I’ll use hacks to do what I need since it is not that hard to get a working workaround by scripting and keybindings.

hasufell commented 8 years ago

IMO, I'd be fine with that feature if @nado implements and maintains it ;)

nado commented 8 years ago

Alright, I haven’t looked in the code at all for now and I can’t tell for sure I’ll have time to do it if there is lots of work (I dont understand the "quite some work, from a UI point of view." from @elboulangero ), but I will sure take a look :) Thanks for the answers.

elboulangero commented 8 years ago

Hi @nado !

If xfce4-mixer is too heavy you can always give a try to alsamixergui, maybe you'll like it.

About the HDMI stuff, I wrote a post in my blog lately. I'm not sure it's exactly what you're looking for, but it might interest you anyway. It's here: http://hacking.elboulangero.com/2016/09/05/hdmi-autoswitch.html

My strategy is to reconfigure ALSA when I plug the HDMI, to make HDMI the default interface. I have no volume for this interface, but I don't care, I have a remote for the TV and it's doing just fine.

elboulangero commented 8 years ago

About the code, it's not so much about the UI I'd say, but about the whole thing. Basically, at the moment PNMixer picks ONE channel, monitors it, and allows you to modify it. What you want is to expand that to N channels. This is a big move.

PNMixer's is made of two main parts: the low-level, sound-related part. And the high-level part: the GUI. There's a clean separation between these two parts.

You will have to make a serious rewrite of the sound part, and you will see that this part is not trivial, even a bit overly complicated you might think. Plus, you will have to improve/rethink the interface exposed by this part. Remember, PNMixer manages only ONE channel, and you want to have N.

Then comes the GUI, you will have to decide how to present that new options to the user in the Preferences dialog. Then change the volume popup so that it can display a number N of sliders. Once again, you go from a code that manages ONE slider to a more generic code that manage N sliders.

BTW, which one of the channels will you display on the tray icon ? So the user who display more than one channel will have to decide which one is the main.

So overall, let me say that one more time: what you have is a code that manages ONE particular channel, and what you want is a generic code that manages N channels. That's a deep change, that's far from trivial. I warn you.

I won't implement that, I can already tell you. I invested quite a lot of time in PNMixer lately, but that's as much as I could do, now I have to spend my time in other projects.

But it's in the end, let's get back to xfce4-mixer. This mixer allows you to decide which channels you want to display or hide. If you configure it to display only the channels you want, and to popup on middle-click, I believe you have your solution. Why spend so much effort in coding in PNMixer a behavior that you already have with a simple middle-click ?

hasufell commented 8 years ago

I think this can be closed since no one is going to work on it (it seems). Ofc you can still create a PR if you manage to do this.