aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pa.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pa.py b/pa.py
index 4586b1e..014a234 100644
--- a/pa.py
+++ b/pa.py
@@ -32,6 +32,9 @@ class Sink:
vol = round(vol * _get_maxvol(self._i))
pacmd.pacmd("set-sink-volume", str(self.index()), str(vol))
+ def set_muted(self, yes):
+ pacmd.pacmd("set-sink-mute", str(self.index()), "true" if yes else "false")
+
def set_default(self):
pacmd.pacmd("set-default-sink", str(self.index()))
@@ -72,6 +75,9 @@ class SinkInput:
vol = round(vol * _get_maxvol(self._i))
pacmd.pacmd("set-sink-input-volume", str(self.index()), str(vol))
+ def set_muted(self, yes):
+ pacmd.pacmd("set-sink-input-mute", str(self.index()), "true" if yes else "false")
+
def move_to_sink(self, idx):
assert type(idx) == int
pacmd.pacmd("move-sink-input", str(self.index()), str(idx))