[modules/pulseaduio] Allow user choice for giht click command

This allows using eg. pavucontrol-qt or any other command on right click.
This commit is contained in:
ibrokemypie 2017-06-03 15:52:25 +10:00
parent eafe0a4038
commit a407046ca3

View file

@ -2,6 +2,10 @@
"""Displays volume and mute status of PulseAudio devices. """Displays volume and mute status of PulseAudio devices.
Parameters:
* pasink.controlApp : What program to run on right click (defaults to pavucontrol)
Aliases: pasink, pasource Aliases: pasink, pasource
Requires the following executable: Requires the following executable:
@ -35,7 +39,7 @@ class Module(bumblebee.engine.Module):
{ "expr": "Volume:", "callback": self.getvolume }, { "expr": "Volume:", "callback": self.getvolume },
] ]
engine.input.register_callback(self, button=bumblebee.input.RIGHT_MOUSE, cmd="pavucontrol") engine.input.register_callback(self, button=bumblebee.input.RIGHT_MOUSE, cmd=self.parameter("controlApp", "pavucontrol"))
events = [ events = [
{ "type": "mute", "action": "toggle", "button": bumblebee.input.LEFT_MOUSE }, { "type": "mute", "action": "toggle", "button": bumblebee.input.LEFT_MOUSE },