Merge pull request #147 from rccavalcanti/spotify-ctrl
Add click events to Spotify module
This commit is contained in:
commit
443a1098ca
1 changed files with 9 additions and 0 deletions
|
@ -25,6 +25,15 @@ class Module(bumblebee.engine.Module):
|
||||||
)
|
)
|
||||||
self._song = ""
|
self._song = ""
|
||||||
|
|
||||||
|
cmd="dbus-send --session --type=method_call --dest=org.mpris.MediaPlayer2.spotify \
|
||||||
|
/org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player."
|
||||||
|
engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE,
|
||||||
|
cmd=cmd + "Previous")
|
||||||
|
engine.input.register_callback(self, button=bumblebee.input.RIGHT_MOUSE,
|
||||||
|
cmd=cmd + "Next")
|
||||||
|
engine.input.register_callback(self, button=bumblebee.input.MIDDLE_MOUSE,
|
||||||
|
cmd=cmd + "PlayPause")
|
||||||
|
|
||||||
def spotify(self, widget):
|
def spotify(self, widget):
|
||||||
return str(self._song)
|
return str(self._song)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue