mocp toggles shuffle on right click

This commit is contained in:
Michael Kwardakov 2019-01-14 12:03:47 +03:00
parent 29d427e6a1
commit 18b0e793cb

View file

@ -1,7 +1,7 @@
# pylint: disable=C0111,R0903 # pylint: disable=C0111,R0903
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""Displays information about the current song in mocp. Left click toggles play/pause. """Displays information about the current song in mocp. Left click toggles play/pause. Right click toggles shuffle.
Requires the following executable: Requires the following executable:
* mocp * mocp
@ -38,6 +38,8 @@ class Module(bumblebee.engine.Module):
engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE, engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE,
cmd="mocp -G") cmd="mocp -G")
engine.input.register_callback(self, button=bumblebee.input.RIGHT_MOUSE,
cmd="mocp -t shuffle")
self._format = self.parameter("format", "%state %artist - %song | %ct/%tt") self._format = self.parameter("format", "%state %artist - %song | %ct/%tt")
self._running = 0 self._running = 0