This commit is contained in:
2025-12-07 22:25:03 +01:00
parent e428b18e42
commit bb3de5c241

View File

@@ -692,7 +692,11 @@ def on_message(client, userdata, msg):
writeLog("Linux Vol Control")
if myObj['target'] == "start":
writeLog("Getting sound status")
out = subprocess.Popen("sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer sget Master | awk -F\"[][]\" '/Left:/ { print $2 }'", shell=True)
myCmd = "sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer sget Master | awk -F'[][]' '/Left:/ { print $2 }'"
writeLog(myCmd)
output = subprocess.Popen(myCmd, shell=True)
writeLog(f"Status of volume {out}")
myCmd = f'sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer set Master 20%'