This commit is contained in:
2025-10-25 22:23:29 +02:00
parent 152239a804
commit 563d7ad04b

View File

@@ -679,9 +679,9 @@ def on_message(client, userdata, msg):
else: else:
writeLog("Linux Vol Control") writeLog("Linux Vol Control")
if myObj['target'] == "start": if myObj['target'] == "start":
myCmd =f'amixer set Master 20%' myCmd =f'sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer set Master 20%'
else: else:
myCmd =f'amixer set Master 100%' myCmd =f'sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer set Master 100%'
# try: # try:
# #percent = 20 # #percent = 20
# #output = subprocess.run(["pactl", "set-sink-volume", "@DEFAULT_SINK@", f"{percent}%"], check=True) # #output = subprocess.run(["pactl", "set-sink-volume", "@DEFAULT_SINK@", f"{percent}%"], check=True)