[modules] Add default click events to various modules
* cpu+memory: Open "gnome-system-monitor" * disk: Open nautilus * pulseaudio: Mute/unmute, open "pavucontrol" on right-click, raise/lower volume on mouse wheel up/down
This commit is contained in:
parent
fca3171556
commit
4c34cd37d4
4 changed files with 18 additions and 2 deletions
|
@ -34,6 +34,16 @@ class Module(bumblebee.module.Module):
|
|||
self._right = 0
|
||||
self._mono = 0
|
||||
self._mute = False
|
||||
channel = "sink" if self._module == "pasink" else "source"
|
||||
|
||||
output.add_callback(module=self.__module__, button=3,
|
||||
cmd="pavucontrol")
|
||||
output.add_callback(module=self.__module__, button=1,
|
||||
cmd="pactl set-{}-mute @DEFAULT_{}@ toggle".format(channel, channel.upper()))
|
||||
output.add_callback(module=self.__module__, button=4,
|
||||
cmd="pactl set-{}-volume @DEFAULT_{}@ +2%".format(channel, channel.upper()))
|
||||
output.add_callback(module=self.__module__, button=5,
|
||||
cmd="pactl set-{}-volume @DEFAULT_{}@ -2%".format(channel, channel.upper()))
|
||||
|
||||
def data(self):
|
||||
res = subprocess.check_output(shlex.split("pactl info"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue