ccatterina / plasmusic-toolbar

KDE Plasma widget that shows currently playing song information and provide playback controls.
GNU General Public License v3.0
73 stars 8 forks source link

Mouse wheel shortcuts akin to plasma's media player widget #115

Closed AuraHerreroRuiz closed 1 month ago

AuraHerreroRuiz commented 2 months ago

Something I'd like to see for this plasmoid is to add the actions the normal media player plasmoid has: Increase and decrease the current player's volume using the scroll wheel, and pause/resume on middle click.

luisbocanegra commented 2 months ago

Added in #117, please test it out

Update from the current version

git clone https://github.com/luisbocanegra/plasmusic-toolbar.git -b mouse-wheel-controls
cd plasmusic-toolbar && kpackagetool6 -t Plasma/Applet -u src

Then logout/reboot/restart plasmashell

Screenshot_20240721_194441

Should the step size be configurable? I left it fixed to 5%

AuraHerreroRuiz commented 2 months ago

Added in #117, please test it out

Works perfectly! Thanks a lot for adding it.

Should the step size be configurable? I left it fixed to 5%

Hmm, from what I can tell, Plasma's default mediaplayer widget follows the volume step size specified in settings, just like the volume widget. (Input & Output > Sound > Configure Volume Controls...) 22-07_14-18_0001

I feel it should follow that, if possible, for consistency with the rest of plasma.

luisbocanegra commented 2 months ago

Hmm, from what I can tell, Plasma's default mediaplayer widget follows the volume step size specified in settings, just like the volume widget. (Input & Output > Sound > Configure Volume Controls...)

Added, the cpp plugin from the default media player provides that https://github.com/KDE/plasma-workspace/tree/master/applets/mediacontroller/plugin (import org.kde.plasma.private.mediacontroller 1.0)

In theory, the default media player widget should always be shipped with Plasma, but since it is no longer a hard requirement to have working media shortcuts after MR applets/mediacontroller: port away from DataEngine (BUG 409190) I will add a conditional import and fallback to 5 if the module can't be imported.

ccatterina commented 1 month ago

Added, the cpp plugin from the default media player provides that https://github.com/KDE/plasma-workspace/tree/master/applets/mediacontroller/plugin (import org.kde.plasma.private.mediacontroller 1.0)

In theory, the default media player widget should always be shipped with Plasma, but since it is no longer a hard requirement to have working media shortcuts after MR applets/mediacontroller: port away from DataEngine (BUG 409190) I will add a conditional import and fallback to 5 if the module can't be imported.

@luisbocanegra @AuraHerreroRuiz I'm not very sure if it's worth doing this; I would prefer not to couple this widget too much with the media controller. For now, IMO it can remain a non-configurable value but if you guys prefer to make it configurarable we can add a new option in the settings.

luisbocanegra commented 1 month ago

I'm not very sure if it's worth doing this; I would prefer not to couple this widget too much with the media controller.

Understandable, reverted it back to 5%.

For now, IMO it can remain a non-configurable value but if you guys prefer to make it configurarable we can add a new option in the settings.

Personally, I never change the default on Plasma either, but for the people that do, an option that allows them to manually match the rest of the system could be nice IMHO.

ccatterina commented 1 month ago

Personally, I never change the default on Plasma either, but for the people that do, an option that allows them to manually match the rest of the system could be nice IMHO.

:+1: it's fine for me!