Pulseaudio: fix non-working decrease_volume()

Also change switch_mute() and increase_volume() to look similar to
decrease_volume()
This commit is contained in:
hcpl 2016-10-07 02:25:13 +03:00
parent 55b1c1432c
commit f678565666

View File

@ -191,10 +191,10 @@ class PulseAudio(Module, ColorRangeModule):
subprocess.call("pacmd set-default-sink {}".format(sinks[next_sink]).split()) subprocess.call("pacmd set-default-sink {}".format(sinks[next_sink]).split())
def switch_mute(self): def switch_mute(self):
subprocess.call(['pactl', 'set-sink-mute', self.sink, "toggle"]) subprocess.call(['pactl', '--', 'set-sink-mute', self.sink, "toggle"])
def increase_volume(self): def increase_volume(self):
subprocess.call(['pactl', 'set-sink-volume', self.sink, "+%s%%" % self.step]) subprocess.call(['pactl', '--', 'set-sink-volume', self.sink, "+%s%%" % self.step])
def decrease_volume(self): def decrease_volume(self):
subprocess.call(['pactl', 'set-sink-volume', self.sink, "-%s%%" % self.step]) subprocess.call(['pactl', '--', 'set-sink-volume', self.sink, "-%s%%" % self.step])