fix 'sink not found' for pamixer
This commit is contained in:
@@ -20,7 +20,9 @@ def process(args):
|
|||||||
|
|
||||||
def volume(name):
|
def volume(name):
|
||||||
result = process(f'pamixer --get-volume --sink "{name}"')
|
result = process(f'pamixer --get-volume --sink "{name}"')
|
||||||
if search("pamixer: command not found", result) is not None:
|
if search("The sink doesn't exit", result):
|
||||||
|
result = "--"
|
||||||
|
elif search("pamixer: command not found", result) is not None:
|
||||||
n = process(r"pactl list sinks short | awk '{print $2}'").split()
|
n = process(r"pactl list sinks short | awk '{print $2}'").split()
|
||||||
v = process(r"pactl list sinks | grep '^[[:space:]]Volume:' | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'").split()
|
v = process(r"pactl list sinks | grep '^[[:space:]]Volume:' | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,'").split()
|
||||||
if name in n:
|
if name in n:
|
||||||
|
|||||||
Reference in New Issue
Block a user